<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>com.github.marschall</groupId>
  <artifactId>3rdpartyjandex-maven-plugin</artifactId>
  <version>1.0.0</version>
  <inceptionYear>2012</inceptionYear>
  <url>https://github.com/marschall/3rdpartyjandex-maven-plugin</url>
  <packaging>maven-plugin</packaging>

  <name>3rd Party Jandex Indexer for Maven</name>
  <description>
    Builds Jandex indices for 3rd party artifacts.
  </description>

  <prerequisites>
    <maven>3.0</maven>
  </prerequisites>

  <developers>
    <developer>
      <id>marschall</id>
      <name>Philippe Marschall</name>
      <email>philippe.marschall@gmail.com</email>
      <timezone>Europe/Zurich</timezone>
      <url>https://github.com/marschall</url>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>MIT</name>
      <url>http://opensource.org/licenses/MIT</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/marschall/3rdpartyjandex-maven-plugin/issues</url>
  </issueManagement>

  <scm>
    <connection>scm:git:https://github.com/marschall/3rdpartyjandex-maven-plugin.git</connection>
    <developerConnection>scm:git:git@github.com:marschall/3rdpartyjandex-maven-plugin.git</developerConnection>
    <url>${project.url}</url>
    <tag>1.0.0</tag>
  </scm>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${maven.version}</version>
      <scope>provided</scope>
    </dependency>
    <!-- dependencies to annotations -->
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>${maven.plugin.version}</version>
      <!-- annotations are not needed for plugin execution so you can remove this dependency
           for execution with using provided scope -->
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${maven.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss</groupId>
      <artifactId>jandex</artifactId>
      <version>2.4.1.Final</version>
    </dependency>

    <dependency>
      <groupId>org.sonatype.plexus</groupId>
      <artifactId>plexus-build-api</artifactId>
      <version>0.0.7</version>
    </dependency>

    <dependency>
      <groupId>io.takari.maven.plugins</groupId>
      <artifactId>takari-plugin-integration-testing</artifactId>
      <version>${tikari.version}</version>
      <type>pom</type>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.takari.maven.plugins</groupId>
      <artifactId>takari-plugin-testing</artifactId>
      <version>${tikari.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus Release Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <site>
      <id>gh-pages</id>
      <url>${project.scm.developerConnection}</url>
    </site>
  </distributionManagement>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
        <configuration>
          <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
        <executions>
          <execution>
            <id>mojo-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
          <!-- if you want to generate help goal -->
          <execution>
            <id>help-goal</id>
            <goals>
              <goal>helpmojo</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <links>
            <link>http://docs.oracle.com/javase/8/docs/api/</link>
            <link>http://maven.apache.org/ref/${maven.version}/maven-plugin-api/apidocs/</link>
            <link>http://maven.apache.org/ref/${maven.version}/maven-artifact/apidocs/</link>
            <link>http://maven.apache.org/ref/${maven.version}/maven-model/apidocs/</link>
            <link>http://maven.apache.org/ref/${maven.version}/maven-core/apidocs/</link>
          </links>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-scm-publish-plugin</artifactId>
        <configuration>
          <scmBranch>gh-pages</scmBranch>
          <pubScmUrl>${project.scm.developerConnection}</pubScmUrl>
          <content>${project.reporting.outputDirectory}</content>
          <!-- 
          <content>${project.build.directory}/site</content>
           -->
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>publish-scm</goal>
            </goals>
            <phase>site-deploy</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <configuration>
          <!-- We are deploying site using scm-publish, not site-deploy... -->
          <skipDeploy>true</skipDeploy>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <mavenExecutorId>forked-path</mavenExecutorId>
          <arguments>-Pdeploy-to-sonatype-oss</arguments>
          <!-- causes the tag to be named -SNAPSHOT
          <tag>${project.version}</tag>
           -->
        </configuration>
      </plugin>
      <plugin>
        <groupId>io.takari.maven.plugins</groupId>
        <artifactId>takari-lifecycle-plugin</artifactId>
        <extensions>true</extensions>
        <executions>
          <execution>
            <id>testProperties</id>
            <phase>process-test-resources</phase>
            <goals>
              <goal>testProperties</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.3.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${maven.plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.1.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.12.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-scm-publish-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.9.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.2.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.2</version>
        </plugin>
        <plugin>
          <groupId>io.takari.maven.plugins</groupId>
          <artifactId>takari-lifecycle-plugin</artifactId>
          <version>2.0.7</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${maven.plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>ci-management</report>
              <report>index</report>
              <report>issue-management</report>
              <report>licenses</report>
              <report>scm</report>
              <report>summary</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>deploy-to-sonatype-oss</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>jdk-8</id>
      <activation>
        <jdk>1.8</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <source>1.8</source>
              <target>1.8</target>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>jdk-9-plus</id>
      <activation>
        <jdk>[9,</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <release>8</release>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <properties>
    <project.reporting.outputEncoding>utf-8</project.reporting.outputEncoding>
    <project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
    <maven.version>3.8.4</maven.version>
    <maven.plugin.version>3.6.2</maven.plugin.version>
    <tikari.version>3.0.0</tikari.version>
  </properties>

</project>
