byte-buddy-agent-1.11.22.pom 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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.11.22</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</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. </properties>
  19. <name>Byte Buddy agent</name>
  20. <description>The Byte Buddy agent offers convenience for attaching an agent to the local or a remote VM.</description>
  21. <!--
  22. The JNA dependency can be excluded safely. Byte Buddy will safely discover the
  23. non-availability and not use the corresponding virtual machine implementation. The
  24. implementation requires Java 7+ and is deactivated on Java 6 VMs.
  25. -->
  26. <dependencies>
  27. <dependency>
  28. <groupId>net.java.dev.jna</groupId>
  29. <artifactId>jna</artifactId>
  30. <version>${jna.version}</version>
  31. <scope>provided</scope>
  32. </dependency>
  33. <dependency>
  34. <groupId>net.java.dev.jna</groupId>
  35. <artifactId>jna-platform</artifactId>
  36. <version>${jna.version}</version>
  37. <scope>provided</scope>
  38. </dependency>
  39. <dependency>
  40. <groupId>junit</groupId>
  41. <artifactId>junit</artifactId>
  42. <version>${version.junit}</version>
  43. <scope>test</scope>
  44. </dependency>
  45. <dependency>
  46. <groupId>org.mockito</groupId>
  47. <artifactId>mockito-core</artifactId>
  48. <version>${version.mockito}</version>
  49. <scope>test</scope>
  50. <exclusions>
  51. <exclusion>
  52. <groupId>net.bytebuddy</groupId>
  53. <artifactId>byte-buddy</artifactId>
  54. </exclusion>
  55. <exclusion>
  56. <groupId>net.bytebuddy</groupId>
  57. <artifactId>byte-buddy-agent</artifactId>
  58. </exclusion>
  59. </exclusions>
  60. </dependency>
  61. <!-- Include last version of Byte Buddy manually. -->
  62. <dependency>
  63. <groupId>net.bytebuddy</groupId>
  64. <artifactId>byte-buddy</artifactId>
  65. <version>1.11.21</version>
  66. <scope>test</scope>
  67. </dependency>
  68. </dependencies>
  69. <build>
  70. <resources>
  71. <resource>
  72. <directory>src/main/resources</directory>
  73. </resource>
  74. <resource>
  75. <directory>..</directory>
  76. <targetPath>META-INF</targetPath>
  77. <filtering>true</filtering>
  78. <includes>
  79. <include>LICENSE</include>
  80. <include>NOTICE</include>
  81. </includes>
  82. </resource>
  83. </resources>
  84. <plugins>
  85. <!-- Create manifest file which is required for creating an OSGi bundle. -->
  86. <plugin>
  87. <groupId>org.apache.maven.plugins</groupId>
  88. <artifactId>maven-jar-plugin</artifactId>
  89. <version>${version.plugin.jar}</version>
  90. <configuration>
  91. <archive>
  92. <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
  93. </archive>
  94. </configuration>
  95. </plugin>
  96. <!-- Specify OSGi packaging and agent manifest headers. -->
  97. <plugin>
  98. <groupId>org.apache.felix</groupId>
  99. <artifactId>maven-bundle-plugin</artifactId>
  100. <version>${version.plugin.bundle}</version>
  101. <executions>
  102. <execution>
  103. <phase>process-classes</phase>
  104. <goals>
  105. <goal>manifest</goal>
  106. </goals>
  107. </execution>
  108. </executions>
  109. <configuration>
  110. <instructions>
  111. <Multi-Release>true</Multi-Release>
  112. <Premain-Class>${bytebuddy.agent}</Premain-Class>
  113. <Agent-Class>${bytebuddy.agent}</Agent-Class>
  114. <Can-Redefine-Classes>true</Can-Redefine-Classes>
  115. <Can-Retransform-Classes>true</Can-Retransform-Classes>
  116. <Can-Set-Native-Method-Prefix>true</Can-Set-Native-Method-Prefix>
  117. <Import-Package>
  118. ${attach.package.sun};resolution:="optional",
  119. ${attach.package.ibm};resolution:="optional"
  120. </Import-Package>
  121. <Export-Package>${packages.list}</Export-Package>
  122. </instructions>
  123. </configuration>
  124. </plugin>
  125. <!-- Create a module-info.class file. -->
  126. <plugin>
  127. <groupId>codes.rafael.modulemaker</groupId>
  128. <artifactId>modulemaker-maven-plugin</artifactId>
  129. <version>${version.plugin.modulemaker}</version>
  130. <dependencies>
  131. <dependency>
  132. <groupId>org.ow2.asm</groupId>
  133. <artifactId>asm</artifactId>
  134. <version>${version.asm}</version>
  135. </dependency>
  136. </dependencies>
  137. <executions>
  138. <execution>
  139. <phase>package</phase>
  140. <goals>
  141. <goal>inject-module</goal>
  142. </goals>
  143. </execution>
  144. </executions>
  145. <configuration>
  146. <name>net.bytebuddy.agent</name>
  147. <version>${project.version}</version>
  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. <profile>
  212. <id>checks</id>
  213. <activation>
  214. <jdk>[1.7,)</jdk>
  215. </activation>
  216. <build>
  217. <plugins>
  218. <!-- Check for semantic versioning. -->
  219. <plugin>
  220. <groupId>com.github.siom79.japicmp</groupId>
  221. <artifactId>japicmp-maven-plugin</artifactId>
  222. <version>${version.plugin.japicmp}</version>
  223. <configuration>
  224. <skip>${japicmp.skip}</skip>
  225. <parameter>
  226. <oldVersionPattern>\d+\.\d+\.\d+</oldVersionPattern>
  227. <ignoreMissingClasses>true</ignoreMissingClasses>
  228. </parameter>
  229. </configuration>
  230. <executions>
  231. <execution>
  232. <phase>verify</phase>
  233. <goals>
  234. <goal>cmp</goal>
  235. </goals>
  236. </execution>
  237. </executions>
  238. </plugin>
  239. </plugins>
  240. </build>
  241. </profile>
  242. </profiles>
  243. </project>