You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pom.xml 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  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"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <parent>
  6. <groupId>org.aspectj</groupId>
  7. <artifactId>aspectj-parent</artifactId>
  8. <version>1.9.23-SNAPSHOT</version>
  9. </parent>
  10. <artifactId>aspectjweaver</artifactId>
  11. <name>AspectJ Weaver</name>
  12. <description>
  13. The AspectJ weaver applies aspects to Java classes. It can be used as a Java agent in order to apply load-time
  14. weaving (LTW) during class-loading and also contains the AspectJ runtime classes.
  15. </description>
  16. <url>https://www.eclipse.org/aspectj/</url>
  17. <licenses>
  18. <license>
  19. <name>Eclipse Public License - v 2.0</name>
  20. <url>https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt</url>
  21. <distribution>repo</distribution>
  22. </license>
  23. </licenses>
  24. <developers>
  25. <developer>
  26. <id>aclement</id>
  27. <name>Andy Clement</name>
  28. <email>aclement@vmware.com</email>
  29. </developer>
  30. <developer>
  31. <id>kriegaex</id>
  32. <name>Alexander Kriegisch</name>
  33. <email>kriegaex@aspectj.dev</email>
  34. </developer>
  35. </developers>
  36. <scm>
  37. <url>https://github.com/eclipse/org.aspectj</url>
  38. <connection>scm:git:https://github.com/eclipse/org.aspectj.git</connection>
  39. <developerConnection>scm:git:ssh://git@github.com:eclipse/org.aspectj.git</developerConnection>
  40. </scm>
  41. <properties>
  42. <!-- By default, do not deploy artifacts - but deploy this public one -->
  43. <maven.deploy.skip>false</maven.deploy.skip>
  44. <!-- By default, do not sign artifacts - but sign this public one -->
  45. <maven.gpg.skip>false</maven.gpg.skip>
  46. </properties>
  47. <build>
  48. <plugins>
  49. <!-- Skip creation of main + test JARs -->
  50. <plugin>
  51. <groupId>org.apache.maven.plugins</groupId>
  52. <artifactId>maven-jar-plugin</artifactId>
  53. <executions>
  54. <execution>
  55. <id>default-jar</id>
  56. <phase>none</phase>
  57. </execution>
  58. <execution>
  59. <id>test-jar</id>
  60. <phase>none</phase>
  61. </execution>
  62. </executions>
  63. </plugin>
  64. <plugin>
  65. <groupId>org.apache.maven.plugins</groupId>
  66. <artifactId>maven-dependency-plugin</artifactId>
  67. <executions>
  68. <execution>
  69. <id>unzip-dependency-sources</id>
  70. <goals>
  71. <goal>unpack-dependencies</goal>
  72. </goals>
  73. <phase>prepare-package</phase>
  74. <configuration>
  75. <classifier>sources</classifier>
  76. <!--<failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>-->
  77. <includeGroupIds>org.ow2.asm</includeGroupIds>
  78. <includeArtifactIds>asm,asm-commons</includeArtifactIds>
  79. <outputDirectory>${project.build.directory}/unzipped-sources</outputDirectory>
  80. <!-- Avoid accidentally shading test-scoped dependencies like JUnit -->
  81. <includeScope>runtime</includeScope>
  82. </configuration>
  83. </execution>
  84. </executions>
  85. </plugin>
  86. <plugin>
  87. <groupId>org.apache.maven.plugins</groupId>
  88. <artifactId>maven-assembly-plugin</artifactId>
  89. <executions>
  90. <execution>
  91. <id>aspectjweaver-assembly</id>
  92. <phase>package</phase>
  93. <goals>
  94. <goal>single</goal>
  95. </goals>
  96. <configuration>
  97. <finalName>aspectjweaver-${project.version}</finalName>
  98. <appendAssemblyId>false</appendAssemblyId>
  99. <archive>
  100. <manifestEntries>
  101. <Automatic-Module-Name>org.aspectj.weaver</Automatic-Module-Name>
  102. <Premain-Class>org.aspectj.weaver.loadtime.Agent</Premain-Class>
  103. <Agent-Class>org.aspectj.weaver.loadtime.Agent</Agent-Class>
  104. <Can-Redefine-Classes>true</Can-Redefine-Classes>
  105. </manifestEntries>
  106. <manifestSections>
  107. <manifestSection>
  108. <name>org/aspectj/weaver/</name>
  109. <manifestEntries>
  110. <Specification-Title>AspectJ Weaver Classes</Specification-Title>
  111. <Specification-Version>${project.version}</Specification-Version>
  112. <Specification-Vendor>https://www.eclipse.org/aspectj/</Specification-Vendor>
  113. <Implementation-Title>org.aspectj.weaver</Implementation-Title>
  114. <Implementation-Version>${project.version}</Implementation-Version>
  115. <Implementation-Vendor>https://www.eclipse.org/aspectj/</Implementation-Vendor>
  116. <Bundle-Name>AspectJ Weaver</Bundle-Name>
  117. <Bundle-Version>${project.version}</Bundle-Version>
  118. <!--
  119. WARNING: Please avoid line breaks in manifest values! They are passed on like this:
  120. Assembly Plugin -> Plexus Archiver -> JRE java.util.jar.Manifest.write(OutputStream).
  121. The JRE Manifest class inserts hard line breaks always after 72 characters, no matter if those
  122. 72 characters contain line feeds, tabs or spaces. Hence, it can happen that unwanted blank lines
  123. end up in the middle of a manifest section, making the manifest invalid. Calls like e.g.
  124. 'java -cp aspectjtools.jar org.aspectj.tools.ajc.Main' can then fail with the absolutely
  125. unexpected error 'Could not find or load main class org.aspectj.tools.ajc.Main'.
  126. Alexander Kriegisch created this bug ticket:
  127. https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8263924
  128. In IntelliJ IDEA you can deactivate wrapping text inside XML tags like this:
  129. File | Settings | Editor | Code Style | XML | Wrap text -> deactivate
  130. -->
  131. <Bundle-Copyright>(C) Copyright 1999-2001 Xerox Corporation, 2002 Palo Alto Research Center, Incorporated (PARC), 2003-2020 Contributors. All Rights Reserved</Bundle-Copyright>
  132. </manifestEntries>
  133. </manifestSection>
  134. </manifestSections>
  135. </archive>
  136. <descriptors>
  137. <descriptor>aspectjweaver-assembly.xml</descriptor>
  138. </descriptors>
  139. </configuration>
  140. </execution>
  141. <execution>
  142. <id>aspectjweaver-sources-assembly</id>
  143. <phase>package</phase>
  144. <goals>
  145. <goal>single</goal>
  146. </goals>
  147. <configuration>
  148. <!-- The assembly ID 'sources' becomes the artifact classifier, exactly what we want -->
  149. <appendAssemblyId>true</appendAssemblyId>
  150. <skipAssembly>${maven.source.skip}</skipAssembly>
  151. <archive>
  152. </archive>
  153. <descriptors>
  154. <descriptor>aspectjweaver-sources-assembly.xml</descriptor>
  155. </descriptors>
  156. </configuration>
  157. </execution>
  158. </executions>
  159. </plugin>
  160. <!--
  161. Relocate ASM from 'org.objectweb.asm' to 'aj.org.objectweb.asm'
  162. TODO: Using Maven Shade after Maven Assembly instead of creating uber JAR and relocating package names at the
  163. same time is suboptimal and maybe slower than doing both at the same time. Migrating from Assembly to Shade
  164. requires all dependencies to produce source JARs, though, which currently is not the case. Because we also
  165. want to create a complete source JAR, for now we keep Assembly around, because it manually copies project
  166. sources from their respective directories before zipping them up.
  167. -->
  168. <plugin>
  169. <groupId>org.apache.maven.plugins</groupId>
  170. <artifactId>maven-shade-plugin</artifactId>
  171. <configuration>
  172. <createSourcesJar>true</createSourcesJar>
  173. <createDependencyReducedPom>false</createDependencyReducedPom>
  174. <shadedArtifactAttached>false</shadedArtifactAttached>
  175. </configuration>
  176. <executions>
  177. <execution>
  178. <id>asm-relocate</id>
  179. <phase>package</phase>
  180. <goals>
  181. <goal>shade</goal>
  182. </goals>
  183. <configuration>
  184. <minimizeJar>false</minimizeJar>
  185. <shadeSourcesContent>true</shadeSourcesContent>
  186. <artifactSet>
  187. <includes>
  188. <include>${project.groupId}:${project.artifactId}</include>
  189. </includes>
  190. </artifactSet>
  191. <relocations>
  192. <relocation>
  193. <pattern>org.objectweb.asm</pattern>
  194. <shadedPattern>aj.org.objectweb.asm</shadedPattern>
  195. </relocation>
  196. </relocations>
  197. </configuration>
  198. </execution>
  199. </executions>
  200. </plugin>
  201. <plugin>
  202. <groupId>org.codehaus.mojo</groupId>
  203. <artifactId>truezip-maven-plugin</artifactId>
  204. <executions>
  205. <execution>
  206. <id>unzip-relocated-sources</id>
  207. <phase>package</phase>
  208. <goals>
  209. <goal>copy</goal>
  210. </goals>
  211. <configuration>
  212. <!--
  213. Skip, if javadoc generation is also meant to be skipped, which is the default unless the 'release'
  214. profile is active or the property is overridden manually to be false. See property definitions in parent
  215. POM for default case and release profile.
  216. -->
  217. <skip>${maven.javadoc.skip}</skip>
  218. <verbose>true</verbose>
  219. <filesets>
  220. <fileset>
  221. <directory>${project.build.directory}/${project.build.finalName}-sources.jar/org/aspectj</directory>
  222. <outputDirectory>${project.build.directory}/unpacked-sources/org/aspectj</outputDirectory>
  223. </fileset>
  224. <fileset>
  225. <directory>${project.build.directory}/${project.build.finalName}-sources.jar/aj</directory>
  226. <outputDirectory>${project.build.directory}/unpacked-sources/aj</outputDirectory>
  227. </fileset>
  228. </filesets>
  229. </configuration>
  230. </execution>
  231. </executions>
  232. </plugin>
  233. <plugin>
  234. <groupId>org.apache.maven.plugins</groupId>
  235. <artifactId>maven-javadoc-plugin</artifactId>
  236. <executions>
  237. <execution>
  238. <id>javadoc-jar</id>
  239. <phase>package</phase>
  240. <goals>
  241. <goal>jar</goal>
  242. </goals>
  243. <configuration>
  244. <sourcepath>${project.build.directory}/unpacked-sources</sourcepath>
  245. </configuration>
  246. </execution>
  247. </executions>
  248. </plugin>
  249. <plugin>
  250. <groupId>org.apache.maven.plugins</groupId>
  251. <artifactId>maven-antrun-plugin</artifactId>
  252. <executions>
  253. <!-- Remove javadoc version number from HTML comment to keep website diffs small -->
  254. <execution>
  255. <id>filter-javadocs</id>
  256. <configuration>
  257. <skip>${maven.javadoc.skip}</skip>
  258. </configuration>
  259. </execution>
  260. </executions>
  261. </plugin>
  262. <plugin>
  263. <groupId>org.apache.maven.plugins</groupId>
  264. <artifactId>maven-resources-plugin</artifactId>
  265. <executions>
  266. <execution>
  267. <id>copy-javadoc-to-dist</id>
  268. <phase>package</phase>
  269. <goals>
  270. <goal>copy-resources</goal>
  271. </goals>
  272. <configuration>
  273. <!--
  274. Skip, if javadoc generation is also meant to be skipped, which is the default unless the 'release'
  275. profile is active or the property is overridden manually to be false. See property definitions in parent
  276. POM for default case and release profile.
  277. -->
  278. <skip>${maven.javadoc.skip}</skip>
  279. <outputDirectory>${project.basedir}/../aj-build/dist/docs/doc/weaver-api</outputDirectory>
  280. <resources>
  281. <resource>
  282. <directory>${project.build.directory}/apidocs</directory>
  283. </resource>
  284. </resources>
  285. </configuration>
  286. </execution>
  287. </executions>
  288. </plugin>
  289. <!-- Caveat: Attaching the flattened POM needs packaging=jar, so do not use packaging=pom for this module -->
  290. <plugin>
  291. <groupId>org.codehaus.mojo</groupId>
  292. <artifactId>flatten-maven-plugin</artifactId>
  293. <executions>
  294. <!-- Remove dependencies declared in this POM (if any) from uber JAR and strip down POM -->
  295. <execution>
  296. <id>flatten</id>
  297. <phase>process-resources</phase>
  298. <goals>
  299. <goal>flatten</goal>
  300. </goals>
  301. <configuration>
  302. <flattenMode>oss</flattenMode>
  303. <pomElements>
  304. <dependencies>remove</dependencies>
  305. <repositories>remove</repositories>
  306. </pomElements>
  307. <outputDirectory>${project.build.directory}</outputDirectory>
  308. <flattenedPomFilename>flattened-pom.xml</flattenedPomFilename>
  309. </configuration>
  310. </execution>
  311. </executions>
  312. </plugin>
  313. <!-- Deploy this module to Nexus (Sonatype OSSRH, releases promotable to Maven Central) -->
  314. <plugin>
  315. <groupId>org.sonatype.plugins</groupId>
  316. <artifactId>nexus-staging-maven-plugin</artifactId>
  317. </plugin>
  318. </plugins>
  319. <pluginManagement>
  320. <plugins>
  321. <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
  322. <plugin>
  323. <groupId>org.eclipse.m2e</groupId>
  324. <artifactId>lifecycle-mapping</artifactId>
  325. <version>1.0.0</version>
  326. <configuration>
  327. <lifecycleMappingMetadata>
  328. <pluginExecutions>
  329. <pluginExecution>
  330. <pluginExecutionFilter>
  331. <groupId>
  332. org.codehaus.mojo
  333. </groupId>
  334. <artifactId>
  335. flatten-maven-plugin
  336. </artifactId>
  337. <versionRange>
  338. [1.2.2,)
  339. </versionRange>
  340. <goals>
  341. <goal>flatten</goal>
  342. </goals>
  343. </pluginExecutionFilter>
  344. <action>
  345. <ignore></ignore>
  346. </action>
  347. </pluginExecution>
  348. </pluginExecutions>
  349. </lifecycleMappingMetadata>
  350. </configuration>
  351. </plugin>
  352. </plugins>
  353. </pluginManagement>
  354. </build>
  355. <dependencies>
  356. <dependency>
  357. <groupId>org.aspectj</groupId>
  358. <artifactId>weaver</artifactId>
  359. <version>${project.version}</version>
  360. </dependency>
  361. <dependency>
  362. <groupId>org.aspectj</groupId>
  363. <artifactId>loadtime</artifactId>
  364. <version>${project.version}</version>
  365. </dependency>
  366. <dependency>
  367. <groupId>org.ow2.asm</groupId>
  368. <artifactId>asm</artifactId>
  369. </dependency>
  370. <dependency>
  371. <groupId>org.ow2.asm</groupId>
  372. <artifactId>asm-commons</artifactId>
  373. </dependency>
  374. </dependencies>
  375. </project>