<?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>
  <parent>
    <groupId>org.codehaus.mojo.natives</groupId>
    <artifactId>maven-native</artifactId>
    <version>1.2.0</version>
  </parent>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>native-maven-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <name>Native Maven Plugin</name>
  <inceptionYear>2005</inceptionYear>
  <prerequisites>
    <maven>3.9.0</maven>
  </prerequisites>
  <dependencies>
    <dependency>
      <groupId>org.apache.bcel</groupId>
      <artifactId>bcel</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.mojo.natives</groupId>
      <artifactId>maven-native-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.mojo.natives</groupId>
      <artifactId>maven-native-bcc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.mojo.natives</groupId>
      <artifactId>maven-native-generic-c</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.mojo.natives</groupId>
      <artifactId>maven-native-gnucobol</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.mojo.natives</groupId>
      <artifactId>maven-native-javah</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.mojo.natives</groupId>
      <artifactId>maven-native-manager</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.mojo.natives</groupId>
      <artifactId>maven-native-mingw</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.mojo.natives</groupId>
      <artifactId>maven-native-msvc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-archiver</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-xml</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.inject</groupId>
      <artifactId>javax.inject</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <configuration>
          <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
        <executions>
          <execution>
            <id>default-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
            <phase>process-classes</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.eclipse.sisu</groupId>
        <artifactId>sisu-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>test-index</id>
            <goals>
              <goal>test-index</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>run-its</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <configuration>
              <environmentVariables>
                <!-- each IT is a short-lived JVM: C2 compilation and parallel GC only add startup time -->
                <JAVA_TOOL_OPTIONS>-XX:TieredStopAtLevel=1 -XX:+UseSerialGC</JAVA_TOOL_OPTIONS>
              </environmentVariables>
              <projectsDirectory>src/it</projectsDirectory>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <!-- jni and linkages hold the fixture modules; the aggregators next to them are the ITs, one per OS family -->
              <pomIncludes>
                <pomInclude>jni-*/pom.xml</pomInclude>
                <pomInclude>linkages-*/pom.xml</pomInclude>
              </pomIncludes>
              <postBuildHookScript>verify</postBuildHookScript>
              <goals>
                <goal>verify</goal>
              </goals>
              <properties>
                <native.plugin.version>${project.version}</native.plugin.version>
              </properties>
            </configuration>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
