<?xml version="1.0" encoding="UTF-8"?>
<!-- 
 Copyright (c) 2013-2023 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/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
      <groupId>org.ow2</groupId>
      <artifactId>ow2</artifactId>
      <version>1.5.1</version>
      <!-- Resolve the parent from the repositories <=> Set it empty. -->
      <relativePath />
   </parent>

   <groupId>org.ow2.petals</groupId>
   <artifactId>petals-checkstyle-rules</artifactId>
   <version>1.1.0</version>

   <name>Petals ESB - Development tools - Checkstyle rules</name>
   <description>Petals ESB - Development tools - Checkstyle rules</description>

   <inceptionYear>2013</inceptionYear>
   <url>http://petals.ow2.org</url>

   <licenses>
      <license>
         <name>GNU LESSER GENERAL PUBLIC LICENSE Version 2.1</name>
         <url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt</url>
      </license>
   </licenses>

   <developers>
      <developer>
         <id>cdeneux</id>
         <name>Christophe DENEUX</name>
         <email>christophe.deneux@linagora.com</email>
      </developer>
   </developers>

   <properties>
      <java-version>11</java-version>
      <maven.compiler.release>${java-version}</maven.compiler.release>
      <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>

      <!-- Override Maven plugin versions defined in OW2 POM parent -->
      <maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
      <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
      <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
      <maven-release-plugin.version>3.0.0-M1</maven-release-plugin.version>
      <maven-source-plugin.version>3.2.0</maven-source-plugin.version>
   </properties>

   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.0.0-M3</version>
            <executions>
               <execution>
                  <id>enforce-maven</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <rules>
                        <requireMavenVersion>
                           <version>3.6.3</version>
                           <message>Maven 3.6.3 is required to build Petals.</message>
                        </requireMavenVersion>
                     </rules>
                  </configuration>
               </execution>
               <execution>
                  <id>enforce-java</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <rules>
                        <requireJavaVersion>
                           <version>[11.0.9,)</version>
                           <message>Java 11.0.9+ is required by Petals.</message>
                        </requireJavaVersion>
                        <enforceBytecodeVersion>
                           <maxJdkVersion>${java-version}</maxJdkVersion>
                        </enforceBytecodeVersion>
                     </rules>
                  </configuration>
               </execution>
            </executions>
            <dependencies>
               <dependency>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>extra-enforcer-rules</artifactId>
                  <version>1.3</version>
               </dependency>
            </dependencies>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>3.1.1</version>
            <executions>
               <execution>
                  <id>check-header</id>
                  <phase>verify</phase>
                  <goals>
                     <goal>check</goal>
                  </goals>
                  <configuration>
                     <configLocation>${basedir}/src/main/resources/petals-checkstyle-rules.xml</configLocation>
                     <headerLocation>${basedir}/src/main/resources/petals-copyright-lgplv21-regexp-file.txt</headerLocation>

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

                     <includeResources>true</includeResources>
                     <includeTestSourceDirectory>true</includeTestSourceDirectory>
                     <includeTestResources>true</includeTestResources>
                     <includes>**/*</includes>
                     <resourceIncludes>**/*</resourceIncludes>
                     <resourceExcludes>petals-copyright-agpl3-regexp-file.txt, petals-copyright-lgplv21-regexp-file.txt, petals-copyright-bsd3-regexp-file.txt, petals-license-lgplv21-regexp-file.txt, petals-license-bsd3-regexp-file.txt</resourceExcludes>
                  </configuration>
               </execution>
               <execution>
                  <id>check-copyright-file</id>
                  <phase>validate</phase>
                  <goals>
                     <goal>check</goal>
                  </goals>
                  <configuration>
                     <configLocation>${basedir}/src/main/resources/petals-checkstyle-rules.xml</configLocation>
                     <headerLocation>${basedir}/src/main/resources/petals-copyright-lgplv21-regexp-file.txt</headerLocation>

                     <consoleOutput>true</consoleOutput>
                     <logViolationsToConsole>true</logViolationsToConsole>
                     
                     <sourceDirectories>
                        <sourceDirectory>${basedir}</sourceDirectory>
                     </sourceDirectories>
                     
                     <includes>/COPYRIGHT</includes>
                     <includeResources>false</includeResources>
                     <includeTestSourceDirectory>false</includeTestSourceDirectory>
                     <includeTestResources>false</includeTestResources>
                  </configuration>
               </execution>
               <execution>
                  <id>check-license-file</id>
                  <phase>validate</phase>
                  <goals>
                     <goal>check</goal>
                  </goals>
                  <configuration>
                     <configLocation>${basedir}/src/main/resources/petals-checkstyle-rules.xml</configLocation>
                     <headerLocation>${basedir}/src/main/resources/petals-license-lgplv21-regexp-file.txt</headerLocation>

                     <consoleOutput>true</consoleOutput>
                     <logViolationsToConsole>true</logViolationsToConsole>
                     
                     <sourceDirectories>
                        <sourceDirectory>${basedir}</sourceDirectory>
                     </sourceDirectories>
                     
                     <includes>/LICENSE</includes>
                     <includeResources>false</includeResources>
                     <includeTestSourceDirectory>false</includeTestSourceDirectory>
                     <includeTestResources>false</includeTestResources>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>3.2.0</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</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>
            </executions>
         </plugin>
      </plugins>
      <pluginManagement>
         <plugins>
            <!--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.apache.maven.plugins</groupId>
                              <artifactId>maven-checkstyle-plugin</artifactId>
                              <versionRange>[3.1.1,)</versionRange>
                              <goals>
                                 <goal>check</goal>
                              </goals>
                           </pluginExecutionFilter>
                           <action>
                              <ignore />
                           </action>
                        </pluginExecution>
                     </pluginExecutions>
                  </lifecycleMappingMetadata>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-clean-plugin</artifactId>
               <version>3.1.0</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-antrun-plugin</artifactId>
               <version>3.0.0</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-assembly-plugin</artifactId>
               <version>3.3.0</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-compiler-plugin</artifactId>
               <version>3.8.1</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-dependency-plugin</artifactId>
               <version>3.1.2</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-deploy-plugin</artifactId>
               <version>3.0.0-M1</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-install-plugin</artifactId>
               <version>3.0.0-M1</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-jar-plugin</artifactId>
               <version>3.2.0</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-site-plugin</artifactId>
               <version>3.9.1</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-project-info-reports-plugin</artifactId>
               <version>3.1.1</version>
            </plugin>
         </plugins>
      </pluginManagement>
   </build>

   <scm>
      <connection>scm:svn:https://svn.petalslink.org/svnroot/tags/petals-checkstyle-rules-1.1.0</connection>
      <developerConnection>scm:svn:https://svn.petalslink.org/svnroot/tags/petals-checkstyle-rules-1.1.0</developerConnection>
   </scm>
</project>
