<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (c) 2008-2012 EBM WebSourcing, 2012-2020 Linagora

 This program/library is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 2.1 of the License, or (at your
 option) any later version.

 This program/library is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with this program/library; If not, see http://www.gnu.org/licenses/
 for the GNU Lesser General Public License version 2.1.
-->
<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/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
      <groupId>org.ow2</groupId>
      <artifactId>ow2</artifactId>
      <version>1.5</version>
      <!-- Resolve the parent from the repositories <=> Set it empty. -->
      <relativePath />
   </parent>

   <name>Petals ESB - Root Parent POM</name>
   <groupId>org.ow2.petals</groupId>
   <artifactId>petals-root-parent</artifactId>
   <packaging>pom</packaging>
   <version>21.0.0.2</version>
   <inceptionYear>2005</inceptionYear>
   <description>The Petals Services Platform provides a distributed open source implementation of Java Business Integration (JBI) specification as a core element to build OW2 ESB solutions, leveraging existing Consortium's components.</description>
   <url>http://petals.ow2.org/</url>
   <organization>
      <name>Linagora</name>
      <url>http://www.linagora.com</url>
   </organization>
   <issueManagement>
      <url>http://jira.petalslink.com/</url>
   </issueManagement>
   <!-- Continuous integration -->
   <ciManagement>
      <system>jenkins</system>
      <url>http://jenkins.petalslink.com</url>
      <notifiers>
         <notifier>
            <type>mail</type>
            <configuration>
               <address>petals-dev@ow2.org</address>
            </configuration>
         </notifier>
      </notifiers>
   </ciManagement>
   <mailingLists>
      <mailingList>
         <name>PETALS General Development Mailing List</name>
         <subscribe>petals-dev-subscribe@ow2.org</subscribe>
         <unsubscribe>petals-dev-unsubscribe@ow2.org</unsubscribe>
         <archive>http://mail-archive.objectweb.org/petals-dev/index.html</archive>
      </mailingList>
      <mailingList>
         <name>PETALS Users Mailing List</name>
         <subscribe>petals-users-subscribe@ow2.org</subscribe>
         <unsubscribe>petals-users-unsubscribe@ow2.org</unsubscribe>
         <archive>http://mail-archive.objectweb.org/petals-users/index.html</archive>
      </mailingList>
      <mailingList>
         <name>Petals Source Code Notification</name>
         <subscribe>petals-commits-subscribe@ow2.org</subscribe>
         <unsubscribe>petals-commits-unsubscribe@ow2.org</unsubscribe>
         <archive>http://mail-archive.objectweb.org/petals-commits/index.html</archive>
      </mailingList>
   </mailingLists>

   <licenses>
      <!-- By default we set the following license. Each products must overwrite it -->
      <license>
         <name>New BSD License (3-clause license)</name>
         <url>http://opensource.org/licenses/BSD-3-Clause</url>
      </license>
   </licenses>

   <developers>
      <developer>
         <name>Christophe Hamerling</name>
         <id>chamerling</id>
         <email>christophe.hamerling@ebmwebsourcing.com</email>
         <url>http://www.ebmwebsourcing.com/chamerling</url>
         <organization>EBM WebSourcing</organization>
         <organizationUrl>
				http://www.ebmwebsourcing.com
			</organizationUrl>
         <roles>
            <role>Developer</role>
         </roles>
         <timezone>+1</timezone>
      </developer>
      <developer>
         <name>Christophe DENEUX</name>
         <email>christophe.deneux@capgemini.com</email>
         <id>cdeneux</id>
         <organization>Capgemini Sud</organization>
         <organizationUrl>http://www.capgemini.com</organizationUrl>
         <roles>
            <role>Maven Reviewer</role>
            <role>Code Reviewer</role>
            <role>Developer</role>
         </roles>
         <timezone>+1</timezone>
      </developer>
      <developer>
         <name>Roland NAUDIN</name>
         <email>roland.naudin@ebmwebsourcing.com</email>
         <id>rnaudin</id>
         <organization>EBM WebSourcing</organization>
         <organizationUrl>http://www.ebmwebsourcing.com</organizationUrl>
         <roles>
            <role>Developer</role>
         </roles>
         <timezone>+1</timezone>
      </developer>
      <developer>
         <name>Charles CASADEI</name>
         <email>charles.casadei@petalslink.com</email>
         <id>ccasadei</id>
         <organization>EBM WebSourcing</organization>
         <organizationUrl>http://www.ebmwebsourcing.com</organizationUrl>
         <roles>
            <role>Developer</role>
         </roles>
         <timezone>+1</timezone>
      </developer>
      <developer>
         <name>Mohammed ELJAI</name>
         <email>mohammed.eljai@petalslink.com</email>
         <id>meljai</id>
         <organization>EBM WebSourcing</organization>
         <organizationUrl>http://www.ebmwebsourcing.com</organizationUrl>
         <roles>
            <role>Developer</role>
         </roles>
         <timezone>+1</timezone>
      </developer>
      <developer>
         <name>Mathieu CARROLLE</name>
         <email>mathieu.carrolle@petalslink.com</email>
         <id>mcarrolle</id>
         <organization>EBM WebSourcing</organization>
         <organizationUrl>http://www.ebmwebsourcing.com</organizationUrl>
         <roles>
            <role>Developer</role>
         </roles>
         <timezone>+1</timezone>
      </developer>
      <developer>
         <name>Mathias Beldame</name>
         <email>mathias.beldame@petalslink.com</email>
         <id>mbeldame</id>
         <organization>Petals Link</organization>
         <organizationUrl>http://www.petalslink.com</organizationUrl>
         <roles>
            <role>Developer</role>
         </roles>
         <timezone>+1</timezone>
      </developer>
      <developer>
         <name>Sebastien ANDRE</name>
         <email>sebastien.andre@petalslink.com</email>
         <id>sandre</id>
         <organization>Petals Link</organization>
         <organizationUrl>http://www.petalslink.com</organizationUrl>
         <roles>
            <role>Maven Reviewer</role>
         </roles>
         <timezone>+1</timezone>
      </developer>
      <developer>
         <name>Nicolas ODDOUX</name>
         <email>nicolas.oddoux@petalslink.com</email>
         <id>noddoux</id>
         <organization>Petals Link</organization>
         <organizationUrl>http://www.petalslink.com</organizationUrl>
         <roles>
            <role>Developer</role>
         </roles>
         <timezone>+1</timezone>
      </developer>
      <developer>
         <name>vincent ZURCZAK</name>
         <email>vincent.zurczak@petalslink.com</email>
         <id>vzurczak</id>
         <organization>Petals Link</organization>
         <organizationUrl>http://www.petalslink.com</organizationUrl>
         <roles>
            <role>Developer</role>
         </roles>
         <timezone>+1</timezone>
      </developer>
   </developers>
   <contributors>
      <contributor>
         <name>Frederic GARDES</name>
         <email>frederic.gardes@orange-ftgroup.com</email>
         <organization>Orange France Telecom</organization>
         <organizationUrl>
				http://www.orange.com/fr_FR/
			</organizationUrl>
         <roles>
            <role>Developer</role>
         </roles>
         <timezone>+1</timezone>
      </contributor>
   </contributors>

   <properties>
      <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>

      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

      <maven-enforcer-plugin.rules.scm>true</maven-enforcer-plugin.rules.scm>
      <maven-enforcer-plugin.rules.dependency>true</maven-enforcer-plugin.rules.dependency>
      <maven-enforcer-plugin.rules.bannedDependencies>true</maven-enforcer-plugin.rules.bannedDependencies>
      <maven-enforcer-plugin.rules.upperBound>true</maven-enforcer-plugin.rules.upperBound>
      <maven-enforcer-plugin.rules.legalFiles>true</maven-enforcer-plugin.rules.legalFiles>
      <maven-enforcer-plugin.rules.maven>true</maven-enforcer-plugin.rules.maven>
      <duplicate-finder.fail>true</duplicate-finder.fail>
      <maven-dependency-plugin.ignoreNonCompile>false</maven-dependency-plugin.ignoreNonCompile>
      <maven-dependency-plugin.failOnWarning>true</maven-dependency-plugin.failOnWarning>
      
      <!--
         According to your copyright use the following values:
           - LGPL v2.1 : petals-copyright-lgplv21-regexp-file
           - "3-clause" BSD: petals-copyright-bsd3-regexp-file
       -->
      <checkstyle-copyright-regexp>petals-copyright-lgplv21-regexp-file</checkstyle-copyright-regexp>

      <!--
         According to your license use the following values:
           - LGPL v2.1 : petals-license-lgplv21-regexp-file
           - "3-clause" BSD: petals-license-bsd3-regexp-file
       -->
      <checkstyle-license-regexp>petals-license-lgplv21-regexp-file</checkstyle-license-regexp>

      <java-version>1.8</java-version>
      <java-short-version>8</java-short-version>
      <maven.compiler.source>${java-version}</maven.compiler.source>
      <maven.compiler.target>${java-version}</maven.compiler.target>
      <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
      <maven.compiler.showWarnings>true</maven.compiler.showWarnings>

      <jaxb2-basics.version>0.11.1</jaxb2-basics.version>
   </properties>

   <dependencyManagement>
      <dependencies>
         <!-- These dependencies all pertains to the Java version used in Petals and the Easy* -->
         <dependency>
            <groupId>com.sun.mail</groupId>
            <artifactId>javax.mail</artifactId>
            <version>1.5.6</version>
         </dependency>
         <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-xjc</artifactId>
            <version>2.2.11</version>
         </dependency>
         <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.2.11</version>
            <exclusions>
               <exclusion>
                  <!-- Already in Java 7 -->
                  <artifactId>jaxb-api</artifactId>
                  <groupId>javax.xml.bind</groupId>
               </exclusion>
            </exclusions>
         </dependency>
         <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-core</artifactId>
            <version>2.2.11</version>
         </dependency>
         <dependency>
            <groupId>org.jvnet.jaxb2_commons</groupId>
            <artifactId>jaxb2-basics-runtime</artifactId>
            <version>${jaxb2-basics.version}</version>
         </dependency>
      </dependencies>
   </dependencyManagement>

   <build>
      <plugins>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>buildnumber-maven-plugin</artifactId>
            <version>1.0</version>
            <executions>
               <execution>
                  <phase>validate</phase>
                  <goals>
                     <goal>create</goal>
                  </goals>
               </execution>
            </executions>
            <configuration>
               <items>
                  <item>timestamp</item>
               </items>
               <doCheck>false</doCheck>
               <doUpdate>false</doUpdate>
               <revisionOnScmFailure>undefined</revisionOnScmFailure>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.0.0-M2</version>
            <dependencies>
               <dependency>
                  <groupId>org.ow2.petals</groupId>
                  <artifactId>petals-enforcer-rules</artifactId>
                  <version>1.0.6</version>
               </dependency>
               <dependency>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>extra-enforcer-rules</artifactId>
                  <version>1.2</version>
               </dependency>
            </dependencies>
            <executions>
               <execution>
                  <id>enforce-java</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <rules>
                        <requireJavaVersion>
                           <version>[1.8,)</version>
                           <message>Uses Java 8 as it is the Petals supported Java and a different version can badly
                              interacts with some of the Maven Plugin used.</message>
                        </requireJavaVersion>
                        <enforceBytecodeVersion>
                           <maxJdkVersion>1.8</maxJdkVersion>
                        </enforceBytecodeVersion>
                     </rules>
                  </configuration>
               </execution>
               <execution>
                  <id>enforce-maven</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <fail>${maven-enforcer-plugin.rules.maven}</fail>
                     <rules>
                        <requireMavenVersion>
                           <version>[3.3.9,)</version>
                           <message>Uses Maven 3.3.9 or upper.</message>
                        </requireMavenVersion>
                     </rules>
                  </configuration>
               </execution>
               <execution>
                  <id>enforce-petals-dedicated</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <rules>
                        <ScmConnectionMustMatchSvnEntriesIfAny implementation="org.ow2.petals.development.enforcer.rules.ScmConnectionMustMatchRealScmUrlIfAny">
                           <shouldIFail>${maven-enforcer-plugin.rules.scm}</shouldIFail>
                        </ScmConnectionMustMatchSvnEntriesIfAny>
                        <ScmDevelopperConnectionMustMatchSvnEntriesIfAny implementation="org.ow2.petals.development.enforcer.rules.ScmDeveloperConnectionMustMatchRealScmUrlIfAny">
                           <shouldIFail>${maven-enforcer-plugin.rules.scm}</shouldIFail>
                        </ScmDevelopperConnectionMustMatchSvnEntriesIfAny>
                     </rules>
                  </configuration>
               </execution>
               <execution>
                  <id>enforce-no-shapshots-when-release</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <rules>
                        <requireReleaseDeps>
                           <message>No Snapshots allowed when doing a Release</message>
                           <onlyWhenRelease>true</onlyWhenRelease>
                        </requireReleaseDeps>
                     </rules>
                  </configuration>
               </execution>
               <execution>
                  <id>enforce-buggy-banned-deps</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <fail>${maven-enforcer-plugin.rules.bannedDependencies}</fail>
                     <rules>
                        <bannedDependencies>
                           <excludes>
                              <!-- Apache Commons Pool contains a memory leak in its versions 1.x. Version 2.5 is required -->
                              <exclude>commons-pool:commons-pool</exclude>
                           </excludes>
                           <message>These dependencies are banned because they contains defaults (memory leak or encounterred bugs)</message>
                        </bannedDependencies>
                     </rules>
                  </configuration>
               </execution>
               <execution>
                  <id>enforce-java8-banned-deps</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <fail>${maven-enforcer-plugin.rules.bannedDependencies}</fail>
                     <rules>
                        <bannedDependencies>
                           <excludes>
                              <exclude>javax.activation:activation</exclude>
                              <exclude>org.apache.geronimo.specs:geronimo-activation_1.0.2_spec</exclude>
                              <exclude>org.apache.geronimo.specs:geronimo-activation_1.1_spec</exclude>

                              <exclude>org.apache.geronimo.specs:geronimo-annotation_1.0_spec</exclude>

                              <exclude>org.apache.geronimo.specs:geronimo-jaxws_2.1_spec</exclude>
                              <exclude>org.apache.geronimo.specs:geronimo-jaxws_2.2_spec</exclude>
                              <exclude>javax.xml.ws:jaxws-api</exclude>

                              <exclude>javax.jws:jsr181-api</exclude>

                              <exclude>org.apache.geronimo.specs:geronimo-saaj_1.1_spec</exclude>
                              <exclude>org.apache.geronimo.specs:geronimo-saaj_1.3_spec</exclude>
                              <exclude>javax.xml.soap:saaj-api</exclude>
                              <exclude>com.sun.xml.messaging.saaj:saaj-impl</exclude>

                              <exclude>org.apache.geronimo.specs:geronimo-ws-metadata_2.0_spec</exclude>

                              <exclude>xerces:xercesImpl</exclude>
                              <exclude>xerces:xmlParserAPIs</exclude>

                              <exclude>org.apache.xerces:xml-apis</exclude>
                              <exclude>xml-apis:xml-apis</exclude>

                              <exclude>org.apache.geronimo.specs:geronimo-stax-api_1.0_spec</exclude>
                              <exclude>org.apache.geronimo.specs:geronimo-stax-api_1.2_spec</exclude>
                              <exclude>javax.xml.bind:jsr173_api</exclude>
                              <exclude>stax:stax-api</exclude>
                              <exclude>javax.xml.stream:stax-api</exclude>

                              <exclude>org.apache.xalan:xalan</exclude>
                              <exclude>xalan:xalan</exclude>

                              <exclude>javax.xml.bind:jaxb-api</exclude>
                           </excludes>
                           <message>These dependencies are already present in Java 8</message>
                        </bannedDependencies>
                     </rules>
                  </configuration>
               </execution>
               <execution>
                  <id>enforce-ebm-banned-deps</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <rules>
                        <bannedDependencies>
                           <excludes>
                              <exclude>com.ebmwebsourcing.easycommons</exclude>
                           </excludes>

                           <message>These dependencies were migrated to org.ow2.easycommons. Exclude them and add
                              explicit dependency to the correct one in your project.</message>
                        </bannedDependencies>
                     </rules>
                  </configuration>
               </execution>
               <execution>
                  <id>enforce-no-circular-deps</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <rules>
                        <banCircularDependencies />
                     </rules>
                  </configuration>
               </execution>
               <execution>
                  <id>enforce-petals-dedicated-deps</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <fail>${maven-enforcer-plugin.rules.dependency}</fail>
                     <rules>
                        <DependencyConvergence />
                     </rules>
                  </configuration>
               </execution>
               <execution>
                  <id>enforce-upper-bound-deps</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <fail>${maven-enforcer-plugin.rules.upperBound}</fail>
                     <rules>
                        <requireUpperBoundDeps />
                     </rules>
                  </configuration>
               </execution>
               <execution>
                  <id>enforce-legal-files</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <fail>${maven-enforcer-plugin.rules.legalFiles}</fail>
                     <rules>
                        <requireFilesExist>
                           <files>
                              <!--
                                  The file LICENSE can be generated using the goal 'update-project-license'
                                  of license-maven-plugin:
                                     mvn license:update-project-license -Dlicense.licenceFile=LICENSE -Dlicense.licenseName=lgpl_v2_1
                               -->
                              <file>LICENSE</file>
                              <file>COPYRIGHT</file>
                           </files>
                        </requireFilesExist>
                     </rules>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.basepom.maven</groupId>
            <artifactId>duplicate-finder-maven-plugin</artifactId>
            <version>1.3.0</version>
            <executions>
               <execution>
                  <id>enforce-no-duplicate-classes</id>
                  <goals>
                     <goal>check</goal>
                  </goals>
                  <configuration>
                     <failBuildInCaseOfDifferentContentConflict>${duplicate-finder.fail}</failBuildInCaseOfDifferentContentConflict>
                     <!-- Disable for now, too much errors -->
                     <!--includeBootClasspath>true</includeBootClasspath-->
                     <printEqualFiles>true</printEqualFiles>
                     <ignoredResourcePatterns>
                        <!-- No need to worry about jaxb2 binding files, they are used by maven-jaxb2-plugin only -->
                        <ignoredResourcePattern>.*\.xjb$</ignoredResourcePattern>
                        <!-- neither catalog files, they are used by maven-jaxb2-plugin only (to be on the safe side, we don't ignore ALL .cat files) -->
                        <ignoredResourcePattern>(.*/)?catalog\.cat$</ignoredResourcePattern>
                        <!-- Some dependencies have these in duplicates, it's not important -->
                        <ignoredResourcePattern>.*about\.html$</ignoredResourcePattern>
                     </ignoredResourcePatterns>
                     <exceptions>
                        <exception>
                           <conflictingDependencies>
                              <dependency>
                                 <groupId>org.ow2.petals</groupId>
                                 <artifactId>jbi-adapter-impl</artifactId>
                                 <type>test-jar</type>
                                 <scope>test</scope>
                              </dependency>
                           </conflictingDependencies>
                           <!-- Current project is the actual project being checked, not this parent pom -->
                           <currentProject>true</currentProject>
                           <resources>
                              <!-- This is needed in jbi-adapter-impl but it is present in BC and SE also
                                   and their tests need jbi-adapter-impl
                                   TODO remove the file from jbi-adapter-impl if possible
                                   this threatens the stability of the test if the wrong jbi.xml is used -->
                              <resource>/jbi/jbi.xml</resource>
                           </resources>
                        </exception>
                        <exception>
                           <conflictingDependencies>
                              <dependency>
                                 <groupId>org.ow2.petals</groupId>
                                 <artifactId>petals-cdk-junit</artifactId>
                                 <scope>test</scope>
                              </dependency>
                           </conflictingDependencies>
                           <!-- Current project is the actual project being checked, not this parent pom -->
                           <currentProject>true</currentProject>
                           <resources>
                              <!-- It makes sense to override it for tests -->
                              <resource>/logging.properties</resource>
                           </resources>
                        </exception>
                     </exceptions>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.10</version>
            <executions>
               <execution>
                  <id>analyze</id>
                  <phase>process-test-classes</phase>
                  <goals>
                     <!-- analyze-only uses the compiled classes (analyze will compile then itself!) -->
                     <goal>analyze-only</goal>
                  </goals>
                  <configuration>
                     <ignoreNonCompile>${maven-dependency-plugin.ignoreNonCompile}</ignoreNonCompile>
                     <failOnWarning>${maven-dependency-plugin.failOnWarning}</failOnWarning>
                     <ignoredUnusedDeclaredDependencies>
                        <!-- That's often used at runtime and not used at compilation time -->
                        <ignoredUnusedDeclaredDependency>org.slf4j:slf4j-jdk14</ignoredUnusedDeclaredDependency>
                        <!-- Let's ignore that because it is used at runtime by surefire if jacoco is enabled -->
                        <ignoredUnusedDeclaredDependency>org.sonarsource.java:sonar-jacoco-listeners</ignoredUnusedDeclaredDependency>
                     </ignoredUnusedDeclaredDependencies>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>2.17</version>
            <executions>
               <execution>
                  <id>check-header</id>
                  <!-- let's do it at validate to prevent generated sources to be covered -->
                  <phase>validate</phase>
                  <goals>
                     <goal>check</goal>
                  </goals>
                  <configuration>
                     <configLocation>petals-checkstyle-rules.xml</configLocation>
                     <headerLocation>${checkstyle-copyright-regexp}.txt</headerLocation>

                     <consoleOutput>true</consoleOutput>
                     <logViolationsToConsole>true</logViolationsToConsole>

                     <includeResources>true</includeResources>
                     <includeTestSourceDirectory>true</includeTestSourceDirectory>
                     <includeTestResources>true</includeTestResources>
                     <includes>**/*</includes>
                     <resourceIncludes>**/*</resourceIncludes>
                     <!--
                        We exclude following resources:
                         - JAR, class, ZIP, other binary files and log files used for unit tests
                         - Licence and note files
                         - Man pages sources
                         - Keystores, certificate, keys
			 - Images
                         - SCM files
                     -->
		     <resourceExcludes>**/*.jar,**/*.class,**/*.zip,**/*.bin,**/LICENSE.txt,**/NOTE,**/*.log,**/*_provideFlowStepBegin.xml,**/*_provideFlowStepEnd.xml,**/*_provideFlowStepFailure.xml,**/man1/*.1,**/man5/*.5,**/man7/*.7,**/*.jks,**/id_rsa*,**/known_hosts,**/*.jpg,**/*.png,**/*.crt,**/*.pem,**/.gitignore</resourceExcludes>
                  </configuration>
               </execution>
               <execution>
                  <id>check-header-pom-file</id>
                  <phase>validate</phase>
                  <goals>
                     <goal>check</goal>
                  </goals>
                  <configuration>
                     <configLocation>petals-checkstyle-rules.xml</configLocation>
                     <headerLocation>${checkstyle-copyright-regexp}.txt</headerLocation>

                     <consoleOutput>true</consoleOutput>
                     <logViolationsToConsole>true</logViolationsToConsole>

                     <sourceDirectory>${basedir}</sourceDirectory>
                     <includes>/pom.xml</includes>
                     <includeResources>false</includeResources>
                     <includeTestSourceDirectory>false</includeTestSourceDirectory>
                     <includeTestResources>false</includeTestResources>
                  </configuration>
               </execution>
               <execution>
                  <id>check-header-ant-source-files</id>
                  <phase>validate</phase>
                  <goals>
                     <goal>check</goal>
                  </goals>
                  <configuration>
                     <configLocation>petals-checkstyle-rules.xml</configLocation>
                     <headerLocation>${checkstyle-copyright-regexp}.txt</headerLocation>

                     <consoleOutput>true</consoleOutput>
                     <logViolationsToConsole>true</logViolationsToConsole>

                     <sourceDirectory>${basedir}/src/main/ant</sourceDirectory>
                     <includes>/**/*</includes>
                     <includeResources>false</includeResources>
                     <includeTestSourceDirectory>false</includeTestSourceDirectory>
                     <includeTestResources>false</includeTestResources>
                  </configuration>
               </execution>
               <execution>
                  <id>check-header-jbi-source-files</id>
                  <phase>validate</phase>
                  <goals>
                     <goal>check</goal>
                  </goals>
                  <configuration>
                     <configLocation>petals-checkstyle-rules.xml</configLocation>
                     <headerLocation>${checkstyle-copyright-regexp}.txt</headerLocation>

                     <consoleOutput>true</consoleOutput>
                     <logViolationsToConsole>true</logViolationsToConsole>

                     <sourceDirectory>${basedir}/src/main/jbi</sourceDirectory>
                     <includes>/**/*</includes>
                     <includeResources>false</includeResources>
                     <includeTestSourceDirectory>false</includeTestSourceDirectory>
                     <includeTestResources>false</includeTestResources>
                     <!--
                        We exclude following content:
                         - JAR files
                     -->
		     <excludes>**/*.jar,**/*.jks</excludes>
                  </configuration>
               </execution>
               <execution>
                  <id>check-header-assembly-files</id>
                  <phase>validate</phase>
                  <goals>
                     <goal>check</goal>
                  </goals>
                  <configuration>
                     <configLocation>petals-checkstyle-rules.xml</configLocation>
                     <headerLocation>${checkstyle-copyright-regexp}.txt</headerLocation>

                     <consoleOutput>true</consoleOutput>
                     <logViolationsToConsole>true</logViolationsToConsole>

                     <sourceDirectory>${basedir}/src/main/assembly</sourceDirectory>
                     <includes>/**/*</includes>
                     <includeResources>false</includeResources>
                     <includeTestSourceDirectory>false</includeTestSourceDirectory>
                     <includeTestResources>false</includeTestResources>
                  </configuration>
               </execution>
               <execution>
                  <id>check-copyright-file</id>
                  <phase>validate</phase>
                  <goals>
                     <goal>check</goal>
                  </goals>
                  <configuration>
                     <configLocation>petals-checkstyle-rules.xml</configLocation>
                     <headerLocation>${checkstyle-copyright-regexp}.txt</headerLocation>

                     <consoleOutput>true</consoleOutput>
                     <logViolationsToConsole>true</logViolationsToConsole>

                     <sourceDirectory>${basedir}</sourceDirectory>
                     <includes>/COPYRIGHT</includes>
                     <includeResources>false</includeResources>
                     <includeTestSourceDirectory>false</includeTestSourceDirectory>
                     <includeTestResources>false</includeTestResources>
                  </configuration>
               </execution>
               <execution>
                  <!-- Checking the file 'LICENSE' permits to check the copyright dates for "3-clause" BSD license -->
                  <id>check-license-file</id>
                  <phase>validate</phase>
                  <goals>
                     <goal>check</goal>
                  </goals>
                  <configuration>
                     <configLocation>petals-checkstyle-rules.xml</configLocation>
                     <headerLocation>${checkstyle-license-regexp}.txt</headerLocation>

                     <consoleOutput>true</consoleOutput>
                     <logViolationsToConsole>true</logViolationsToConsole>

                     <sourceDirectory>${basedir}</sourceDirectory>
                     <includes>/LICENSE</includes>
                     <includeResources>false</includeResources>
                     <includeTestSourceDirectory>false</includeTestSourceDirectory>
                     <includeTestResources>false</includeTestResources>
                  </configuration>
               </execution>
            </executions>
            <dependencies>
               <dependency>
                  <groupId>org.ow2.petals</groupId>
                  <artifactId>petals-checkstyle-rules</artifactId>
                  <version>1.0.8</version>
               </dependency>
               <dependency>
                  <!-- Latest version -->
                  <groupId>com.puppycrawl.tools</groupId>
                  <artifactId>checkstyle</artifactId>
                  <version>6.19</version>
               </dependency>
            </dependencies>
         </plugin>
         <plugin>
            <!-- attach sources also with SNAPSHOTs (it is enabled in profile ow2-release) -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven-source-plugin.version}</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
         </plugin>
         <plugin>
            <!-- Attach Javadoc also with SNAPSHOTs (it is enabled in profile ow2-release.
                 Javadoc generator of JRE 8 is more strict, and can fail. So this check the
                 Javadoc on each build -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${maven-javadoc-plugin.version}</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
              <execution>
                <id>attach-test-javadocs</id>
                <goals>
                  <goal>test-jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
      </plugins>
      <pluginManagement>
         <plugins>
            <plugin>
               <artifactId>maven-deploy-plugin</artifactId>
               <version>2.8.2</version>
               <configuration>
                  <!-- Sometimes OW2 servers have problems and retry is needed -->
                  <retryFailedDeploymentCount>3</retryFailedDeploymentCount>
                  <!-- In case of multimodule build, let's deploy all in one go at the end to prevent half of the artefacts being deployed -->
                  <!-- Disabled for now because of: https://issues.apache.org/jira/browse/MDEPLOY-200 -->
                  <!--deployAtEnd>true</deployAtEnd-->
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-assembly-plugin</artifactId>
               <version>${maven-assembly-plugin.version}</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-antrun-plugin</artifactId>
               <version>1.7</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-compiler-plugin</artifactId>
               <version>3.2</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-install-plugin</artifactId>
               <version>2.5.2</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-clean-plugin</artifactId>
               <version>3.0.0</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-resources-plugin</artifactId>
               <version>2.7</version>
               <executions>
                  <!-- The default execution of the maven-resources-plugin is assumed by the
                       goal 'resources', here we just add specific resource processing. -->
                  <execution>
                     <id>process-license-for-jar</id>
                     <phase>process-resources</phase>
                     <goals>
                        <goal>copy-resources</goal>
                     </goals>
                     <configuration>
                        <outputDirectory>${project.build.outputDirectory}/META-INF</outputDirectory>
                        <resources>
                           <resource>
                              <directory>${basedir}</directory>
                              <includes>
                                 <include>LICENSE</include>
                                 <include>COPYRIGHT</include>
                              </includes>
                           </resource>
                        </resources>
                     </configuration>
                  </execution>
                  <execution>
                     <id>process-license-for-test-jar</id>
                     <phase>process-test-resources</phase>
                     <goals>
                        <goal>copy-resources</goal>
                     </goals>
                     <configuration>
                        <outputDirectory>${project.build.testOutputDirectory}/META-INF</outputDirectory>
                        <resources>
                           <resource>
                              <directory>${basedir}</directory>
                              <includes>
                                 <include>LICENSE</include>
                                 <include>COPYRIGHT</include>
                              </includes>
                           </resource>
                        </resources>
                     </configuration>
                  </execution>
               </executions>
            </plugin>
            <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>license-maven-plugin</artifactId>
               <version>1.8</version>
               <executions>
                  <execution>
                     <id>download-licenses</id>
                     <phase>prepare-package</phase>
                     <goals>
                        <goal>download-licenses</goal>
                     </goals>
                  </execution>
                  <execution>
                     <id>add-third-party</id>
                     <phase>prepare-package</phase>
                     <goals>
                        <goal>add-third-party</goal>
                     </goals>
                     <configuration>
                        <thirdPartyFilename>THIRD-PARTY</thirdPartyFilename>
                        <acceptPomPackaging>true</acceptPomPackaging>
                        <failIfWarning>true</failIfWarning>
                        <useMissingFile>true</useMissingFile>
                     </configuration>
                  </execution>
               </executions>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-surefire-plugin</artifactId>
               <version>2.19.1</version>
               <configuration>
                  <trimStackTrace>false</trimStackTrace>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-failsafe-plugin</artifactId>
               <version>2.19.1</version>
               <executions>
                  <execution>
                     <!-- maven-failsafe-plugin is not automatically bound to its phases like failsafe -->
                     <id>integration-test</id>
                     <goals>
                        <goal>integration-test</goal>
                        <!-- Note that the last phase is verify in order for
                             the post-integration-test phase to be run before
                             doing last checks -->
                        <goal>verify</goal>
                     </goals>
                  </execution>
               </executions>
               <configuration>
                  <trimStackTrace>false</trimStackTrace>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-jar-plugin</artifactId>
               <version>2.3.2</version>
               <configuration>
                  <archive>
                     <manifest>
                        <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                     </manifest>
                     <manifestEntries>
                        <Built-Date>${maven.build.timestamp}</Built-Date>
                        <SCM-Revision>${buildNumber}</SCM-Revision>
                        <SCM-Connection>${project.scm.connection}</SCM-Connection>
                     </manifestEntries>
                  </archive>
               </configuration>
               <executions>
                  <execution>
                     <!-- Add the execution of the maven-jar-plugin on test classes -->
                     <id>test-jar</id>
                     <goals>
                        <goal>test-jar</goal>
                     </goals>
                  </execution>
               </executions>
            </plugin>
            <plugin>
               <groupId>org.jvnet.jaxb2.maven2</groupId>
               <artifactId>maven-jaxb2-plugin</artifactId>
               <version>0.13.3</version>
               <executions>
                  <execution>
                     <id>generate</id>
                     <goals>
                        <goal>generate</goal>
                     </goals>
                  </execution>
               </executions>
               <configuration>
                  <extension>true</extension>
                  <args>
                     <!-- Careful not to add pluging that modify the behaviour of equals
                           or hashCode without properly evaluating the potential problems it introduces -->
                     <arg>-XtoString</arg>
                  </args>
                  <plugins>
                     <plugin>
                        <groupId>org.jvnet.jaxb2_commons</groupId>
                        <artifactId>jaxb2-basics</artifactId>
                        <version>${jaxb2-basics.version}</version>
                     </plugin>
                  </plugins>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>build-helper-maven-plugin</artifactId>
               <version>1.9.1</version>
            </plugin>
            <plugin>
               <groupId>org.eclipse.m2e</groupId>
               <artifactId>lifecycle-mapping</artifactId>
               <version>1.0.0</version>
               <configuration>
                  <lifecycleMappingMetadata>
                     <pluginExecutions>
                        <pluginExecution>
                           <pluginExecutionFilter>
                              <groupId>org.apache.maven.plugins</groupId>
                              <artifactId>maven-checkstyle-plugin</artifactId>
                              <versionRange>[2.15,)</versionRange>
                              <goals>
                                 <goal>check</goal>
                              </goals>
                           </pluginExecutionFilter>
                           <action>
                              <!-- TODO: Change to execute when Eclipse stops
                                   complaining about files in generated sources
                                   See: https://github.com/m2e-code-quality/m2e-code-quality/issues/72
                                   and also https://github.com/m2e-code-quality/m2e-code-quality/issues/71
                                   and https://github.com/m2e-code-quality/m2e-code-quality/pull/55 -->
                              <ignore />
                           </action>
                        </pluginExecution>
                        <pluginExecution>
                           <pluginExecutionFilter>
                              <groupId>org.apache.maven.plugins</groupId>
                              <artifactId>maven-dependency-plugin</artifactId>
                              <versionRange>[2.0,)</versionRange>
                              <goals>
                                 <goal>analyze-only</goal>
                              </goals>
                           </pluginExecutionFilter>
                           <action>
                              <!-- TODO: Change to execute when Eclipse stops
                                   complaining differently than command-line -->
                              <ignore />
                           </action>
                        </pluginExecution>
                        <pluginExecution>
                           <pluginExecutionFilter>
                              <groupId>org.basepom.maven</groupId>
                              <artifactId>duplicate-finder-maven-plugin</artifactId>
                              <versionRange>[1.1.1,)</versionRange>
                              <goals>
                                 <goal>check</goal>
                              </goals>
                           </pluginExecutionFilter>
                           <action>
                              <ignore />
                           </action>
                        </pluginExecution>
                        <pluginExecution>
                           <pluginExecutionFilter>
                              <groupId>org.codehaus.mojo</groupId>
                              <artifactId>license-maven-plugin</artifactId>
                              <versionRange>[1.8,)</versionRange>
                              <goals>
                                 <goal>add-third-party</goal>
                              </goals>
                           </pluginExecutionFilter>
                           <action>
                              <ignore />
                           </action>
                        </pluginExecution>
                     </pluginExecutions>
                  </lifecycleMappingMetadata>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>exec-maven-plugin</artifactId>
               <version>1.4.0</version>
            </plugin>
         </plugins>
      </pluginManagement>
      <defaultGoal>install</defaultGoal>
   </build>

   <!-- Source code management -->
   <scm>
      <connection>scm:svn:https://svn.petalslink.org/svnroot/branches-legacy/petals-root-parent-21.0.0.x/tags/petals-root-parent-21.0.0.2</connection>
      <developerConnection>scm:svn:https://svn.petalslink.org/svnroot/branches-legacy/petals-root-parent-21.0.0.x/tags/petals-root-parent-21.0.0.2</developerConnection>
      <url>scm:svn:https://svn.petalslink.org/svnroot/tags/petals-root-parent-21.0.0.2</url>
   </scm>

   <profiles>
      <!-- More flexible on tests -->
      <profile>
         <id>skip-test-profile</id>
         <activation>
            <property>
               <name>maven.test.skip</name>
               <value>true</value>
            </property>
         </activation>
         <properties>
            <maven-dependency-plugin.ignoreNonCompile>true</maven-dependency-plugin.ignoreNonCompile>
            <maven-dependency-plugin.failOnWarning>true</maven-dependency-plugin.failOnWarning>
         </properties>
      </profile>
  
      <!-- Prepare release profile -->
      <profile>
         <id>prepare-release-profile</id>
         <properties>
            <!-- SCM enforcer rules MUST be disabled during the maven-release-prepare because SCM URL are updated according
                 to the tag, but in the current branch working area, before to create the tag -->
            <maven-enforcer-plugin.rules.scm>false</maven-enforcer-plugin.rules.scm>
         </properties>
      </profile>

      <profile>
         <!-- Continuous integration profile -->
         <id>ci-profile</id>
      </profile>
      <profile>
         <!-- Continuous integration profile -->
         <id>jacoco-profile</id>
         <properties>
            <!-- These are properties that could be changed by the CI if needed -->
            <jacoco-plugin.version>0.7.9</jacoco-plugin.version>
            <!-- this should be the same as the version of the Sonar Java plugin! -->
            <jacoco-listeners.version>3.14</jacoco-listeners.version>
         </properties>
         <dependencies>
            <dependency>
               <!-- Provides the JUnitListener used by surefire below -->
               <groupId>org.sonarsource.java</groupId>
               <artifactId>sonar-jacoco-listeners</artifactId>
               <version>${jacoco-listeners.version}</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
         <build>
            <plugins>
               <plugin>
                  <!-- Let's activate jacoco for unit test coverage -->
                  <groupId>org.jacoco</groupId>
                  <artifactId>jacoco-maven-plugin</artifactId>
                  <version>${jacoco-plugin.version}</version>
                  <executions>
                     <execution>
                        <!-- This activates the use of jacoco for recording unit test coverage -->
                        <id>prepare-agent</id>
                        <goals>
                           <goal>prepare-agent</goal>
                        </goals>
                     </execution>
                     <execution>
                        <!-- This activates the use of jacoco for recording integration test coverage -->
                        <id>prepare-agent-integration</id>
                        <goals>
                           <goal>prepare-agent-integration</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
            <pluginManagement>
               <plugins>
                  <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-surefire-plugin</artifactId>
                     <configuration>
                        <properties>
                           <property>
                              <!-- Have jacoco record per-test coverage (on top of default per-file coverage) -->
                              <name>listener</name>
                              <value>org.sonar.java.jacoco.JUnitListener</value>
                           </property>
                        </properties>
                     </configuration>
                  </plugin>
                  <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-failsafe-plugin</artifactId>
                     <configuration>
                        <properties>
                           <property>
                              <!-- Have jacoco record per-test coverage (on top of default per-file coverage) -->
                              <name>listener</name>
                              <value>org.sonar.java.jacoco.JUnitListener</value>
                           </property>
                        </properties>
                     </configuration>
                  </plugin>
               </plugins>
            </pluginManagement>
         </build>
      </profile>
   </profiles>
</project>
