All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.maven.net.bytebuddy.byte-buddy-agent.pom.xml Maven / Gradle / Ivy

There is a newer version: 1.50.0
Show newest version
<?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>1.12.8</version>
    </parent>

    <artifactId>byte-buddy-agent</artifactId>
    <packaging>jar</packaging>

    <properties>
        <bytebuddy.agent>net.bytebuddy.agent.Installer</bytebuddy.agent>
        <attach.package.sun>com.sun.tools.attach</attach.package.sun>
        <attach.package.ibm>com.ibm.tools.attach</attach.package.ibm>
        <packages.list>net.bytebuddy.agent,net.bytebuddy.agent.nullability</packages.list>
        <native.compiler.32>i686-w64-mingw32-gcc</native.compiler.32>
        <native.compiler.64>x86_64-w64-mingw32-gcc</native.compiler.64>
    </properties>

    <name>Byte Buddy agent</name>
    <description>The Byte Buddy agent offers convenience for attaching an agent to the local or a remote VM.</description>

    <!--
      The JNA dependency can be excluded safely. Byte Buddy will safely discover the
      non-availability and not use the corresponding virtual machine implementation. The
      implementation requires Java 7+ and is deactivated on Java 6 VMs.
    -->

    <dependencies>
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
            <version>${jna.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna-platform</artifactId>
            <version>${jna.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${version.junit}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${version.mockito}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>net.bytebuddy</groupId>
                    <artifactId>byte-buddy</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>net.bytebuddy</groupId>
                    <artifactId>byte-buddy-agent</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- Include last version of Byte Buddy manually. -->
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
            <version>1.12.7</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>..</directory>
                <targetPath>META-INF</targetPath>
                <filtering>true</filtering>
                <includes>
                    <include>LICENSE</include>
                    <include>NOTICE</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <!-- Create manifest file which is required for creating an OSGi bundle. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${version.plugin.jar}</version>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
            <!-- Specify OSGi packaging and agent manifest headers. -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>${version.plugin.bundle}</version>
                <executions>
                    <execution>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <instructions>
                        <Multi-Release>true</Multi-Release>
                        <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>
                        <Can-Set-Native-Method-Prefix>true</Can-Set-Native-Method-Prefix>
                        <Import-Package>
                            ${attach.package.sun};resolution:="optional",
                            ${attach.package.ibm};resolution:="optional"
                        </Import-Package>
                        <Export-Package>${packages.list}</Export-Package>
                    </instructions>
                </configuration>
            </plugin>
            <!-- Create a module-info.class file. -->
            <plugin>
                <groupId>codes.rafael.modulemaker</groupId>
                <artifactId>modulemaker-maven-plugin</artifactId>
                <version>${version.plugin.modulemaker}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm</artifactId>
                        <version>${version.asm}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>inject-module</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <name>net.bytebuddy.agent</name>
                    <version>${project.version}</version>
                    <multirelease>true</multirelease>
                    <packages>${packages.list}</packages>
                    <exports>${packages.list}</exports>
                    <requires>java.instrument</requires>
                    <static-requires>
                        jdk.attach,
                        com.sun.jna,
                        com.sun.jna.platform
                    </static-requires>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>native-compile</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>${version.plugin.exec}</version>
                        <executions>
                            <execution>
                                <id>compile-32</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>${native.compiler.32}</executable>
                                    <arguments>
                                        <argument>-shared</argument>
                                        <argument>-o</argument>
                                        <argument>${project.basedir}/src/main/resources/win32-x86/attach_hotspot_windows.dll</argument>
                                        <argument>${project.basedir}/src/main/c/attach_hotspot_windows.c</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>compile-64</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>${native.compiler.64}</executable>
                                    <arguments>
                                        <argument>-shared</argument>
                                        <argument>-o</argument>
                                        <argument>${project.basedir}/src/main/resources/win32-x86-64/attach_hotspot_windows.dll</argument>
                                        <argument>${project.basedir}/src/main/c/attach_hotspot_windows.c</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>checks</id>
            <activation>
                <jdk>[1.7,)</jdk>
            </activation>
            <build>
                <plugins>
                    <!-- Check for semantic versioning. -->
                    <plugin>
                        <groupId>com.github.siom79.japicmp</groupId>
                        <artifactId>japicmp-maven-plugin</artifactId>
                        <version>${version.plugin.japicmp}</version>
                        <configuration>
                            <skip>${japicmp.skip}</skip>
                            <parameter>
                                <oldVersionPattern>\d+\.\d+\.\d+</oldVersionPattern>
                                <ignoreMissingClasses>true</ignoreMissingClasses>
                            </parameter>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>cmp</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy