<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <parent>
    <artifactId>drools-wb-scenario-simulation-editor</artifactId>
    <groupId>org.drools</groupId>
    <version>7.46.0.Final</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>drools-wb-scenario-simulation-editor-kogito-runtime</artifactId>
  <packaging>war</packaging>

  <name>Drools Workbench - Scenario Simulation Editor - Kogito - Runtime Webapp</name>
  <description>Drools Workbench - Scenario Simulation Editor - Kogito - Runtime Webapp</description>

  <properties>
    <wildfly.home>${project.build.directory}/wildfly-${version.org.wildfly}</wildfly.home>
    <gwt.helper.includes>Client,Marshaller,KogitoEditor,WebappBase</gwt.helper.includes>
    <gwt.helper.rootDirectories>${project.parent.basedir}/</gwt.helper.rootDirectories>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>log4j-over-slf4j</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Errai -->
    <dependency>
      <groupId>com.google.inject</groupId>
      <artifactId>guice</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-ioc</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-common</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-bus</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-ui</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-data-binding</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-marshalling</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-security-server</artifactId>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>org.jboss.spec.javax.annotation</groupId>
          <artifactId>jboss-annotations-api_1.3_spec</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-cdi-server</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-cdi-client</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-cdi-shared</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-cdi-jboss</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-jboss-as-support</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-codegen-gwt</artifactId>
      <scope>provided</scope>
    </dependency>
    <!-- GWT/Errai Bean Validation - JSR303 -->
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-validation</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
      <scope>provided</scope>
      <classifier>sources</classifier>
    </dependency>

    <!-- UberFire JS exporter -->
    <!-- Needed by uberfire-runtime-plugins-client -->
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-js</artifactId>
      <scope>provided</scope>
    </dependency>
    <!-- Core UberFire dependencies -->
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>appformer-client-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>appformer-js-bridge</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>appformer-kogito-bridge</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-client-all</artifactId>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-backend-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-backend-api</artifactId>
      <scope>provided</scope>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-services-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-client</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-client-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-security-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-security-client</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-simple-docks-client</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-workbench-processors</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-workbench-client-views-patternfly</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-widgets-properties-editor-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-commons-editor-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-preferences-client</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- UberFire Kogito dependencies -->
    <dependency>
      <groupId>com.google.elemental2</groupId>
      <artifactId>elemental2-promise</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- UberFire IO -->
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-io</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-nio2-model</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Needed by org.uberfire.java.nio.file.spi.FileSystemProvider -->
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-nio2-jgit</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-nio2-fs</artifactId>
      <scope>provided</scope>
    </dependency>
    <!-- END PROVIDERS -->
    <!-- Uberfire Experimentals -->
    <!-- Required by uberfire-workbench-client -->
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-experimental-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-experimental-client</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Core utility classes -->
    <dependency>
      <groupId>org.kie.soup</groupId>
      <artifactId>kie-soup-commons</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Required for workbench startup -->
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-commons</artifactId>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>org.apache.activemq</groupId>
          <artifactId>artemis-jms-client</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.jboss.spec.javax.jms</groupId>
          <artifactId>jboss-jms-api_2.0_spec</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- Generic ui components -->
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-widgets-commons</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-widgets-table</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.kie.workbench.widgets</groupId>
      <artifactId>kie-wb-common-ui</artifactId>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>org.uberfire</groupId>
          <artifactId>uberfire-security-management-client</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.kie.workbench.services</groupId>
      <artifactId>kie-wb-common-services-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.kie.workbench.services</groupId>
      <artifactId>kie-wb-common-datamodel-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Required by uberfire-project -->
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-structure-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <!--     Required by uberfire-project-client-->
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-preferences-ui-client</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- GWT and extensions -->
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>javax.servlet</groupId>
          <artifactId>javax.servlet-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.gwtbootstrap3</groupId>
      <artifactId>gwtbootstrap3</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.gwtbootstrap3</groupId>
      <artifactId>gwtbootstrap3-extras</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.elemental2</groupId>
      <artifactId>elemental2-dom</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Kogito -->
    <dependency>
      <groupId>org.kie.workbench</groupId>
      <artifactId>kie-wb-common-kogito-client</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-wb-scenario-simulation-editor-kogito-webapp-common</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.kie.workbench</groupId>
      <artifactId>kie-wb-common-kogito-webapp-base</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.kie.workbench</groupId>
      <artifactId>kie-wb-common-kogito-webapp-base</artifactId>
      <scope>provided</scope>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.kie.workbench</groupId>
      <artifactId>kie-wb-common-dmn-webapp-kogito-marshaller</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>com.google.gwt.gwtmockito</groupId>
      <artifactId>gwtmockito</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- Transient dependencies -->
    <dependency>
      <groupId>org.kie.soup</groupId>
      <artifactId>kie-soup-project-datamodel-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-message-console-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-widgets-service-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-workbench-models-datamodel-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.kie.workbench.profile</groupId>
      <artifactId>kie-wb-common-profile-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.kie.workbench.profile</groupId>
      <artifactId>kie-wb-common-profile-api</artifactId>
      <classifier>sources</classifier>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.jsinterop</groupId>
      <artifactId>base</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.jsinterop</groupId>
      <artifactId>jsinterop-annotations</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-workbench-client</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-commons-editor-client</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-preferences-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-project-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>xml-apis</groupId>
      <artifactId>xml-apis</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Scenario Simulation -->
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-wb-scenario-simulation-editor-client</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>appformer-kogito-bridge</artifactId>
      <classifier>sources</classifier>
      <scope>provided</scope>
    </dependency>

    <!-- Add for enforcer -->
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>lienzo-core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-scenario-simulation-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-wb-scenario-simulation-editor-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-wb-scenario-simulation-editor-kogito-client</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-message-console-client</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-wires-core-grids</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.kie.workbench</groupId>
      <artifactId>kie-wb-common-command-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.kie.workbench.widgets</groupId>
      <artifactId>kie-wb-config-resource-widget</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.kie.workbench.widgets</groupId>
      <artifactId>kie-wb-metadata-widget</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-jaxrs-client</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- MARSHALLING -->
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-wb-scenario-simulation-editor-kogito-marshaller</artifactId>
      <scope>provided</scope>
    </dependency>
    <!-- END MARSHALLING -->

  </dependencies>

  <build>
    <finalName>${project.artifactId}</finalName>
    <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>

    <plugins>
      <!-- Include additional sources path for hot reload -->
      <plugin>
        <groupId>org.kie</groupId>
        <artifactId>kie-gwthelper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-source</id>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <includes>${gwt.helper.includes}</includes> <!-- will include all GWT module whose configuration file name match that pattern -->
              <rootDirectories>${gwt.helper.rootDirectories}</rootDirectories> <!-- will search inside those directories -->
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>${basedir}</directory>
              <includes>
                <include>src/main/webapp/org.drools.workbench.screens.scenariosimulation.webapp.DroolsWorkbenchScenarioSimulationEditorShowcase/</include>
                <include>src/main/webapp/WEB-INF/deploy/</include>
                <include>src/main/webapp/WEB-INF/classes/</include>
                <include>src/main/webapp/WEB-INF/lib/</include>
                <include>src/main/webapp/model/</include>
                <include>src/main/gwt-unitCache</include>
                <include>**/gwt-unitCache/**</include>
                <include>.gwt/**</include>
                <include>.errai/</include>
                <include>.index/**</include>
                <include>**/*.JUnit/**</include>
              </includes>
            </fileset>
          </filesets>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-marshaller-js</id>
            <phase>process-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/src/main/webapp/model</outputDirectory>
              <resources>
                <resource>
                  <directory>${project.parent.basedir}/drools-wb-scenario-simulation-editor-kogito-marshaller/src/main/resources/org/drools/workbench/scenariosimulation/kogito/marshaller/js/</directory>
                  <includes>
                    <include>**/*.js</include>
                  </includes>
                </resource>
                <resource>
                  <directory>${project.build.directory}/Marshaller/org/kie/workbench/common/dmn/webapp/kogito/marshaller/js</directory>
                  <includes>
                    <include>**/*.js</include>
                  </includes>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>

  </build>

  <profiles>
    <!-- Profile to disable GWT compilation of showcase (useful in full downstream builds) -->
    <profile>
      <id>no-showcase</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Profile to build GWT code and package WAR for Community builds -->
    <profile>
      <id>kogito</id>
      <activation>
        <property>
          <name>!productized</name>
        </property>
      </activation>

      <build>
        <plugins>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <configuration>
              <deploy>${project.build.directory}/gwt-symbols-deploy</deploy>
              <localWorkers>4</localWorkers>
              <module>org.drools.workbench.screens.scenariosimulation.webapp.DroolsWorkbenchScenarioSimulationKogitoRuntime</module>
              <extraJvmArgs>-Xmx4096m -Xms1024m -Xss1M -XX:CompileThreshold=7000 -Derrai.dynamic_validation.enabled=true</extraJvmArgs>
              <optimizationLevel>9</optimizationLevel>
              <style>OBFUSCATED</style>
              <logLevel>INFO</logLevel>
              <noServer>false</noServer>
              <server>org.jboss.errai.cdi.server.gwt.EmbeddedWildFlyLauncher</server>
              <disableCastChecking>true</disableCastChecking>
              <runTarget>index.html</runTarget>
              <strict>true</strict>
              <style>PRETTY</style>
              <printJavaCommandOnError>false</printJavaCommandOnError>
              <productionMode>true</productionMode>
              <hostedWebapp>src/main/webapp</hostedWebapp>

              <compileSourcesArtifacts>
                <compileSourcesArtifact>org.kie.soup:kie-soup-commons</compileSourcesArtifact>

                <!-- UberFire -->
                <compileSourcesArtifact>org.uberfire:uberfire-commons</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-nio2-model</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-nio2-model</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-io</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-js</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-security-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-security-client</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-client-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-workbench-client</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-workbench-client-views-patternfly</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-simple-docks-client</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-project-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-project-client</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-services-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-structure-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-message-console-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-message-console-client</compileSourcesArtifact>

                <!-- Errai, Drools etc -->
                <compileSourcesArtifact>org.jboss.errai:errai-data-binding</compileSourcesArtifact>
                <compileSourcesArtifact>org.kie.workbench.widgets:kie-wb-common-ui</compileSourcesArtifact>
                <compileSourcesArtifact>org.kie.workbench.services:kie-wb-common-datamodel-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.kie.workbench.services:kie-wb-common-services-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.kie.workbench:kie-wb-common-kogito-client</compileSourcesArtifact>

                <!-- UF-ext -->
                <compileSourcesArtifact>org.uberfire:uberfire-runtime-plugins-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-commons-editor-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-commons-editor-client</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-widgets-commons</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-widgets-table</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-widgets-properties-editor-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-widgets-properties-editor-client</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-widgets-service-api</compileSourcesArtifact>

                <!-- Uberfire Preferences -->
                <compileSourcesArtifact>org.uberfire:uberfire-preferences-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-preferences-client</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-preferences-ui-client</compileSourcesArtifact>

                <!-- Uberfire Experimentals -->
                <compileSourcesArtifact>org.uberfire:uberfire-experimental-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-experimental-client</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:uberfire-wires-core-grids</compileSourcesArtifact>

                <!-- Appformer -->
                <compileSourcesArtifact>org.uberfire:appformer-client-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:appformer-js-bridge</compileSourcesArtifact>
                <compileSourcesArtifact>org.uberfire:appformer-kogito-bridge</compileSourcesArtifact>

                <compileSourcesArtifact>org.kie.workbench.widgets:kie-wb-metadata-widget</compileSourcesArtifact>
                <compileSourcesArtifact>org.kie.workbench.widgets:kie-wb-config-resource-widget</compileSourcesArtifact>
                <compileSourcesArtifact>org.kie.workbench:kie-wb-common-command-api</compileSourcesArtifact>
                <!-- drools-wb -->
                <compileSourcesArtifact>org.drools:drools-wb-scenario-simulation-editor-api</compileSourcesArtifact>
                <compileSourcesArtifact>org.drools:drools-scenario-simulation-api</compileSourcesArtifact>
                <!-- DMN Marshaller -->
                <compileSourcesArtifact>org.kie.workbench:kie-wb-common-dmn-webapp-kogito-marshaller</compileSourcesArtifact>
              </compileSourcesArtifacts>
            </configuration>
            <executions>
              <execution>
                <id>gwt-clean</id>
                <phase>clean</phase>
                <goals>
                  <goal>clean</goal>
                </goals>
              </execution>
              <execution>
                <id>gwt-compile</id>
                <goals>
                  <!-- Do not use 'resources' goal as it does not play well with filtered resources. -->
                  <goal>compile</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
              <!-- Removing unused inherited modules like ace and monaco-editor-->
              <packagingExcludes>
                **/javax/**/*.*,
                **/client/**/*.class,
                **/*.symbolMap,
                WEB-INF/classes/**,
                **/ace/**,
                **/monaco-editor/dev/vs/*.*,
                **/monaco-editor/dev/vs/base/**,
                **/monaco-editor/dev/vs/basic-languages/**,
                **/monaco-editor/dev/vs/editor/*.js,
                **/monaco-editor/dev/vs/language/**,
              </packagingExcludes>
              <archive>
                <addMavenDescriptor>false</addMavenDescriptor>
              </archive>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>Unpack External Marshaller JS from dependency</id>
                <phase>process-sources</phase>
                <goals>
                  <goal>unpack</goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <artifactItem>
                      <groupId>org.kie.workbench</groupId>
                      <artifactId>kie-wb-common-dmn-webapp-kogito-marshaller</artifactId>
                      <type>jar</type>
                      <overWrite>true</overWrite>
                      <outputDirectory>${project.build.directory}/Marshaller</outputDirectory>
                      <includes>**/*.js</includes>
                    </artifactItem>
                  </artifactItems>
                </configuration>
              </execution>
            </executions>
          </plugin>

        </plugins>
      </build>
    </profile>
  </profiles>

</project>