byte-buddy-agent-1.10.5.pom 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <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">
  3. <modelVersion>4.0.0</modelVersion>
  4. <parent>
  5. <artifactId>byte-buddy-parent</artifactId>
  6. <groupId>net.bytebuddy</groupId>
  7. <version>1.10.5</version>
  8. </parent>
  9. <artifactId>byte-buddy-agent</artifactId>
  10. <packaging>jar</packaging>
  11. <properties>
  12. <bytebuddy.agent>net.bytebuddy.agent.Installer</bytebuddy.agent>
  13. <attach.package.sun>com.sun.tools.attach</attach.package.sun>
  14. <attach.package.ibm>com.ibm.tools.attach</attach.package.ibm>
  15. <jna.version>5.3.1</jna.version>
  16. <packages.list>net.bytebuddy.agent</packages.list>
  17. <native.compiler.32>i686-w64-mingw32-gcc</native.compiler.32>
  18. <native.compiler.64>x86_64-w64-mingw32-gcc</native.compiler.64>
  19. </properties>
  20. <name>Byte Buddy agent</name>
  21. <description>The Byte Buddy agent offers convenience for attaching an agent to the local or a remote VM.</description>
  22. <!--
  23. The JNA dependency can be excluded safely. Byte Buddy will safely discover the
  24. non-availability and not use the corresponding virtual machine implementation. The
  25. implementation requires Java 7+ and is deactivated on Java 6 VMs.
  26. -->
  27. <dependencies>
  28. <dependency>
  29. <groupId>net.java.dev.jna</groupId>
  30. <artifactId>jna</artifactId>
  31. <version>${jna.version}</version>
  32. <scope>provided</scope>
  33. </dependency>
  34. <dependency>
  35. <groupId>net.java.dev.jna</groupId>
  36. <artifactId>jna-platform</artifactId>
  37. <version>${jna.version}</version>
  38. <scope>provided</scope>
  39. </dependency>
  40. <dependency>
  41. <groupId>junit</groupId>
  42. <artifactId>junit</artifactId>
  43. <version>${version.junit}</version>
  44. <scope>test</scope>
  45. </dependency>
  46. <dependency>
  47. <groupId>org.mockito</groupId>
  48. <artifactId>mockito-core</artifactId>
  49. <version>${version.mockito}</version>
  50. <scope>test</scope>
  51. <exclusions>
  52. <exclusion>
  53. <groupId>net.bytebuddy</groupId>
  54. <artifactId>byte-buddy</artifactId>
  55. </exclusion>
  56. <exclusion>
  57. <groupId>net.bytebuddy</groupId>
  58. <artifactId>byte-buddy-agent</artifactId>
  59. </exclusion>
  60. </exclusions>
  61. </dependency>
  62. <!-- Include last version of Byte Buddy manually. -->
  63. <dependency>
  64. <groupId>net.bytebuddy</groupId>
  65. <artifactId>byte-buddy</artifactId>
  66. <version>1.10.4</version>
  67. <scope>test</scope>
  68. </dependency>
  69. </dependencies>
  70. <build>
  71. <resources>
  72. <resource>
  73. <directory>src/main/resources</directory>
  74. </resource>
  75. <resource>
  76. <directory>..</directory>
  77. <targetPath>META-INF</targetPath>
  78. <filtering>true</filtering>
  79. <includes>
  80. <include>LICENSE</include>
  81. <include>NOTICE</include>
  82. </includes>
  83. </resource>
  84. </resources>
  85. <plugins>
  86. <!-- Create manifest file which is required for creating an OSGi bundle. -->
  87. <plugin>
  88. <groupId>org.apache.maven.plugins</groupId>
  89. <artifactId>maven-jar-plugin</artifactId>
  90. <version>${version.plugin.jar}</version>
  91. <configuration>
  92. <archive>
  93. <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
  94. </archive>
  95. </configuration>
  96. </plugin>
  97. <!-- Specify OSGi packaging and agent manifest headers. -->
  98. <plugin>
  99. <groupId>org.apache.felix</groupId>
  100. <artifactId>maven-bundle-plugin</artifactId>
  101. <version>${version.plugin.bundle}</version>
  102. <executions>
  103. <execution>
  104. <phase>process-classes</phase>
  105. <goals>
  106. <goal>manifest</goal>
  107. </goals>
  108. </execution>
  109. </executions>
  110. <configuration>
  111. <instructions>
  112. <Multi-Release>true</Multi-Release>
  113. <Premain-Class>${bytebuddy.agent}</Premain-Class>
  114. <Agent-Class>${bytebuddy.agent}</Agent-Class>
  115. <Can-Redefine-Classes>true</Can-Redefine-Classes>
  116. <Can-Retransform-Classes>true</Can-Retransform-Classes>
  117. <Can-Set-Native-Method-Prefix>true</Can-Set-Native-Method-Prefix>
  118. <Import-Package>
  119. ${attach.package.sun};resolution:="optional",
  120. ${attach.package.ibm};resolution:="optional"
  121. </Import-Package>
  122. <Export-Package>${packages.list}</Export-Package>
  123. </instructions>
  124. </configuration>
  125. </plugin>
  126. <!-- Create a module-info.class file. -->
  127. <plugin>
  128. <groupId>codes.rafael.modulemaker</groupId>
  129. <artifactId>modulemaker-maven-plugin</artifactId>
  130. <version>${version.plugin.modulemaker}</version>
  131. <dependencies>
  132. <dependency>
  133. <groupId>org.ow2.asm</groupId>
  134. <artifactId>asm</artifactId>
  135. <version>${version.asm}</version>
  136. </dependency>
  137. </dependencies>
  138. <executions>
  139. <execution>
  140. <phase>package</phase>
  141. <goals>
  142. <goal>inject-module</goal>
  143. </goals>
  144. </execution>
  145. </executions>
  146. <configuration>
  147. <name>net.bytebuddy.agent</name>
  148. <multirelease>true</multirelease>
  149. <packages>${packages.list}</packages>
  150. <exports>${packages.list}</exports>
  151. <requires>java.instrument</requires>
  152. <static-requires>
  153. jdk.attach,
  154. com.sun.jna,
  155. com.sun.jna.platform
  156. </static-requires>
  157. </configuration>
  158. </plugin>
  159. </plugins>
  160. </build>
  161. <profiles>
  162. <profile>
  163. <id>native-compile</id>
  164. <activation>
  165. <activeByDefault>false</activeByDefault>
  166. </activation>
  167. <build>
  168. <plugins>
  169. <plugin>
  170. <groupId>org.codehaus.mojo</groupId>
  171. <artifactId>exec-maven-plugin</artifactId>
  172. <version>${version.plugin.exec}</version>
  173. <executions>
  174. <execution>
  175. <id>compile-32</id>
  176. <phase>compile</phase>
  177. <goals>
  178. <goal>exec</goal>
  179. </goals>
  180. <configuration>
  181. <executable>${native.compiler.32}</executable>
  182. <arguments>
  183. <argument>-shared</argument>
  184. <argument>-o</argument>
  185. <argument>${project.basedir}/src/main/resources/win32-x86/attach_hotspot_windows.dll</argument>
  186. <argument>${project.basedir}/src/main/c/attach_hotspot_windows.c</argument>
  187. </arguments>
  188. </configuration>
  189. </execution>
  190. <execution>
  191. <id>compile-64</id>
  192. <phase>compile</phase>
  193. <goals>
  194. <goal>exec</goal>
  195. </goals>
  196. <configuration>
  197. <executable>${native.compiler.64}</executable>
  198. <arguments>
  199. <argument>-shared</argument>
  200. <argument>-o</argument>
  201. <argument>${project.basedir}/src/main/resources/win32-x86-64/attach_hotspot_windows.dll</argument>
  202. <argument>${project.basedir}/src/main/c/attach_hotspot_windows.c</argument>
  203. </arguments>
  204. </configuration>
  205. </execution>
  206. </executions>
  207. </plugin>
  208. </plugins>
  209. </build>
  210. </profile>
  211. </profiles>
  212. </project>