<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.codehaus.sonar-plugins</groupId>
  <artifactId>parent</artifactId>
  <version>7</version>
  <packaging>pom</packaging>

  <name>Sonar plugins parent</name>
  <url>http://sonar-plugins.codehaus.org</url>
  <inceptionYear>2009</inceptionYear>
  <!-- License defined here, because most of projects uses this license. Can be overridden in children POMs. -->
  <licenses>
    <license>
      <name>GNU LGPL 3</name>
      <url>http://www.gnu.org/licenses/lgpl.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <mailingLists>
    <mailingList>
      <name>Sonar dev mailing list</name>
      <subscribe>http://xircles.codehaus.org/projects/sonar/lists</subscribe>
      <unsubscribe>http://xircles.codehaus.org/projects/sonar/lists</unsubscribe>
      <post>dev@sonar.codehaus.org</post>
    </mailingList>
  </mailingLists>

  <scm>
    <connection>scm:svn:http://svn.codehaus.org/sonar-plugins/tags/parent-7</connection>
    <developerConnection>scm:svn:https://svn.codehaus.org/sonar-plugins/tags/parent-7</developerConnection>
    <url>scm:svn:https://svn.codehaus.org/sonar-plugins/tags/parent-7</url>
  </scm>
  <issueManagement>
    <system>jira</system>
    <url>http://jira.codehaus.org/browse/SONARPLUGINS</url>
  </issueManagement>
  <ciManagement>
    <system>bamboo</system>
    <url>http://ci.codehaus.org/browse/SONAR</url>
  </ciManagement>
  <distributionManagement>
    <repository>
      <id>codehaus.org</id>
      <name>Sonar plugins repository</name>
      <url>dav:https://dav.codehaus.org/repository/sonar-plugins</url>
    </repository>
    <snapshotRepository>
      <id>codehaus.org</id>
      <name>Sonar plugins snapshot repository</name>
      <uniqueVersion>false</uniqueVersion>
      <url>dav:https://dav.codehaus.org/snapshots.repository/sonar-plugins</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.min.version>2.0</maven.min.version>
    <jdk.min.version>1.5</jdk.min.version>

    <!-- ================ -->
    <!-- Plugins versions -->
    <!-- ================ -->
    <version.assembly.plugin>2.2-beta-5</version.assembly.plugin>
    <version.clean.plugin>2.4.1</version.clean.plugin>
    <version.compiler.plugin>2.3.2</version.compiler.plugin>
    <version.dependency.plugin>2.1</version.dependency.plugin>
    <version.deploy.plugin>2.5</version.deploy.plugin>
    <version.enforcer.plugin>1.0</version.enforcer.plugin>
    <version.failsafe.plugin>2.6</version.failsafe.plugin>
    <version.install.plugin>2.3.1</version.install.plugin>
    <version.jar.plugin>2.3.1</version.jar.plugin>
    <version.javadoc.plugin>2.7</version.javadoc.plugin>
    <version.plugin.plugin>2.6</version.plugin.plugin>
    <version.release.plugin>2.1</version.release.plugin>
    <version.resources.plugin>2.4.3</version.resources.plugin>
    <version.shade.plugin>1.4</version.shade.plugin>
    <version.source.plugin>2.1.2</version.source.plugin>
    <version.surefire.plugin>2.6</version.surefire.plugin>
    <version.site.plugin>2.1.1</version.site.plugin>

    <version.animal-sniffer.plugin>1.6</version.animal-sniffer.plugin>
    <version.gwt.plugin>1.2</version.gwt.plugin>

    <version.license.plugin>1.8.0</version.license.plugin>

    <version.sonar-packaging.plugin>1.0</version.sonar-packaging.plugin>
    <version.sonar-dev.plugin>0.9</version.sonar-dev.plugin>

    <!-- To configure maven-license-plugin to check license headers -->
    <license.name>GNU LGPL 3</license.name>
    <license.title>${project.name}</license.title>
    <license.year>${project.inceptionYear}</license.year>
    <license.owner>${project.organization.name}</license.owner>
    <license.mailto>dev@sonar.codehaus.org</license.mailto>

    <!-- To configure animal-sniffer to check API compat -->
    <animal-sniffer.signature.groupId>org.codehaus.mojo.signature</animal-sniffer.signature.groupId>
    <animal-sniffer.signature.artifactId>java15</animal-sniffer.signature.artifactId>
    <animal-sniffer.signature.version>1.0</animal-sniffer.signature.version>
  </properties>

  <build>
    <pluginManagement>
      <plugins>
        <!-- Plugins ordered by shortname (archetype, assembly ...) -->
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>animal-sniffer-maven-plugin</artifactId>
          <version>${version.animal-sniffer.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${version.assembly.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${version.clean.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${version.compiler.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${version.dependency.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${version.deploy.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${version.enforcer.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${version.failsafe.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>gwt-maven-plugin</artifactId>
          <version>${version.gwt.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>${version.install.plugin}</version>
        </plugin>
        <plugin>
          <groupId>com.mycila.maven-license-plugin</groupId>
          <artifactId>maven-license-plugin</artifactId>
          <version>${version.license.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${version.jar.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${version.javadoc.plugin}</version>
          <configuration>
            <quiet>true</quiet>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${version.plugin.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${version.release.plugin}</version>
          <configuration>
            <tagBase>https://svn.codehaus.org/sonar-plugins/tags</tagBase>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <useReleaseProfile>false</useReleaseProfile>
            <releaseProfiles>release</releaseProfiles>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${version.resources.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>${version.shade.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${version.source.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${version.surefire.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${version.site.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.sonar</groupId>
          <artifactId>sonar-packaging-maven-plugin</artifactId>
          <version>${version.sonar-packaging.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.sonar</groupId>
          <artifactId>sonar-dev-maven-plugin</artifactId>
          <version>${version.sonar-dev.plugin}</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${jdk.min.version}</source>
          <target>${jdk.min.version}</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <message>Maven 2.1.0 and 2.2.0 produce incorrect GPG signatures and checksums respectively.</message>
                  <version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>
                </requireMavenVersion>
                <requireMavenVersion>
                  <message>To build this project Maven ${maven.min.version} (or upper) is required. Please install it.</message>
                  <version>${maven.min.version}</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <message>To build this project JDK ${java.min.version} (or upper) is required. Please install it.</message>
                  <version>${jdk.min.version}</version>
                </requireJavaVersion>
                <requirePluginVersions>
                  <!--
                  This rule produces warning under Maven 3.0 :
                  "This rule is not compatible with the current version of Maven."
                  -->
                  <message>Build reproducibility : always define plugin versions!</message>
                  <banLatest>true</banLatest>
                  <banRelease>true</banRelease>
                  <phases>clean,deploy</phases>
                </requirePluginVersions>
                <bannedDependencies>
                  <!-- See SONARPLUGINS-506 -->
                  <message>Animal-sniffer throws exception when icu4j version 2.6.1 used.</message>
                  <searchTransitive>true</searchTransitive>
                  <excludes>
                    <exclude>com.ibm.icu:icu4j:[2.6.1]</exclude>
                  </excludes>
                </bannedDependencies>
                <!-- TODO SONARPLUGINS-797
                <DependencyConvergence />
                -->
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.sonar-plugins</groupId>
            <artifactId>license-headers</artifactId>
            <version>1.0</version>
          </dependency>
        </dependencies>
        <configuration>
          <header>org/sonar/plugins/licenseheaders/${license.name}.txt</header>
          <validHeaders>
            <validHeader>org/sonar/plugins/licenseheaders/SonarSource.txt</validHeader>
          </validHeaders>
          <strictCheck>true</strictCheck>
          <includes>
            <include>src/main/java/**</include>
            <include>src/test/java/**</include>
          </includes>
          <mapping>
            <java>SLASHSTAR_STYLE</java>
          </mapping>
          <properties>
            <title>${license.title}</title>
            <year>${license.year}</year>
            <owner>${license.owner}</owner>
            <mailto>${license.mailto}</mailto>
          </properties>
          <encoding>${project.build.sourceEncoding}</encoding>
        </configuration>
        <executions>
          <execution>
            <id>enforce-license-headers</id>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.sonar</groupId>
        <artifactId>sonar-packaging-maven-plugin</artifactId>
        <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <!-- This profile is activated when a project is released. -->
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <!-- Generates Javadoc -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- Checks compatibility with Java API -->
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>animal-sniffer-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>enforce-java-api-compatibility</id>
                <phase>verify</phase>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <signature>
                    <groupId>${animal-sniffer.signature.groupId}</groupId>
                    <artifactId>${animal-sniffer.signature.artifactId}</artifactId>
                    <version>${animal-sniffer.signature.version}</version>
                  </signature>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- This profile is used to launch integration tests with the failsafe plugin. -->
    <profile>
      <id>integration-tests</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>failsafe-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>integration-test</id>
                <phase>integration-test</phase>
                <goals>
                  <goal>integration-test</goal>
                </goals>
              </execution>
              <execution>
                <id>verify</id>
                <phase>verify</phase>
                <goals>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
