<?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>
        <artifactId>byte-buddy-parent</artifactId>
        <groupId>net.bytebuddy</groupId>
        <version>0.4</version>
    </parent>

    <artifactId>byte-buddy-agent</artifactId>
    <packaging>jar</packaging>

    <properties>
        <bytebuddy.agent>net.bytebuddy.agent.ByteBuddyAgent.Installer</bytebuddy.agent>
        <version.plugin.jar>2.4</version.plugin.jar>
    </properties>

    <name>Byte Buddy Java agent</name>
    <description>The Byte Buddy Java agent allows to access the JVM's HotSwap feature.</description>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Configure both agent use and OSGI -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${version.plugin.jar}</version>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Premain-Class>${bytebuddy.agent}</Premain-Class>
                            <Agent-Class>${bytebuddy.agent}</Agent-Class>
                            <Can-Redefine-Classes>true</Can-Redefine-Classes>
                            <Can-Retransform-Classes>true</Can-Retransform-Classes>
                            <Bundle-SymbolicName>
                                ${project.groupId}.${project.artifactId}
                            </Bundle-SymbolicName>
                            <Bundle-Name>${project.name}</Bundle-Name>
                            <Bundle-Description>${project.description}</Bundle-Description>
                            <Bundle-Version>${project.version}</Bundle-Version>
                            <Export-Package>net.bytebuddy.*</Export-Package>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
