<?xml version="1.0" encoding="UTF-8"?><project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.bonitasoft</groupId>
  <artifactId>bonita-project</artifactId>
  <version>10.2.3</version>
  <packaging>pom</packaging>
  <name>Bonita Project Parent pom</name>
  <description>A parent pom used for Bonita Project.</description>
  <url>https://www.bonitasoft.com</url>
  <licenses>
    <license>
      <name>GPL-v2.0</name>
      <url>http://www.gnu.org/licenses/gpl-2.0.txt</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>bonitasoft</id>
      <name>Bonitasoft</name>
      <email>rd.user@bonitasoft.com</email>
      <organization>Bonitasoft</organization>
      <organizationUrl>https://www.bonitasoft.com</organizationUrl>
    </developer>
  </developers>
  <scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false" child.scm.url.inherit.append.path="false">
    <connection>scm:git:git@github.com:bonitasoft/bonita-project.git</connection>
    <developerConnection>scm:git:git@github.com:bonitasoft/bonita-project.git</developerConnection>
    <url>https://github.com/bonitasoft/bonita-project</url>
  </scm>
  <properties>
    <maven.compiler.release>${java.version}</maven.compiler.release>
    <maven-install-plugin.version>3.1.1</maven-install-plugin.version>
    <bonita-artifacts-model.version>1.1.2</bonita-artifacts-model.version>
    <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
    <bonita-project-maven-plugin.version>1.0.3</bonita-project-maven-plugin.version>
    <include.profiles>*.xml</include.profiles>
    <!-- Bonita specific properties below -->
    <bonita.environment>local</bonita.environment>
    <flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
    <!-- Default inclusion filters -->
    <include.organizations>*.xml</include.organizations>
    <maven-dependency-plugin.version>3.7.1</maven-dependency-plugin.version>
    <groovy-eclipse-batch.version>3.0.21-02</groovy-eclipse-batch.version>
    <maven-javadoc-plugin.version>3.7.0</maven-javadoc-plugin.version>
    <include.pages>*.zip</include.pages>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <groovy.repository.url>https://groovy.jfrog.io/artifactory/plugins-release/</groovy.repository.url>
    <bonita-test-toolkit.version>3.0.0</bonita-test-toolkit.version>
    <include.applications>*</include.applications>
    <!-- Should match version in bonita-runtime-bom -->
    <groovy.version>3.0.21</groovy.version>
    <maven-help-plugin.version>3.4.1</maven-help-plugin.version>
    <gmavenplus-plugin.version>3.0.2</gmavenplus-plugin.version>
    <maven-deploy-plugin.version>3.1.2</maven-deploy-plugin.version>
    <include.processes>*.bar</include.processes>
    <maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
    <maven-failsafe-plugin.version>3.3.0</maven-failsafe-plugin.version>
    <java.version>17</java.version>
    <maven-shade-plugin.version>3.6.0</maven-shade-plugin.version>
    <versions-maven-plugin.version>2.16.2</versions-maven-plugin.version>
    <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
    <build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
    <maven-clean-plugin.version>3.4.0</maven-clean-plugin.version>
    <!-- Only upgrade to a version fixing https://issues.apache.org/jira/browse/MASSEMBLY-1031 -->
    <maven-assembly-plugin.version>3.6.0</maven-assembly-plugin.version>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <ui-designer-artifact-builder.version>1.0.10</ui-designer-artifact-builder.version>
    <!-- DO NOT USE ${project.version} or ${project.parent.version} here -->
    <bonita.runtime.version>10.2.3</bonita.runtime.version>
    <groovy-eclipse-compiler.version>3.9.0</groovy-eclipse-compiler.version>
    <branding.version>2024.3-u3</branding.version>
    <maven-surefire-plugin.version>3.3.0</maven-surefire-plugin.version>
    <bonita-process-model.version>8.1.0</bonita-process-model.version>
    <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
    <exec-maven-plugin.version>3.3.0</exec-maven-plugin.version>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.bonitasoft.runtime</groupId>
        <artifactId>bonita-runtime-bom</artifactId>
        <version>${bonita.runtime.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>${groovy.version}</version>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.bonitasoft.web.application</groupId>
        <artifactId>bonita-user-application</artifactId>
        <version>${bonita.runtime.version}</version>
        <type>zip</type>
        <classifier>application</classifier>
      </dependency>
      <dependency>
        <groupId>org.bonitasoft.web.application</groupId>
        <artifactId>bonita-admin-application</artifactId>
        <version>${bonita.runtime.version}</version>
        <type>zip</type>
        <classifier>application</classifier>
      </dependency>
      <dependency>
        <groupId>com.bonitasoft.web.application</groupId>
        <artifactId>bonita-admin-application-sp</artifactId>
        <version>${bonita.runtime.version}</version>
        <type>zip</type>
        <classifier>application</classifier>
      </dependency>
      <dependency>
        <groupId>com.bonitasoft</groupId>
        <artifactId>bonita-test-toolkit</artifactId>
        <version>${bonita-test-toolkit.version}</version>
      </dependency>
      <dependency>
        <groupId>org.bonitasoft.web.page</groupId>
        <artifactId>page-user-case-list</artifactId>
        <version>${bonita.runtime.version}</version>
        <type>zip</type>
      </dependency>
      <dependency>
        <groupId>org.bonitasoft.web.page</groupId>
        <artifactId>page-user-case-details</artifactId>
        <version>${bonita.runtime.version}</version>
        <type>zip</type>
      </dependency>
      <dependency>
        <groupId>org.bonitasoft.web.page</groupId>
        <artifactId>page-user-process-list</artifactId>
        <version>${bonita.runtime.version}</version>
        <type>zip</type>
      </dependency>
      <dependency>
        <groupId>org.bonitasoft.web.page</groupId>
        <artifactId>page-user-task-list</artifactId>
        <version>${bonita.runtime.version}</version>
        <type>zip</type>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <pluginRepositories>
    <pluginRepository>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>groovy</id>
      <url>${groovy.repository.url}</url>
    </pluginRepository>
  </pluginRepositories>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>${maven-install-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.codehaus.groovy</groupId>
              <artifactId>groovy-eclipse-compiler</artifactId>
              <version>${groovy-eclipse-compiler.version}</version>
            </dependency>
            <dependency>
              <groupId>org.codehaus.groovy</groupId>
              <artifactId>groovy-eclipse-batch</artifactId>
              <version>${groovy-eclipse-batch.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${maven-clean-plugin.version}</version>
          <configuration>
            <filesets>
              <fileset>
                <directory>${project.basedir}/bin</directory>
                <followSymlinks>false</followSymlinks>
                <useDefaultExcludes>true</useDefaultExcludes>
              </fileset>
            </filesets>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven-failsafe-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${maven-dependency-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven-resources-plugin.version}</version>
          <configuration>
            <propertiesEncoding>${project.build.sourceEncoding}</propertiesEncoding>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven-deploy-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-shade-plugin</artifactId>
          <version>${maven-shade-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>flatten-maven-plugin</artifactId>
          <version>${flatten-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>${build-helper-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>${versions-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-help-plugin</artifactId>
          <version>${maven-help-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>${exec-maven-plugin.version}</version>
          <configuration>
            <inheritIo>true</inheritIo>
            <useMavenLogger>true</useMavenLogger>
          </configuration>
        </plugin>
        <!-- Bonita Project Maven Plugin definition -->
        <plugin>
          <groupId>org.bonitasoft.maven</groupId>
          <artifactId>bonita-project-maven-plugin</artifactId>
          <version>${bonita-project-maven-plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.bonitasoft.engine.data</groupId>
              <artifactId>bonita-business-data-generator</artifactId>
              <version>${bonita.runtime.version}</version>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft.web</groupId>
              <artifactId>ui-designer-artifact-builder</artifactId>
              <version>${ui-designer-artifact-builder.version}</version>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft.web</groupId>
              <artifactId>ui-designer-artifact-builder-common</artifactId>
              <version>${ui-designer-artifact-builder.version}</version>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft.web</groupId>
              <artifactId>ui-designer-artifact-builder-generator-angularjs</artifactId>
              <version>${ui-designer-artifact-builder.version}</version>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft.web</groupId>
              <artifactId>ui-designer-backend-migrationReport</artifactId>
              <version>${ui-designer-artifact-builder.version}</version>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft.web</groupId>
              <artifactId>ui-designer-artifact-builder-model</artifactId>
              <version>${ui-designer-artifact-builder.version}</version>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft.bpm</groupId>
              <artifactId>org.bonitasoft.bonita2bar</artifactId>
              <version>${bonita-process-model.version}</version>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft.engine</groupId>
              <artifactId>bonita-business-archive</artifactId>
              <version>${bonita-artifacts-model.version}</version>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft.engine</groupId>
              <artifactId>bonita-form-mapping-model</artifactId>
              <version>${bonita-artifacts-model.version}</version>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft.engine</groupId>
              <artifactId>bonita-process-definition-model</artifactId>
              <version>${bonita-artifacts-model.version}</version>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft.engine</groupId>
              <artifactId>bonita-application-model</artifactId>
              <version>${bonita-artifacts-model.version}</version>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft.engine</groupId>
              <artifactId>bonita-business-object-model</artifactId>
              <version>${bonita-artifacts-model.version}</version>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft.engine</groupId>
              <artifactId>bonita-bdm-access-control-model</artifactId>
              <version>${bonita-artifacts-model.version}</version>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft.engine</groupId>
              <artifactId>bonita-profile-model</artifactId>
              <version>${bonita-artifacts-model.version}</version>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft.engine</groupId>
              <artifactId>bonita-organization-model</artifactId>
              <version>${bonita-artifacts-model.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <!-- Bonita Project assemblies definition -->
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${maven-assembly-plugin.version}</version>
          <executions>
            <!-- Assembly used to zip the BDM descriptor file (bom.xml) -->
            <execution>
              <id>bdm-descriptor-archive</id>
              <phase>package</phase>
              <configuration>
                <descriptorRefs>
                  <descriptorRef>bdm-assembly</descriptorRef>
                </descriptorRefs>
              </configuration>
            </execution>
            <!-- Assembly used to zip all Bonita artifacts -->
            <execution>
              <id>application-archive</id>
              <phase>package</phase>
              <configuration>
                <descriptorRefs>
                  <descriptorRef>application-assembly</descriptorRef>
                </descriptorRefs>
              </configuration>
            </execution>
            <!-- Assembly used to build the webapp classpath -->
            <execution>
              <id>application-classpath</id>
              <phase>package</phase>
              <configuration>
                <attach>false</attach>
                <finalName>classpath</finalName>
                <appendAssemblyId>false</appendAssemblyId>
                <descriptors>
                  <descriptor>${project.build.directory}/assemblies/classpath-assembly.xml</descriptor>
                </descriptors>
              </configuration>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>org.bonitasoft</groupId>
              <artifactId>bonita-project-assemblies</artifactId>
              <version>${bonita.runtime.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.codehaus.gmavenplus</groupId>
          <artifactId>gmavenplus-plugin</artifactId>
          <version>${gmavenplus-plugin.version}</version>
          <executions>
            <!-- Transform and initialize project properties used to build and package Bonita artifacts -->
            <execution>
              <id>bonita-project-properties</id>
              <phase>initialize</phase>
              <configuration>
                <scripts>
                  <script>def project = properties.project
                    def environment = properties.'bonita.environment'
                    lcBonitaEnv = environment == null ? 'local' : environment.toLowerCase()
                    project.properties.setProperty('bonita.environment:lowercase', lcBonitaEnv)
                    project.properties.setProperty('project.artifactId:lowercase', project.artifactId.toLowerCase())</script>
                </scripts>
              </configuration>
            </execution>
            <!-- Generate 'application.properties' file containing information (e.g. app's version) used to deploy the app -->
            <execution>
              <id>generate-application-properties</id>
              <phase>generate-resources</phase>
              <configuration>
                <scripts>
                  <script>def project = properties.project
                    def propsFile = new File(project.build.directory, 'application.properties')
                    propsFile.delete()
                    propsFile.getParentFile().mkdirs()
                    propsFile.createNewFile()
                    def applicationProperties = new Properties()
                    applicationProperties.setProperty('version', project.version)
                    propsFile.withWriter { out -&gt;
                      applicationProperties.each { it -&gt;
                        out &lt;&lt; it &lt;&lt; System.lineSeparator()
                      }
                    }</script>
                </scripts>
              </configuration>
            </execution>
            <!-- Generate 'classpath-assembly.xml' file use to add additional dependencies in the webapp classpath -->
            <execution>
              <id>generate-classpath-assembly</id>
              <phase>prepare-package</phase>
              <configuration>
                <scripts>
                  <script>import groovy.json.JsonSlurper
                    import groovy.xml.XmlSlurper
                    import groovy.xml.XmlUtil 
                    import org.slf4j.LoggerFactory                    
                    
                    def log = LoggerFactory.getLogger(getClass())
                    def project = properties.project
                    
                    // Classpath assembly templating
                    def assembliesFolder = new File(project.build.directory, 'assemblies')
                    assembliesFolder.mkdirs()
                    def assemblyFile = new File(assembliesFolder, 'classpath-assembly.xml')
                    assemblyFile.delete()
                    assemblyFile.createNewFile()
                    def is = getClass().getResourceAsStream("/assemblies/${assemblyFile.name}")
                    assemblyFile.append(is)
                    is.close()
                    
                    def dependencyReportFile = new File(project.build.directory, 'bonita-dependencies.json')
                    if(dependencyReportFile.exists()){
                        def report = new JsonSlurper().parse(dependencyReportFile)
                        // Excluding Bonita connectors and actor filters artifacts
                        def implementations = report.connectorImplementations + report.filterImplementations
                        def excludedArtifacts =  implementations.collect { impl -&gt; "${impl.artifact.groupId}:${impl.artifact.artifactId}" }.unique()
                        if(excludedArtifacts){
                            def assembly = new XmlSlurper(false,false).parseText(assemblyFile.text)
                            excludedArtifacts.each{ artifact -&gt;
                                assembly.dependencySets.dependencySet.excludes[0].appendNode{
                                    log.info "Excluding $artifact from webapp classpath"
                                    exclude(artifact)
                                } 
                            }
                            assemblyFile.write(XmlUtil.serialize(assembly))
                        }
                    }</script>
                </scripts>
              </configuration>
            </execution>
            <!-- Copy Docker resources located in bonita-project-assemblies used to package the app as a Docker image -->
            <execution>
              <id>generate-docker-resources</id>
              <phase>generate-resources</phase>
              <configuration>
                <scripts>
                  <script>def dockerOutput = new File(properties.project.build.directory)
                    dockerOutput.mkdirs()

                    // Copy resources from the bonita-project-assemblies resources jar
                    def resourceList = ['Dockerfile']
                    resourceList.each { name -&gt;
                      def file = new File(dockerOutput, name)
                      file.createNewFile()
                      def is = getClass().getResourceAsStream("/docker/$name")
                      file.append(is)
                      is.close()
                    }</script>
                </scripts>
              </configuration>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>org.codehaus.groovy</groupId>
              <artifactId>groovy-json</artifactId>
              <version>${groovy.version}</version>
              <scope>runtime</scope>
            </dependency>
            <dependency>
              <groupId>org.codehaus.groovy</groupId>
              <artifactId>groovy-xml</artifactId>
              <version>${groovy.version}</version>
              <scope>runtime</scope>
            </dependency>
            <dependency>
              <groupId>org.codehaus.groovy</groupId>
              <artifactId>groovy-ant</artifactId>
              <version>${groovy.version}</version>
              <scope>runtime</scope>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft</groupId>
              <artifactId>bonita-project-assemblies</artifactId>
              <version>${bonita.runtime.version}</version>
              <scope>runtime</scope>
            </dependency>
            <dependency>
              <groupId>org.bonitasoft.engine</groupId>
              <artifactId>bonita-application-model</artifactId>
              <version>${bonita-artifacts-model.version}</version>
              <scope>runtime</scope>
            </dependency>
          </dependencies>
          <configuration>
            <bindAllProjectProperties>true</bindAllProjectProperties>
            <bindAllSessionUserProperties>true</bindAllSessionUserProperties>
            <bindPropertiesToSeparateVariables>false</bindPropertiesToSeparateVariables>
          </configuration>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.gmavenplus</groupId>
                    <artifactId>gmavenplus-plugin</artifactId>
                    <versionRange>[3.0,)</versionRange>
                    <goals>
                      <goal>execute</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <versionRange>[3.0,)</versionRange>
                    <goals>
                      <goal>add-source</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute>
                      <runOnIncremental>false</runOnIncremental>
                      <runOnConfiguration>true</runOnConfiguration>
                    </execute>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <!-- Execute Bonita artifacts validation -->
      <plugin>
        <groupId>org.bonitasoft.maven</groupId>
        <artifactId>bonita-project-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>validate-artifacts</id>
            <goals>
              <goal>validate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <!-- Profile used to package the app as a Bundle Tomcat -->
    <profile>
      <id>bundle</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-dependency-plugin</artifactId>
              <version>${maven-dependency-plugin.version}</version>
              <executions>
                <!-- Unpack community bundle -->
                <execution>
                  <id>prepare-bundle</id>
                  <phase>process-resources</phase>
                  <configuration>
                    <artifactItems>
                      <artifactItem>
                        <groupId>org.bonitasoft.distrib</groupId>
                        <artifactId>bundle-tomcat</artifactId>
                        <version>${bonita.runtime.version}</version>
                        <type>zip</type>
                        <outputDirectory>${project.build.directory}/bundle</outputDirectory>
                      </artifactItem>
                    </artifactItems>
                  </configuration>
                </execution>
                <!-- Unpack enterprise bundle -->
                <execution>
                  <id>prepare-bundle-enterprise</id>
                  <phase>process-resources</phase>
                  <configuration>
                    <artifactItems>
                      <artifactItem>
                        <groupId>com.bonitasoft.distrib</groupId>
                        <artifactId>bundle-tomcat-sp</artifactId>
                        <version>${bonita.runtime.version}</version>
                        <type>zip</type>
                        <outputDirectory>${project.build.directory}/bundle</outputDirectory>
                      </artifactItem>
                    </artifactItems>
                  </configuration>
                </execution>
              </executions>
            </plugin>
            <plugin>
              <artifactId>maven-assembly-plugin</artifactId>
              <version>${maven-assembly-plugin.version}</version>
              <executions>
                <!-- Assembly definition for the Community edition -->
                <execution>
                  <id>bundle-archive</id>
                  <phase>package</phase>
                  <configuration>
                    <descriptorRefs>
                      <descriptorRef>bundle-tomcat-assembly</descriptorRef>
                    </descriptorRefs>
                  </configuration>
                </execution>
                <!-- Assembly definition for the Enterprise edition -->
                <execution>
                  <id>bundle-archive-enterprise</id>
                  <phase>package</phase>
                  <configuration>
                    <descriptorRefs>
                      <descriptorRef>bundle-tomcat-sp-assembly</descriptorRef>
                    </descriptorRefs>
                  </configuration>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <!-- Profile used to package the app as a Docker image -->
    <profile>
      <id>docker</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>exec-maven-plugin</artifactId>
              <executions>
                <execution>
                  <id>build-image</id>
                  <phase>package</phase>
                  <configuration>
                    <workingDirectory>${project.build.directory}</workingDirectory>
                    <executable>docker</executable>
                    <commandlineArgs>${docker.buildArgLine}</commandlineArgs>
                  </configuration>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
      <properties>
        <docker.buildArgs/>
        <docker.imageRepository>${project.artifactId:lowercase}-${bonita.environment:lowercase}</docker.imageRepository>
        <docker.baseImage>${docker.baseImageRepository}:${docker.baseImageVersion}</docker.baseImage>
        <docker.imageName>${docker.imageRepository}:${project.version}</docker.imageName>
        <docker.buildArgLine>build "." --build-arg ARTIFACT_FINAL_NAME=${project.build.finalName} --build-arg BONITA_ENVIRONMENT=${bonita.environment:lowercase} --build-arg BONITA_BASE_IMAGE="${docker.baseImage}" ${docker.buildArgs} --tag "${docker.imageName}"</docker.buildArgLine>
        <docker.baseImageRepository>bonita</docker.baseImageRepository>
        <docker.baseImageVersion>${bonita.runtime.version}</docker.baseImageVersion>
      </properties>
    </profile>
  </profiles>
</project>