byte-buddy-agent-1.14.10.pom 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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. <groupId>net.bytebuddy</groupId>
  6. <artifactId>byte-buddy-parent</artifactId>
  7. <version>1.14.10</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. <packages.list>net.bytebuddy.agent,net.bytebuddy.agent.utility.nullability</packages.list>
  16. <native.compiler.32>i686-w64-mingw32-gcc</native.compiler.32>
  17. <native.compiler.64>x86_64-w64-mingw32-gcc</native.compiler.64>
  18. <net.bytebuddy.test.jnapath />
  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>${version.jna}</version>
  32. <scope>provided</scope>
  33. </dependency>
  34. <dependency>
  35. <groupId>net.java.dev.jna</groupId>
  36. <artifactId>jna-platform</artifactId>
  37. <version>${version.jna}</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.14.9</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. <!-- Allow for specifying a custom library path for JNA. -->
  87. <plugin>
  88. <groupId>org.apache.maven.plugins</groupId>
  89. <artifactId>maven-surefire-plugin</artifactId>
  90. <version>${version.plugin.surefire}</version>
  91. <configuration combine.children="append">
  92. <argLine>-Djna.library.path=${net.bytebuddy.test.jnapath} ${surefire.arguments}</argLine>
  93. </configuration>
  94. </plugin>
  95. <!-- Create manifest file which is required for creating an OSGi bundle. -->
  96. <plugin>
  97. <groupId>org.apache.maven.plugins</groupId>
  98. <artifactId>maven-jar-plugin</artifactId>
  99. <version>${version.plugin.jar}</version>
  100. <configuration>
  101. <archive>
  102. <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
  103. </archive>
  104. </configuration>
  105. </plugin>
  106. <!-- Specify OSGi packaging and agent manifest headers. -->
  107. <plugin>
  108. <groupId>org.apache.felix</groupId>
  109. <artifactId>maven-bundle-plugin</artifactId>
  110. <version>${version.plugin.bundle}</version>
  111. <executions>
  112. <execution>
  113. <phase>process-classes</phase>
  114. <goals>
  115. <goal>manifest</goal>
  116. </goals>
  117. <configuration>
  118. <instructions>
  119. <Multi-Release>true</Multi-Release>
  120. <Premain-Class>${bytebuddy.agent}</Premain-Class>
  121. <Agent-Class>${bytebuddy.agent}</Agent-Class>
  122. <Can-Redefine-Classes>true</Can-Redefine-Classes>
  123. <Can-Retransform-Classes>true</Can-Retransform-Classes>
  124. <Can-Set-Native-Method-Prefix>true</Can-Set-Native-Method-Prefix>
  125. <Import-Package>
  126. ${attach.package.sun};resolution:="optional",
  127. ${attach.package.ibm};resolution:="optional"
  128. </Import-Package>
  129. <Export-Package>${packages.list}</Export-Package>
  130. </instructions>
  131. </configuration>
  132. </execution>
  133. </executions>
  134. </plugin>
  135. <!-- Create a module-info.class file. -->
  136. <plugin>
  137. <groupId>codes.rafael.modulemaker</groupId>
  138. <artifactId>modulemaker-maven-plugin</artifactId>
  139. <version>${version.plugin.modulemaker}</version>
  140. <dependencies>
  141. <dependency>
  142. <groupId>org.ow2.asm</groupId>
  143. <artifactId>asm</artifactId>
  144. <version>${version.asm}</version>
  145. </dependency>
  146. </dependencies>
  147. <executions>
  148. <execution>
  149. <phase>prepare-package</phase>
  150. <goals>
  151. <goal>make-module</goal>
  152. </goals>
  153. <configuration>
  154. <skip>${modulemaker.skip}</skip>
  155. <name>${project.groupId}.agent</name>
  156. <version>${project.version}</version>
  157. <multirelease>true</multirelease>
  158. <packages>${packages.list}</packages>
  159. <exports>${packages.list}</exports>
  160. <requires>java.instrument</requires>
  161. <static-requires>
  162. jdk.attach,
  163. com.sun.jna,
  164. com.sun.jna.platform
  165. </static-requires>
  166. </configuration>
  167. </execution>
  168. </executions>
  169. </plugin>
  170. </plugins>
  171. </build>
  172. <profiles>
  173. <profile>
  174. <id>native-compile</id>
  175. <activation>
  176. <activeByDefault>false</activeByDefault>
  177. </activation>
  178. <build>
  179. <plugins>
  180. <plugin>
  181. <groupId>org.codehaus.mojo</groupId>
  182. <artifactId>exec-maven-plugin</artifactId>
  183. <version>${version.plugin.exec}</version>
  184. <executions>
  185. <execution>
  186. <id>compile-32</id>
  187. <phase>compile</phase>
  188. <goals>
  189. <goal>exec</goal>
  190. </goals>
  191. <configuration>
  192. <executable>${native.compiler.32}</executable>
  193. <arguments>
  194. <argument>-shared</argument>
  195. <argument>-o</argument>
  196. <argument>${project.basedir}/src/main/resources/win32-x86/attach_hotspot_windows.dll</argument>
  197. <argument>${project.basedir}/src/main/c/attach_hotspot_windows.c</argument>
  198. </arguments>
  199. </configuration>
  200. </execution>
  201. <execution>
  202. <id>compile-64</id>
  203. <phase>compile</phase>
  204. <goals>
  205. <goal>exec</goal>
  206. </goals>
  207. <configuration>
  208. <executable>${native.compiler.64}</executable>
  209. <arguments>
  210. <argument>-shared</argument>
  211. <argument>-o</argument>
  212. <argument>${project.basedir}/src/main/resources/win32-x86-64/attach_hotspot_windows.dll</argument>
  213. <argument>${project.basedir}/src/main/c/attach_hotspot_windows.c</argument>
  214. </arguments>
  215. </configuration>
  216. </execution>
  217. </executions>
  218. </plugin>
  219. </plugins>
  220. </build>
  221. </profile>
  222. </profiles>
  223. </project>