Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

pom.xml 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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 GitHub Packages.
  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 a GitHub
  21. token with the necessary access rights and section like this in your settings.xml:
  22. <![CDATA[
  23. <server>
  24. <id>github</id>
  25. <username>MY_GITHUB_USER</username>
  26. <password>MY_GITHUB_TOKEN</password>
  27. </server>
  28. ]]>
  29. Then you should be able to run 'mvn clean deploy' for this module and be fine.
  30. Caveat for IntelliJ IDEA: The project cannot be built in IDEA (Ctrl-F9) if this module is visible in the Maven view.
  31. If so, right-click it and select "Unlink Maven Projects". Unfortunately, "Ignore Projects" is not enough. If Maven
  32. knows of this Maven module, it cannot compile other modules depending on shaded class names, because it cannot find
  33. the binaries. IDEA will just stop looking at the local Maven repository in this case.
  34. </description>
  35. <properties>
  36. <!-- By default, do not deploy artifacts - but deploy this one used by the main build -->
  37. <maven.deploy.skip>false</maven.deploy.skip>
  38. </properties>
  39. <distributionManagement>
  40. <repository>
  41. <id>github</id>
  42. <name>GitHub Packages Release</name>
  43. <url>https://maven.pkg.github.com/kriegaex/aspectj-packages</url>
  44. <uniqueVersion>false</uniqueVersion>
  45. </repository>
  46. <snapshotRepository>
  47. <id>github</id>
  48. <name>GitHub Packages Snapshot</name>
  49. <url>https://maven.pkg.github.com/kriegaex/aspectj-packages</url>
  50. <uniqueVersion>true</uniqueVersion>
  51. </snapshotRepository>
  52. </distributionManagement>
  53. <build>
  54. <plugins>
  55. <plugin>
  56. <groupId>org.apache.maven.plugins</groupId>
  57. <artifactId>maven-compiler-plugin</artifactId>
  58. <executions>
  59. <!-- Nothing to compile in this module -->
  60. <execution>
  61. <id>default-compile</id>
  62. <phase>none</phase>
  63. </execution>
  64. <execution>
  65. <id>default-testCompile</id>
  66. <phase>none</phase>
  67. </execution>
  68. </executions>
  69. </plugin>
  70. <plugin>
  71. <groupId>org.apache.maven.plugins</groupId>
  72. <artifactId>maven-source-plugin</artifactId>
  73. <configuration>
  74. <!-- Re-create original source JAR in order to avoid re-shading already shaded JAR in non-clean builds -->
  75. <forceCreation>true</forceCreation>
  76. <!--
  77. Avoid attaching the source JAR here, because Maven Shade will add the source uber JAR later. Because both
  78. JARs have the same final name, Maven Install/Deploy would see two artifacts attached to the build, which
  79. would lead to double deployment and hence to an error "Transfer failed for ...-sources.jar 409 Conflict".
  80. See also https://issues.apache.org/jira/browse/MDEPLOY-254 and comments by Alexander Kriegisch.
  81. -->
  82. <attach>false</attach>
  83. <archive>
  84. <addMavenDescriptor>false</addMavenDescriptor>
  85. </archive>
  86. </configuration>
  87. <executions>
  88. <execution>
  89. <id>attach-sources</id>
  90. <phase>package</phase>
  91. <goals>
  92. <goal>jar-no-fork</goal>
  93. </goals>
  94. </execution>
  95. </executions>
  96. </plugin>
  97. <plugin>
  98. <groupId>org.apache.maven.plugins</groupId>
  99. <artifactId>maven-jar-plugin</artifactId>
  100. <configuration>
  101. <archive>
  102. <addMavenDescriptor>false</addMavenDescriptor>
  103. </archive>
  104. <!-- Re-create original JAR in order to avoid re-shading already shaded JAR in non-clean builds -->
  105. <forceCreation>true</forceCreation>
  106. </configuration>
  107. <executions>
  108. <execution>
  109. <!-- Avoid creating test JAR -->
  110. <id>test-jar</id>
  111. <phase>none</phase>
  112. </execution>
  113. </executions>
  114. </plugin>
  115. <plugin>
  116. <groupId>org.apache.maven.plugins</groupId>
  117. <artifactId>maven-shade-plugin</artifactId>
  118. <configuration>
  119. <createSourcesJar>true</createSourcesJar>
  120. <createDependencyReducedPom>false</createDependencyReducedPom>
  121. <shadedArtifactAttached>false</shadedArtifactAttached>
  122. </configuration>
  123. <executions>
  124. <execution>
  125. <id>asm-relocate</id>
  126. <phase>package</phase>
  127. <goals>
  128. <goal>shade</goal>
  129. </goals>
  130. <configuration>
  131. <minimizeJar>false</minimizeJar>
  132. <shadeSourcesContent>true</shadeSourcesContent>
  133. <artifactSet>
  134. <excludes>
  135. <exclude>${project.groupId}</exclude>
  136. </excludes>
  137. </artifactSet>
  138. <filters>
  139. <filter>
  140. <artifact>*</artifact>
  141. <excludes>
  142. <exclude>META-INF/*</exclude>
  143. </excludes>
  144. </filter>
  145. </filters>
  146. <relocations>
  147. <relocation>
  148. <pattern>org.objectweb.asm</pattern>
  149. <shadedPattern>aj.org.objectweb.asm</shadedPattern>
  150. </relocation>
  151. </relocations>
  152. </configuration>
  153. </execution>
  154. </executions>
  155. </plugin>
  156. <plugin>
  157. <groupId>org.codehaus.mojo</groupId>
  158. <artifactId>flatten-maven-plugin</artifactId>
  159. <version>1.2.2</version>
  160. <executions>
  161. <!-- Remove shaded dependencies from uber JAR -->
  162. <execution>
  163. <id>flatten</id>
  164. <phase>process-resources</phase>
  165. <goals>
  166. <goal>flatten</goal>
  167. </goals>
  168. <configuration>
  169. <flattenMode>defaults</flattenMode>
  170. <pomElements>
  171. <dependencies>remove</dependencies>
  172. </pomElements>
  173. <outputDirectory>${project.build.directory}</outputDirectory>
  174. <flattenedPomFilename>flattened-pom.xml</flattenedPomFilename>
  175. </configuration>
  176. </execution>
  177. </executions>
  178. </plugin>
  179. </plugins>
  180. </build>
  181. <dependencies>
  182. <dependency>
  183. <groupId>org.ow2.asm</groupId>
  184. <artifactId>asm</artifactId>
  185. </dependency>
  186. </dependencies>
  187. </project>