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 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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. <!-- The AspectJ root POM is the parent, but this module is not a submodule -->
  6. <parent>
  7. <groupId>org.aspectj</groupId>
  8. <artifactId>aspectj-parent</artifactId>
  9. <version>1.9.7.BUILD-SNAPSHOT</version>
  10. </parent>
  11. <artifactId>asm-renamed</artifactId>
  12. <version>${asm.version}</version>
  13. <name>ASM for AspectJ</name>
  14. <description>
  15. This module relocates the original ASM artifact from package name 'org.objectweb.asm' to 'aj.org.objectweb.asm',
  16. using Maven Shade Plugin.
  17. In order to avoid committing the binary to the AspectJ SCM repository and using it as a system-scoped dependency, we
  18. deploy it to aspectj.dev.
  19. Whenever it is necessary to upgrade to a new ASM version in order to make AspectJ compatible with a new Java
  20. version, please build and deploy this module after upgrading property 'asm.version'. Make sure you have the
  21. credentials for write access to the aspectj.dev Maven repository WebDAV share and the correct server, profile and
  22. property entries in settings.xml.
  23. Then you should be able to run 'mvn clean deploy' for this module and be fine.
  24. Caveat for IntelliJ IDEA: The project cannot be built in IDEA (Ctrl-F9) if this module is visible in the Maven view.
  25. If so, right-click it and select "Unlink Maven Projects". Unfortunately, "Ignore Projects" is not enough. If Maven
  26. knows of this Maven module, it cannot compile other modules depending on shaded class names, because it cannot find
  27. the binaries. IDEA will just stop looking at the local Maven repository in this case.
  28. </description>
  29. <properties>
  30. <!-- By default, do not deploy artifacts - but deploy this one used by the main build -->
  31. <maven.deploy.skip>false</maven.deploy.skip>
  32. </properties>
  33. <build>
  34. <plugins>
  35. <plugin>
  36. <groupId>org.apache.maven.plugins</groupId>
  37. <artifactId>maven-compiler-plugin</artifactId>
  38. <executions>
  39. <!-- Nothing to compile in this module -->
  40. <execution>
  41. <id>default-compile</id>
  42. <phase>none</phase>
  43. </execution>
  44. <execution>
  45. <id>default-testCompile</id>
  46. <phase>none</phase>
  47. </execution>
  48. </executions>
  49. </plugin>
  50. <plugin>
  51. <groupId>org.apache.maven.plugins</groupId>
  52. <artifactId>maven-source-plugin</artifactId>
  53. <configuration>
  54. <!-- Re-create original source JAR in order to avoid re-shading already shaded JAR in non-clean builds -->
  55. <forceCreation>true</forceCreation>
  56. <!--
  57. Avoid attaching the source JAR here, because Maven Shade will add the source uber JAR later. Because both
  58. JARs have the same final name, Maven Install/Deploy would see two artifacts attached to the build, which
  59. would lead to double deployment and hence to an error "Transfer failed for ...-sources.jar 409 Conflict".
  60. See also https://issues.apache.org/jira/browse/MDEPLOY-254 and comments by Alexander Kriegisch.
  61. -->
  62. <attach>false</attach>
  63. <archive>
  64. <addMavenDescriptor>false</addMavenDescriptor>
  65. </archive>
  66. </configuration>
  67. <executions>
  68. <execution>
  69. <id>attach-sources</id>
  70. <phase>package</phase>
  71. <goals>
  72. <goal>jar-no-fork</goal>
  73. </goals>
  74. </execution>
  75. </executions>
  76. </plugin>
  77. <plugin>
  78. <groupId>org.apache.maven.plugins</groupId>
  79. <artifactId>maven-jar-plugin</artifactId>
  80. <configuration>
  81. <archive>
  82. <addMavenDescriptor>false</addMavenDescriptor>
  83. </archive>
  84. <!-- Re-create original JAR in order to avoid re-shading already shaded JAR in non-clean builds -->
  85. <forceCreation>true</forceCreation>
  86. </configuration>
  87. <executions>
  88. <execution>
  89. <!-- Avoid creating test JAR -->
  90. <id>test-jar</id>
  91. <phase>none</phase>
  92. </execution>
  93. </executions>
  94. </plugin>
  95. <plugin>
  96. <groupId>org.apache.maven.plugins</groupId>
  97. <artifactId>maven-shade-plugin</artifactId>
  98. <configuration>
  99. <createSourcesJar>true</createSourcesJar>
  100. <createDependencyReducedPom>false</createDependencyReducedPom>
  101. <shadedArtifactAttached>false</shadedArtifactAttached>
  102. </configuration>
  103. <executions>
  104. <execution>
  105. <id>asm-relocate</id>
  106. <phase>package</phase>
  107. <goals>
  108. <goal>shade</goal>
  109. </goals>
  110. <configuration>
  111. <minimizeJar>false</minimizeJar>
  112. <shadeSourcesContent>true</shadeSourcesContent>
  113. <artifactSet>
  114. <excludes>
  115. <exclude>${project.groupId}</exclude>
  116. </excludes>
  117. </artifactSet>
  118. <filters>
  119. <filter>
  120. <artifact>*</artifact>
  121. <excludes>
  122. <exclude>META-INF/*</exclude>
  123. </excludes>
  124. </filter>
  125. </filters>
  126. <relocations>
  127. <relocation>
  128. <pattern>org.objectweb.asm</pattern>
  129. <shadedPattern>aj.org.objectweb.asm</shadedPattern>
  130. </relocation>
  131. </relocations>
  132. </configuration>
  133. </execution>
  134. </executions>
  135. </plugin>
  136. <plugin>
  137. <groupId>org.codehaus.mojo</groupId>
  138. <artifactId>flatten-maven-plugin</artifactId>
  139. <version>1.2.2</version>
  140. <executions>
  141. <!-- Remove shaded dependencies from uber JAR -->
  142. <execution>
  143. <id>flatten</id>
  144. <phase>process-resources</phase>
  145. <goals>
  146. <goal>flatten</goal>
  147. </goals>
  148. <configuration>
  149. <flattenMode>defaults</flattenMode>
  150. <pomElements>
  151. <dependencies>remove</dependencies>
  152. </pomElements>
  153. <outputDirectory>${project.build.directory}</outputDirectory>
  154. <flattenedPomFilename>flattened-pom.xml</flattenedPomFilename>
  155. </configuration>
  156. </execution>
  157. </executions>
  158. </plugin>
  159. </plugins>
  160. </build>
  161. <dependencies>
  162. <dependency>
  163. <groupId>org.ow2.asm</groupId>
  164. <artifactId>asm</artifactId>
  165. </dependency>
  166. </dependencies>
  167. </project>