<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>jakarta.enterprise</groupId>
        <artifactId>cdi-tck-parent</artifactId>
        <version>3.0.0-M2</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <groupId>jakarta.enterprise</groupId>
    <artifactId>cdi-tck-dist-porting-package</artifactId>
    <version>3.0.0-M2</version>
    <packaging>pom</packaging>
    <name>CDI TCK Distribution - Weld Porting Package</name>

    <dependencies>
        <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-porting-package-tck</artifactId>
            <version>${weld.version}</version>
            <optional>true</optional>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-porting-package-tck</artifactId>
            <version>${weld.version}</version>
            <optional>true</optional>
            <scope>compile</scope>
            <type>test-jar</type>
            <classifier>sources</classifier>
        </dependency>

        <!-- The TCK distribution includes weld/porting-package-lib/weld-inject-tck-runner-X.Y.Z-Q-tests.jar which contains two classes showing how Weld passes the CDI TCK -->
        <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-inject-tck-runner</artifactId>
            <version>${weld.version}</version>
            <optional>true</optional>
            <scope>compile</scope>
            <type>test-jar</type>
        </dependency>
        <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-inject-tck-runner</artifactId>
            <version>${weld.version}</version>
            <optional>true</optional>
            <scope>compile</scope>
            <type>test-jar</type>
            <classifier>test-sources</classifier>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <!-- Following configuration shouldn't be needed once the finalName property is fixed in weld-parent -->
                <executions>
                    <execution>
                        <id>dist</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly/assembly.xml</descriptor>
                            </descriptors>
                            <finalName>${project.build.finalName}</finalName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-jboss-tck-runner</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <stripVersion>true</stripVersion>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.jboss.weld</groupId>
                                    <artifactId>weld-jboss-runner-tck</artifactId>
                                    <version>${weld.version}</version>
                                    <classifier>dist</classifier>
                                    <type>zip</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <excludeGroupIds>jakarta.enterprise</excludeGroupIds>
                            <stripVersion>true</stripVersion>
                            <overWriteReleases>true</overWriteReleases>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
