<?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements. See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to you under the Apache License, Version
    2.0 (the "License"); you may not use this file except in compliance
    with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0 Unless required by
    applicable law or agreed to in writing, software distributed under
    the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
    OR CONDITIONS OF ANY KIND, either express or implied. See the
    License for the specific language governing permissions and
    limitations under the License.
  -->
<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>

  <parent>
    <artifactId>maven-plugins</artifactId>
    <groupId>org.apache.maven.plugins</groupId>
    <version>23</version>
    <relativePath />
  </parent>

  <groupId>com.github.maven-nar</groupId>
  <artifactId>nar-maven-plugin</artifactId>
  <version>3.0.0-rc-2</version>
  <packaging>maven-plugin</packaging>
  <name>Native ARchive plugin for Maven</name>
  <description>
    This plugin compiles native code and publishes native artifacts in the form of nar files.
  </description>

  <mailingLists>
    <mailingList>
      <name>NAR plugin</name>
      <subscribe>https://groups.google.com/group/maven-nar</subscribe>
      <unsubscribe>https://groups.google.com/group/maven-nar</unsubscribe>
      <post>maven-nar@googlegroups.com</post>
      <archive>https://groups.google.com/group/maven-nar</archive>
    </mailingList>
  </mailingLists>

  <scm>
    <connection>scm:git:git://github.com/maven-nar/nar-maven-plugin</connection>
    <developerConnection>scm:git:git@github.com:maven-nar/nar-maven-plugin</developerConnection>
    <url>https://github.com/maven-nar/nar-maven-plugin</url>
  </scm>

  <developers>
    <developer>
      <id>ctrueden</id>
      <name>Curtis Rueden</name>
      <email>ctrueden@wisc.edu</email>
      <url>http://loci.wisc.edu/people/curtis-rueden</url>
      <organization>UW-Madison LOCI</organization>
      <organizationUrl>http://loci.wisc.edu/</organizationUrl>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>-6</timezone>
    </developer>
    <developer>
      <id>dscho</id>
      <name>Johannes Schindelin</name>
      <email>johannes.schindelin@gmx.de</email>
      <url>http://loci.wisc.edu/people/johannes-schindelin</url>
      <organization>UW-Madison LOCI</organization>
      <organizationUrl>http://loci.wisc.edu/</organizationUrl>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>-6</timezone>
    </developer>
  </developers>

  <properties>
    <invoker.debug>false</invoker.debug>
    <its.to.skip>dummy</its.to.skip>
    <mavenVersion>2.0.9</mavenVersion>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <skip.autoconf.it>it0013-gnu-executable/**</skip.autoconf.it>
    <skip.fortran.it>it0018-fortran/**</skip.fortran.it>
    <skip.toolchain.it>it0017-toolchain/**</skip.toolchain.it>
    <sonatypeOssDistMgmtSnapshotsUrl>https://oss.sonatype.org/content/repositories/snapshots/</sonatypeOssDistMgmtSnapshotsUrl>
  </properties>

  <prerequisites>
    <maven>2.0.9</maven>
  </prerequisites>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-project</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.surefire</groupId>
      <artifactId>surefire-booter</artifactId>
      <version>2.6</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-toolchain</artifactId>
      <version>2.2.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>2.2.1</version>
    </dependency>
    
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-container-default</artifactId>
      <version>1.5.4</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-compiler-api</artifactId>
      <version>1.8</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>2.0.5</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-archiver</artifactId>
      <version>1.0</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.bcel</groupId>
      <artifactId>bcel</artifactId>
      <version>5.2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant</artifactId>
      <version>1.8.1</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.4</version>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.9.1</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <defaultGoal>install</defaultGoal>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav-jackrabbit</artifactId>
        <version>1.0</version>
      </extension>
    </extensions>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.1</version>
          <configuration>
            <mavenExecutorId>forked-path</mavenExecutorId>
            <useReleaseProfile>false</useReleaseProfile>
            <arguments>-Psonatype-oss-release</arguments>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.0</version>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>
                  <message>Maven 2.1.0 and 2.2.0 produce incorrect GPG signatures and checksums respectively.</message>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.7</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>2.2</version>
      </plugin>
    </plugins>
  </reporting>

  <repositories>
    <repository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>


  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>${sonatypeOssDistMgmtSnapshotsUrl}</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>
  </distributionManagement>

  <profiles>
    <profile>
      <id>sonatype-oss-release</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <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>
            <configuration>
              <useAgent>true</useAgent>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>check</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-docck-plugin</artifactId>
            <version>1.0</version>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>run-its</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>1.8</version>
            <configuration>
              <debug>${invoker.debug}</debug>
              <ignoreFailures>false</ignoreFailures>
              <!-- FAILS to run, see ReleaseNotes
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
               -->
              <setupIncludes>
                <!-- special for mvn 3 (see below) -->
                <setupInclude>it-parent/pom.xml</setupInclude>
                <setupInclude>it0003-jni/pom.xml</setupInclude>
                <setupInclude>it0007-lib-shared/pom.xml</setupInclude>
                <setupInclude>it0010-lib-static/pom.xml</setupInclude>
                <setupInclude>it0020-lib-3rdparty/pom.xml</setupInclude>
              </setupIncludes>
              <pomIncludes>
                <pomInclude>*/pom.xml</pomInclude>
              </pomIncludes>
              <pomExcludes>
                <!-- Include to handle mvn 3 problem not finding parent for a dependency
                <pomExclude>it-parent/**</pomExclude>
-->
                <pomExclude>it0021-*/**</pomExclude>
                <pomExclude>it0022-*/**</pomExclude>
                <pomExclude>${its.to.skip}</pomExclude>
                <pomExclude>${skip.autoconf.it}</pomExclude>
                <pomExclude>${skip.fortran.it}</pomExclude>
                <pomExclude>${skip.toolchain.it}</pomExclude>
              </pomExcludes>
              <localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
              <settingsFile>src/it/settings.xml</settingsFile>
              <goals>
                <goal>clean</goal>
                <goal>install</goal>
              </goals>
            </configuration>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>has-autoconf</id>
      <activation>
        <file>
          <exists>/usr/bin/autoreconf</exists>
        </file>
      </activation>
      <properties>
        <skip.autoconf.it>false</skip.autoconf.it>
      </properties>
    </profile>
    <profile>
      <id>has-fortran</id>
      <activation>
        <file>
          <exists>/usr/bin/gfortran</exists>
        </file>
      </activation>
      <properties>
        <skip.fortran.it>false</skip.fortran.it>
      </properties>
    </profile>
    <profile>
      <id>has-toolchain</id>
      <activation>
        <file>
          <exists>${user.home}/.m2/toolchains.xml</exists>
        </file>
      </activation>
      <properties>
        <skip.toolchain.it>false</skip.toolchain.it>
      </properties>
    </profile>
  </profiles>
</project>
