<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright The WildFly Authors
    SPDX-License-Identifier: Apache-2.0

-->
<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>
    <groupId>org.jboss.galleon</groupId>
    <artifactId>galleon-parent</artifactId>
    <version>7.0.12.Final</version>
  </parent>

  <artifactId>galleon-api</artifactId>
  <packaging>jar</packaging>

  <name>Galleon API</name>
  <description>Galleon API</description>

  <dependencies>
    <dependency>
      <groupId>org.jboss.galleon</groupId>
      <artifactId>galleon-common-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.galleon</groupId>
      <artifactId>galleon-maven-universe</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.eclipse.aether</groupId>
          <artifactId>aether-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.aether</groupId>
          <artifactId>aether-util</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- to be able to copy the jar as a resource -->
    <dependency>
      <groupId>org.jboss.galleon</groupId>
      <artifactId>galleon-core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-core</id>
            <phase>process-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/target/classes</outputDirectory>
              <resources>
                <resource>
                  <directory>${basedir}/../core/target/</directory>
                  <includes>
                    <include>galleon-core-${project.version}.jar</include>
                  </includes>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <configuration>
              <classifier>test</classifier>
            </configuration>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-test-sources</id>
            <goals>
              <goal>test-jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-test-javadocs</id>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
