<?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.jboss.byteman</groupId>
        <artifactId>byteman-root</artifactId>
        <version>4.0.13</version>
    </parent>

    <description>
        The byteman jar merges the byteman-agent jar contents with those of the
        byteman-jigsaw and byteman-layer jars as a mutli-release jar. The contents
        of the latter two jars are installed under META-INF/versions/9 ensuring
        that they are only linked when Byteman is deployed on a JDK9+ JVM
    </description>

    <artifactId>byteman</artifactId>

    <name>byteman</name>

    <properties>
        <maven.install.skip>false</maven.install.skip>
    </properties>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>src/assembly/byteman.xml</descriptor>
                            </descriptors>
                            <archive>
                                <manifestEntries>
                                    <Premain-Class>org.jboss.byteman.agent.Main</Premain-Class>
                                    <Agent-Class>org.jboss.byteman.agent.Main</Agent-Class>
                                    <Can-Redefine-Classes>true</Can-Redefine-Classes>
                                    <Can-Retransform-Classes>true</Can-Retransform-Classes>
                                    <Implementation-Version>${project.version}</Implementation-Version>
                                </manifestEntries>
                            </archive>
                        </configuration>
                    </execution>
                    <execution>
                        <id>make-source-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>true</appendAssemblyId>
                            <classifier>sources</classifier>
                            <descriptors>
                                <descriptor>src/assembly/byteman-source.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                    <execution>
                        <id>make-javadoc-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>true</appendAssemblyId>
                            <classifier>javadoc</classifier>
                            <descriptors>
                                <descriptor>src/assembly/byteman-javadoc.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.jboss.byteman</groupId>
            <artifactId>byteman-agent</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.byteman</groupId>
            <artifactId>byteman-layer</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.byteman</groupId>
            <artifactId>byteman-jigsaw</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
