byte-buddy-agent-1.9.5.pom 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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.9.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. <version.unixsocket>2.0.4</version.unixsocket>
  16. <packages.list>net.bytebuddy.agent</packages.list>
  17. </properties>
  18. <name>Byte Buddy Java agent</name>
  19. <description>The Byte Buddy Java agent allows to access the JVM's HotSwap feature.</description>
  20. <!--
  21. The Unix socket dependency can be excluded safely. Byte Buddy will safely discover the
  22. non-availability and not use the corresponding virtual machine implementation. The
  23. implementation requires Java 7+ and is deactivated on Java 6 VMs.
  24. -->
  25. <dependencies>
  26. <dependency>
  27. <groupId>com.kohlschutter.junixsocket</groupId>
  28. <artifactId>junixsocket-native-common</artifactId>
  29. <version>${version.unixsocket}</version>
  30. <scope>provided</scope>
  31. </dependency>
  32. <dependency>
  33. <groupId>junit</groupId>
  34. <artifactId>junit</artifactId>
  35. <version>${version.junit}</version>
  36. <scope>test</scope>
  37. </dependency>
  38. <dependency>
  39. <groupId>org.mockito</groupId>
  40. <artifactId>mockito-core</artifactId>
  41. <version>${version.mockito}</version>
  42. <scope>test</scope>
  43. <exclusions>
  44. <exclusion>
  45. <groupId>net.bytebuddy</groupId>
  46. <artifactId>byte-buddy</artifactId>
  47. </exclusion>
  48. <exclusion>
  49. <groupId>net.bytebuddy</groupId>
  50. <artifactId>byte-buddy-agent</artifactId>
  51. </exclusion>
  52. </exclusions>
  53. </dependency>
  54. <!-- Include last version of Byte Buddy manually. -->
  55. <dependency>
  56. <groupId>net.bytebuddy</groupId>
  57. <artifactId>byte-buddy</artifactId>
  58. <version>1.9.3</version>
  59. <scope>test</scope>
  60. </dependency>
  61. </dependencies>
  62. <build>
  63. <plugins>
  64. <!-- Create manifest file which is required for creating an OSGi bundle. -->
  65. <plugin>
  66. <groupId>org.apache.maven.plugins</groupId>
  67. <artifactId>maven-jar-plugin</artifactId>
  68. <version>${version.plugin.jar}</version>
  69. <configuration>
  70. <archive>
  71. <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
  72. </archive>
  73. </configuration>
  74. </plugin>
  75. <!-- Specify OSGi packaging and agent manifest headers. -->
  76. <plugin>
  77. <groupId>org.apache.felix</groupId>
  78. <artifactId>maven-bundle-plugin</artifactId>
  79. <version>${version.plugin.bundle}</version>
  80. <executions>
  81. <execution>
  82. <phase>process-classes</phase>
  83. <goals>
  84. <goal>manifest</goal>
  85. </goals>
  86. </execution>
  87. </executions>
  88. <configuration>
  89. <instructions>
  90. <Multi-Release>true</Multi-Release>
  91. <Premain-Class>${bytebuddy.agent}</Premain-Class>
  92. <Agent-Class>${bytebuddy.agent}</Agent-Class>
  93. <Can-Redefine-Classes>true</Can-Redefine-Classes>
  94. <Can-Retransform-Classes>true</Can-Retransform-Classes>
  95. <Can-Set-Native-Method-Prefix>true</Can-Set-Native-Method-Prefix>
  96. <Import-Package>
  97. ${attach.package.sun};resolution:="optional",
  98. ${attach.package.ibm};resolution:="optional"
  99. </Import-Package>
  100. <Export-Package>${packages.list}</Export-Package>
  101. </instructions>
  102. </configuration>
  103. </plugin>
  104. <!-- Create a module-info.class file. -->
  105. <plugin>
  106. <groupId>codes.rafael.modulemaker</groupId>
  107. <artifactId>modulemaker-maven-plugin</artifactId>
  108. <version>${version.plugin.modulemaker}</version>
  109. <dependencies>
  110. <dependency>
  111. <groupId>org.ow2.asm</groupId>
  112. <artifactId>asm</artifactId>
  113. <version>${version.asm}</version>
  114. </dependency>
  115. </dependencies>
  116. <executions>
  117. <execution>
  118. <phase>package</phase>
  119. <goals>
  120. <goal>inject-module</goal>
  121. </goals>
  122. </execution>
  123. </executions>
  124. <configuration>
  125. <name>net.bytebuddy.agent</name>
  126. <multirelease>true</multirelease>
  127. <packages>${packages.list}</packages>
  128. <exports>${packages.list}</exports>
  129. <requires>java.instrument</requires>
  130. <static-requires>jdk.attach</static-requires>
  131. </configuration>
  132. </plugin>
  133. </plugins>
  134. </build>
  135. </project>