<?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.hotswapagent</groupId>
        <artifactId>hotswap-agent-parent</artifactId>
        <version>1.3.0</version>
        <relativePath>../hotswap-agent-parent/pom.xml</relativePath>
    </parent>

    <artifactId>hotswap-agent</artifactId>
    <description>Distribution of HotswapAgent core and all plugins in all-in-one JAR.</description>

    <packaging>jar</packaging>

    <dependencies>
        <dependency>
            <groupId>org.hotswapagent</groupId>
            <artifactId>hotswap-agent-plugins</artifactId>
            <version>${project.version}</version>
            <type>pom</type>
        </dependency>

        <dependency>
            <groupId>org.pegdown</groupId>
            <artifactId>pegdown</artifactId>
            <version>1.4.1</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!--TODO - run manually from IDE. If run from maven, unable to access JAR content-->
            <!--<plugin>-->
            <!--<groupId>org.codehaus.mojo</groupId>-->
            <!--<artifactId>exec-maven-plugin</artifactId>-->
            <!--<version>1.2.1</version>-->
            <!--<executions>-->
            <!--<execution>-->
            <!--<phase>package</phase>-->
            <!--<goals>-->
            <!--<goal>java</goal>-->
            <!--</goals>-->
            <!--<configuration>-->
            <!--<mainClass>org.hotswap.agent.distribution.PluginDocs</mainClass>-->
            <!--</configuration>-->
            <!--</execution>-->
            <!--</executions>-->
            <!--</plugin>-->

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>distribution</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>assembly/agent/jar.xml</descriptor>
                            </descriptors>
                            <finalName>hotswap-agent</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                            <archive>
                                <manifestEntries>
                                    <Implementation-Title>${project.build.finalName}</Implementation-Title>
                                    <Implementation-Version>${project.version}</Implementation-Version>
                                    <Agent-Class>org.hotswap.agent.HotswapAgent</Agent-Class>
                                    <Premain-Class>org.hotswap.agent.HotswapAgent</Premain-Class>
                                    <!-- <Boot-Class-Path>hotswap-agent.jar</Boot-Class-Path>  -->
                                    <Can-Redefine-Classes>true</Can-Redefine-Classes>
                                    <Can-Retransform-Classes>true</Can-Retransform-Classes>
                                </manifestEntries>
                            </archive>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
