<project 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'
  xmlns='http://maven.apache.org/POM/4.0.0'>
  <parent>
    <artifactId>maven-plugins</artifactId>
    <groupId>org.apache.maven.plugins</groupId>
    <version>8</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>maven-jar-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <name>Maven Jar Plugin</name>
  <version>2.1-jboss-1</version>
  <prerequisites>
    <maven>2.0</maven>
  </prerequisites>
  <issueManagement>
    <system>JIRA</system>
    <url>http://jira.codehaus.org/browse/MJAR</url>
  </issueManagement>
  <contributors>
    <contributor>
      <name>Jerome Lacoste</name>
      <email>jerome@coffeebreaks.org</email>
      <organization>CoffeeBreaks</organization>
      <organizationUrl>http://www.coffeebreaks.org</organizationUrl>
      <timezone>+1</timezone>
      <roles>
        <role>Java Developer</role>
      </roles>
    </contributor>
  </contributors>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-project</artifactId>
      <version>2.0.7</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-archiver</artifactId>
      <version>2.2</version>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <version>1.0-beta-1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-embedder</artifactId>
      <version>2.0.4</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!-- Need to install IT snapshot of maven-jar-plugin -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
        <version>2.2</version>
        <executions>
          <execution>
            <id>it-test</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>install-file</goal>
            </goals>
            <configuration>
              <file>
                ${basedir}/target/maven-jar-plugin-2.2-SNAPSHOT.jar
              </file>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-jar-plugin</artifactId>
              <version>2.2-it-SNAPSHOT</version>
              <!-- IT SNAPSHOT -->
              <packaging>maven-plugin</packaging>
              <pomFile>${basedir}/pom.xml</pomFile>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- Testing the result of the it pom.xml -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/*IntegrationTest.java</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>integration-test</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <executions>
              <execution>
                <id>integration-test</id>
                <phase>integration-test</phase>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <excludes>
                    <exclude>none</exclude>
                  </excludes>
                  <includes>
                    <include>**/*IntegrationTest.java</include>
                  </includes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>
  <distributionManagement>
    <repository>
      <!-- Copy the distribution jar file to a local checkout of the maven repository 
        -  This variable can be set in $MAVEN_HOME/conf/settings.xml -->
      <id>repository.jboss.org</id>
      <url>file://${maven.repository.root}</url>
    </repository>
    <snapshotRepository>
      <id>snapshots.jboss.org</id>
      <name>JBoss Snapshot Repository</name>
      <url>dav:https://snapshots.jboss.org/maven2</url>
    </snapshotRepository>
  </distributionManagement>
</project>
