<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.commonjava.maven.ext</groupId>
  <artifactId>versioning-extension</artifactId>
  <name>Versioning Extension for Maven</name>
  <version>0.7</version>
  <description>lib/ext-style extension for Apache Maven that allows manipulation of a version suffix.</description>
  <url>http://github.com/jdcasey/versioning-extension</url>
  <developers>
    <developer>
      <id>jdcasey</id>
      <name>John Casey</name>
      <email>jdcasey@commonjava.org</email>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>APLv2.0</name>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:http://jdcasey@github.com/jdcasey/maven-versioning-extension.git</connection>
    <developerConnection>scm:git:git@github.com:jdcasey/maven-versioning-extension.git</developerConnection>
    <url>http://github.com/jdcasey/maven-versioning-extension</url>
  </scm>
  <build>
    <testResources>
      <testResource>
        <filtering>true</filtering>
        <directory>src/test/resources</directory>
      </testResource>
    </testResources>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <configuration>
            <archive>
              <index>true</index>
              <manifest>
                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.6</version>
          <configuration>
            <escapeString>\</escapeString>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.1</version>
          <configuration>
            <mavenExecutorId>forked-path</mavenExecutorId>
            <useReleaseProfile>false</useReleaseProfile>
            <arguments>-Prelease</arguments>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-metadata</artifactId>
          <version>1.5.5</version>
          <executions>
            <execution>
              <goals>
                <goal>generate-metadata</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
            <source>1.6</source>
            <target>1.6</target>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.8</version>
          <executions>
            <execution>
              <id>unpack-maven</id>
              <phase>pre-integration-test</phase>
              <goals>
                <goal>unpack-dependencies</goal>
              </goals>
              <configuration>
                <includeArtifactIds>apache-maven</includeArtifactIds>
                <includeClassifiers>bin</includeClassifiers>
                <includeTypes>zip</includeTypes>
                <outputDirectory>${project.build.directory}</outputDirectory>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>1.8</version>
          <executions>
            <execution>
              <id>integration-test</id>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
              <configuration>
                <debug>true</debug>
                <goals>
                  <goal>clean</goal>
                  <goal>package</goal>
                </goals>
                <localRepositoryPath>${localRepositoryUrl}</localRepositoryPath>
                <mavenHome>${it.maven.home}</mavenHome>
                <pomIncludes>
                  <pomInclude>*/pom.xml</pomInclude>
                </pomIncludes>
                <projectsDirectory>${project.build.directory}/it</projectsDirectory>
                <postBuildHookScript>verify</postBuildHookScript>
                <settingsFile>src/it/settings.xml</settingsFile>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.2</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.9.1</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.1</version>
          <executions>
            <execution>
              <id>sign-artifacts</id>
              <phase>verify</phase>
              <goals>
                <goal>sign</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.2</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <includes>
                  <include>org.jdom:jdom</include>
                  <include>org.commonjava.maven:maven-model-jdom-support</include>
                </includes>
              </artifactSet>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-metadata</artifactId>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>run-its</id>
      <build>
        <testResources>
          <testResource>
            <targetPath>../it</targetPath>
            <filtering>true</filtering>
            <directory>src/it</directory>
            <excludes>
              <exclude>expression-not-rewritten/pom.xml</exclude>
            </excludes>
          </testResource>
          <testResource>
            <targetPath>../it</targetPath>
            <directory>src/it</directory>
            <includes>
              <include>expression-not-rewritten/pom.xml</include>
            </includes>
          </testResource>
        </testResources>
        <plugins>
          <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
          </plugin>
          <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <executions>
              <execution>
                <id>copy-resources</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>${it.maven.home}/lib/ext</outputDirectory>
                  <resources>
                    <resource>
                      <directory>${project.build.directory}</directory>
                      <includes>
                        <include>${project.build.finalName}.jar</include>
                      </includes>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>org.apache.maven</groupId>
          <artifactId>apache-maven</artifactId>
          <version>${mavenVersion}</version>
          <type>zip</type>
          <classifier>bin</classifier>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <properties>
        <localRepositoryUrl>${project.build.directory}/local-repo</localRepositoryUrl>
      </properties>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.1.2</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.9.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.1</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>3.0.4</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>maven-settings-builder</artifactId>
          <groupId>org.apache.maven</groupId>
        </exclusion>
        <exclusion>
          <artifactId>maven-artifact</artifactId>
          <groupId>org.apache.maven</groupId>
        </exclusion>
        <exclusion>
          <artifactId>maven-plugin-api</artifactId>
          <groupId>org.apache.maven</groupId>
        </exclusion>
        <exclusion>
          <artifactId>maven-model-builder</artifactId>
          <groupId>org.apache.maven</groupId>
        </exclusion>
        <exclusion>
          <artifactId>maven-aether-provider</artifactId>
          <groupId>org.apache.maven</groupId>
        </exclusion>
        <exclusion>
          <artifactId>aether-impl</artifactId>
          <groupId>org.sonatype.aether</groupId>
        </exclusion>
        <exclusion>
          <artifactId>aether-api</artifactId>
          <groupId>org.sonatype.aether</groupId>
        </exclusion>
        <exclusion>
          <artifactId>aether-util</artifactId>
          <groupId>org.sonatype.aether</groupId>
        </exclusion>
        <exclusion>
          <artifactId>sisu-inject-plexus</artifactId>
          <groupId>org.sonatype.sisu</groupId>
        </exclusion>
        <exclusion>
          <artifactId>plexus-interpolation</artifactId>
          <groupId>org.codehaus.plexus</groupId>
        </exclusion>
        <exclusion>
          <artifactId>plexus-classworlds</artifactId>
          <groupId>org.codehaus.plexus</groupId>
        </exclusion>
        <exclusion>
          <artifactId>plexus-sec-dispatcher</artifactId>
          <groupId>org.sonatype.plexus</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-component-annotations</artifactId>
      <version>1.5.5</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.10</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <distributionManagement>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus Release Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>
  <properties>
    <it.maven.home>${project.build.directory}/apache-maven-${mavenVersion}</it.maven.home>
    <mavenVersion>3.0.4</mavenVersion>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
</project>

