<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.excelsiorjet</groupId>
  <artifactId>excelsior-jet-maven-plugin</artifactId>
  <version>0.9.2</version>
  <packaging>maven-plugin</packaging>

  <name>Excelsior JET Maven Plugin</name>

  <!--<url>http://www.excelsiorjet.com/maven-plugin</url>-->
  <url>https://github.com/${github-repo-owner}/${github-repo}</url>
  <description>
    Excelsior JET Maven Plugin provides Maven users with an easy way to compile their applications
    down to optimized native Windows, OS X, or Linux executables with Excelsior JET.
  </description>

  <licenses>
    <license>
      <name>GNU General Public License</name>
      <url>http://www.gnu.org/licenses/gpl.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>pjBooms</id>
      <name>Nikita Lipsky</name>
    </developer>
    <developer>
      <id>aleksey-zhidkov</id>
      <name>Alexey Zhidkov</name>
    </developer>
    <developer>
      <id>dleskov</id>
      <name>Dmitry Leskov</name>
    </developer>
  </developers>

  <scm>
      <connection>scm:git:https://github.com/${github-repo-owner}/${github-repo}.git</connection>
      <developerConnection>scm:git:https://github.com/${github-repo-owner}/${github-repo}.git</developerConnection>
      <url>https://github.com/${github-repo-owner}/${github-repo}</url>
      <tag>HEAD</tag>
  </scm>

  <issueManagement>
      <system>GitHub</system>
      <url>https://github.com/${github-repo-owner}/${github-repo}/issues</url>
  </issueManagement>

  <distributionManagement>
      <snapshotRepository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      </snapshotRepository>
      <repository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
      </repository>
  </distributionManagement>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.source>1.8</maven.compiler.source>
    <github-repo-owner>excelsior-oss</github-repo-owner>
    <github-repo>excelsior-jet-maven-plugin</github-repo>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>3.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>3.4</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>3.0.8</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>1.9.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>3.0</version>
    </dependency>
    <dependency>
    	<groupId>org.apache.commons</groupId>
    	<artifactId>commons-compress</artifactId>
    	<version>1.10</version>
    </dependency>
    <dependency>
    	<groupId>org.apache.commons</groupId>
    	<artifactId>commons-lang3</artifactId>
    	<version>3.1</version>
    </dependency>
    <dependency>
      <groupId>com.excelsiorjet</groupId>
      <artifactId>excelsior-jet-api</artifactId>
      <version>0.9.1</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>3.4</version>
        <configuration>
          <goalPrefix>jet</goalPrefix>
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
        <executions>
          <execution>
            <id>mojo-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
          <execution>
            <id>help-goal</id>
            <goals>
              <goal>helpmojo</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.3</version>
          <configuration>
              <source>${maven.compiler.source}</source>
              <target>${maven.compiler.target}</target>
              <showDeprecation>true</showDeprecation>
              <compilerArgument>-Xlint:unchecked</compilerArgument>
          </configuration>
      </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>1.10</version>
            <configuration>
              <!--<debug>true</debug>-->
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <pomIncludes>
                <pomInclude>*/pom.xml</pomInclude>
              </pomIncludes>
              <showErrors>true</showErrors>
              <streamLogs>true</streamLogs>
              <selectorScript>check-assumptions</selectorScript>
              <postBuildHookScript>verify</postBuildHookScript>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <settingsFile>src/it/settings.xml</settingsFile>
              <properties>
                <jet.home>${jet.home}</jet.home>
                <tomcat.home>${tomcat.home}</tomcat.home>
              </properties>
              <addTestClassPath>true</addTestClassPath>
            </configuration>
            <executions>
                <execution>
                    <id>invoker-tests</id>
                    <phase>install</phase>
                    <goals>
                        <goal>run</goal>
                    </goals>
                </execution>
            </executions>
          </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>

          <!-- Produces sources -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.2.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- Produces docs -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.9.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- Signs resulting artifacts -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- Deploys results -->
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.3</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
