| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- <?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.10.5</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>
- <jna.version>5.3.1</jna.version>
- <packages.list>net.bytebuddy.agent</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.10.4</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>
- <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>
- </profiles>
- </project>
|