<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2006-present the original author or authors.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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>com.planet57.buildsupport</groupId>
    <artifactId>public-parent</artifactId>
    <version>2</version>
    <relativePath/>
  </parent>

  <groupId>org.codehaus.gmaven</groupId>
  <artifactId>gmaven</artifactId>
  <name>${project.groupId}:${project.artifactId}</name>
  <packaging>pom</packaging>

  <version>2.1.1</version>

  <description>
    Groovy integration for Maven.
  </description>

  <url>http://groovy.github.io/gmaven</url>

  <inceptionYear>2006</inceptionYear>

  <licenses>
    <license>
      <name>ASLv2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git://github.com/groovy/gmaven.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/groovy/gmaven.git</developerConnection>
    <url>https://github.com/groovy/gmaven</url>
  </scm>

  <distributionManagement>
    <site>
      <id>github-site</id>
      <url>scm:git:ssh://git@github.com/groovy/gmaven.git</url>
    </site>
  </distributionManagement>

  <issueManagement>
    <system>github</system>
    <url>https://github.com/groovy/gmaven/issues</url>
  </issueManagement>

  <ciManagement>
    <system>travis</system>
    <url>https://travis-ci.org/groovy/gmaven</url>
  </ciManagement>

  <mailingLists>
    <mailingList>
      <name>gmaven-user</name>
      <post>mailto:gmaven-user@googlegroups.com</post>
      <unsubscribe>mailto:gmaven-user+unsubscribe@googlegroups.com</unsubscribe>
      <subscribe>https://groups.google.com/group/gmaven-user</subscribe>
      <archive>https://groups.google.com/group/gmaven-user</archive>
    </mailingList>
    <mailingList>
      <name>gmaven-dev</name>
      <post>mailto:gmaven-dev@googlegroups.com</post>
      <unsubscribe>mailto:gmaven-dev+unsubscribe@googlegroups.com</unsubscribe>
      <subscribe>https://groups.google.com/group/gmaven-dev</subscribe>
      <archive>https://groups.google.com/group/gmaven-dev</archive>
    </mailingList>
  </mailingLists>

  <!--<repositories>-->
    <!--<repository>-->
      <!--<id>ossrh</id>-->
      <!--<url>https://oss.sonatype.org/content/repositories/snapshots</url>-->
      <!--<releases>-->
        <!--<enabled>false</enabled>-->
      <!--</releases>-->
      <!--<snapshots>-->
        <!--<enabled>true</enabled>-->
      <!--</snapshots>-->
    <!--</repository>-->
  <!--</repositories>-->

  <properties>
    <maven.compiler.source>1.6</maven.compiler.source>
    <maven.compiler.target>1.6</maven.compiler.target>

    <apache-maven.version>3.0.5</apache-maven.version>
    <eclipse-aether.version>0.9.0.M2</eclipse-aether.version>

    <!--
    Site configuration.  Using '_' instead of '.' for velocity-based filtering.
    -->
    <site_mavenApidocsUrl>http://maven.apache.org/ref/${apache-maven.version}/apidocs</site_mavenApidocsUrl>
    <site_groovyApidocsUrl>http://docs.groovy-lang.org/latest/html/gapi</site_groovyApidocsUrl>
    <site_javaApidocsUrl>http://docs.oracle.com/javase/6/docs/api</site_javaApidocsUrl>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.5</version>
      </dependency>

      <dependency>
        <groupId>org.sonatype.gossip</groupId>
        <artifactId>gossip-slf4j</artifactId>
        <version>1.8</version>
      </dependency>

      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>14.0.1</version>
      </dependency>

      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <version>2.0.1</version>
      </dependency>

      <dependency>
        <groupId>com.intellij</groupId>
        <artifactId>annotations</artifactId>
        <version>12.0</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>${apache-maven.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>${apache-maven.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-embedder</artifactId>
        <version>${apache-maven.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-settings</artifactId>
        <version>${apache-maven.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.shared</groupId>
        <artifactId>maven-verifier</artifactId>
        <version>1.4</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>3.2</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-classworlds</artifactId>
        <version>2.4.2</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-interpolation</artifactId>
        <version>1.16</version>
      </dependency>

      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-api</artifactId>
        <version>${eclipse-aether.version}</version>
      </dependency>

      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-spi</artifactId>
        <version>${eclipse-aether.version}</version>
      </dependency>

      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-impl</artifactId>
        <version>${eclipse-aether.version}</version>
      </dependency>

      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-util</artifactId>
        <version>${eclipse-aether.version}</version>
      </dependency>

      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
      </dependency>

      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.4</version>
      </dependency>

      <dependency>
        <groupId>org.sonatype.sisu.litmus</groupId>
        <artifactId>litmus-testsupport</artifactId>
        <version>1.9</version>
      </dependency>

      <!-- INTERNAL -->

      <dependency>
        <groupId>org.codehaus.gmaven</groupId>
        <artifactId>gmaven-adapter-api</artifactId>
        <version>2.1.1</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.gmaven</groupId>
        <artifactId>gmaven-adapter-impl</artifactId>
        <version>2.1.1</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.gmaven</groupId>
        <artifactId>groovy-maven-plugin</artifactId>
        <version>2.1.1</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.gmaven</groupId>
        <artifactId>gmaven-testsuite</artifactId>
        <version>2.1.1</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <modules>
    <module>gmaven-adapter-api</module>
    <module>gmaven-adapter-impl</module>
    <module>groovy-maven-plugin</module>
    <module>gmaven-testsuite</module>
  </modules>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.0.1</version>
          <configuration>
            <additionalOptions>
              <!-- Turn off strict javadoc checks in Java-8 -->
              <option>-Xdoclint:none</option>
            </additionalOptions>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-metadata</artifactId>
          <version>1.5.5</version>
          <dependencies>
            <dependency>
              <groupId>com.thoughtworks.qdox</groupId>
              <artifactId>qdox</artifactId>
              <version>1.12.1</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <goals>
                <goal>generate-metadata</goal>
                <goal>generate-test-metadata</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>3.2</version>
          <executions>
            <!--
            HACK: Disable the default-descriptor execution, as it seems to always detect no mojo implementations.
            HACK: The plugin-descriptor execution however properly picks things up.
            -->
            <execution>
              <id>default-descriptor</id>
              <phase>none</phase>
            </execution>
            <!--<execution>-->
              <!--<id>help-descriptor</id>-->
              <!--<goals>-->
                <!--<goal>helpmojo</goal>-->
              <!--</goals>-->
              <!--<configuration>-->
                <!--<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>-->
              <!--</configuration>-->
            <!--</execution>-->
            <execution>
              <id>plugin-descriptor</id>
              <goals>
                <goal>descriptor</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <!-- INTERNAL -->

        <plugin>
          <groupId>org.codehaus.gmaven</groupId>
          <artifactId>groovy-maven-plugin</artifactId>
          <version>2.1.1</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>[1.8,)</version>
                </requireJavaVersion>
                <requireMavenVersion>
                  <version>[3.5,)</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>animal-sniffer-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <signature>
                <groupId>org.codehaus.mojo.signature</groupId>
                <artifactId>java16</artifactId>
                <version>1.1</version>
              </signature>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.7.1</version>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-module-markdown</artifactId>
            <version>1.8</version>
          </dependency>
        </dependencies>
        <configuration>
          <inputEncoding>UTF-8</inputEncoding>
          <outputEncoding>UTF-8</outputEncoding>
        </configuration>
        <executions>
          <execution>
            <id>attach-descriptor</id>
            <goals>
              <goal>attach-descriptor</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <excludes combine.children="append">
            <exclude>gmaven-testsuite/src/test/it-projects/**</exclude>
            <exclude>**/src/site/**</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <goals>deploy</goals>
          <arguments>-B -Pbuildsupport-release</arguments>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.9</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.0.1</version>
        <configuration>
          <source>1.6</source>
          <additionalOptions>
            <!-- Turn off strict javadoc checks in Java-8 -->
            <option>-Xdoclint:none</option>
          </additionalOptions>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>2.20</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>3.10.0</version>
        <configuration>
          <targetJdk>1.6</targetJdk>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>2.5</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changelog-plugin</artifactId>
        <version>2.3</version>
        <inherited>false</inherited>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>3.0.5</version>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.7</version>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>it</id>
      <activation>
        <property>
          <name>it</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>site-stage</id>

      <build>
        <defaultGoal>clean install site:site site:stage</defaultGoal>
      </build>
    </profile>

    <profile>
      <id>site-publish</id>

      <build>
        <defaultGoal>groovy:execute</defaultGoal>

        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.codehaus.gmaven</groupId>
              <artifactId>groovy-maven-plugin</artifactId>
              <configuration>
                <source>${project.basedir}/src/site/publish.groovy</source>
                <properties>
                  <!--<dryRun>true</dryRun>-->
                  <!--<gitBranch>gh-pages</gitBranch>-->
                </properties>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>

</project>

