<?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>pw.krejci</groupId>
  <artifactId>multi-release-jar-maven-plugin</artifactId>
  <version>0.1.5</version>
  <packaging>maven-plugin</packaging>

  <name>Multi Release JAR Maven Plugin</name>
  <description>Enables building of multi-release JARs using Maven.</description>
  <url>https://github.com/metlos/multi-release-jar-maven-plugin</url>

  <properties>
    <maven.version>3.3.9</maven.version>
    <maven-plugin-plugin.version>3.5</maven-plugin-plugin.version>
    <maven-invoker.version>1.9</maven-invoker.version>
    <maven.compiler.release>8</maven.compiler.release>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <skipTests>false</skipTests>
  </properties>

  <prerequisites>
    <maven>${maven.version}</maven>
  </prerequisites>

   <dependencies>

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

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

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

     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-compiler-plugin</artifactId>
       <version>3.7.0</version>
     </dependency>

     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-jar-plugin</artifactId>
       <version>3.0.2</version>
     </dependency>
   </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.0.0-M1</version>
        <executions>
          <execution>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>9</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <releaseProfiles>release,release-profile</releaseProfiles>
          <pushChanges>false</pushChanges>
          <preparationGoals>clean verify</preparationGoals>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${maven-plugin-plugin.version}</version>
        <configuration>
          <goalPrefix>multi-release-jar</goalPrefix>
        </configuration>
        <executions>
          <execution>
            <id>default-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
          <execution>
            <id>help-descriptor</id>
            <goals>
              <goal>helpmojo</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <version>${maven-invoker.version}</version>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>install</goal>
              <goal>run</goal>
            </goals>
            <configuration>
              <skipInstallation>${skipTests}</skipInstallation>
              <skipInvocation>${skipTests}</skipInvocation>
              <cloneProjectsTo>${project.build.directory}/it/build</cloneProjectsTo>
              <localRepositoryPath>${project.build.directory}/it/repo</localRepositoryPath>
              <settingsFile>src/it/settings.xml</settingsFile>
              <streamLogs>true</streamLogs>
              <goals>
                <goal>clean</goal>
                <goal>deploy</goal>
              </goals>
              <!--<mavenOpts>-Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y</mavenOpts>-->
              <!--<debug>true</debug>-->
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <name>Lukas Krejci</name>
    <url>http://lukas.krejci.pw</url>
  </organization>

  <developers>
    <developer>
      <name>Lukas Krejci</name>
      <email>lukas@krejci.pw</email>
      <url>http://lukas.krejci.pw</url>
      <timezone>+1</timezone>
    </developer>
  </developers>

  <issueManagement>
    <system>github-issues</system>
    <url>https://github.com/metlos/multi-release-jar-maven-plugin/issues</url>
  </issueManagement>


  <scm>
    <connection>scm:git:git://github.com/metlos/multi-release-jar-maven-plugin.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/metlos/multi-release-jar-maven-plugin.git</developerConnection>
    <url>https://github.com/metlos/multi-release-jar-maven-plugin</url>
    <tag>multi-release-jar-maven-plugin-0.1.5</tag>
  </scm>

  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.5</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>itest-debug</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>${maven-invoker.version}</version>
            <executions>
              <execution>
                <id>integration-test</id>
                <configuration>
                  <mavenOpts>-Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n</mavenOpts>
                  <debug>true</debug>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
