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

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
Make all tests run on Java 16 via '-add-opens' JVM option Due to JEP 260 (Encapsulate Most Internal APIs), aspect weaving on Java 16 now requires '--add-opens java.base/java.lang=ALL-UNNAMED' on the command line. Otherwise there will be illegal access exceptions for some internal API calls AspectJ needs, most prominently when trying to define classes in other packages or modules. This had to be done on several levels: - Maven Surefire: running tests in a JVM directly forked by Surefire. In order to make this backwards compatible, I added two profiles with JDK-level-dependent auto-activation, one 8-15 and one 16+. In the latter a property containing the JVM parameter is defined, in the former it is empty, i.e. the JVM is started without the parameter. In Java 8 the parameter did not even exist, in Java 9+ we could use it, but we need to test how users use AspectJ. - RunSpec: Whenever an XML test is declared to use '<run>', we need to determine the current JVM version and again dynamically add the parameter when forking the target JVM. - AntSpec: Whenever an XML test is declared to use '<ant>', we need to determine the current JVM version dynamically add two properties usable from within Ant scripts: 'aj.addOpensKey' and 'aj.addOpensValue'. Unfortunately, Ant needs to use two '<argLine>' parameters, because the two parts of the option are separated by a space character. - Ant scripts: When triggered by an AntSpec, each Ant target using LTW needs to manually set <jvmarg value="${aj.addOpensKey}"/> <jvmarg value="${aj.addOpensValue}"/> for each '<java>' task. It was quite tedious to find all(?) of them. TODO: In the AspectJ 1.9.7 release notes we need to document that this parameter is now needed for LTW. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
3 years ago
Make all tests run on Java 16 via '-add-opens' JVM option Due to JEP 260 (Encapsulate Most Internal APIs), aspect weaving on Java 16 now requires '--add-opens java.base/java.lang=ALL-UNNAMED' on the command line. Otherwise there will be illegal access exceptions for some internal API calls AspectJ needs, most prominently when trying to define classes in other packages or modules. This had to be done on several levels: - Maven Surefire: running tests in a JVM directly forked by Surefire. In order to make this backwards compatible, I added two profiles with JDK-level-dependent auto-activation, one 8-15 and one 16+. In the latter a property containing the JVM parameter is defined, in the former it is empty, i.e. the JVM is started without the parameter. In Java 8 the parameter did not even exist, in Java 9+ we could use it, but we need to test how users use AspectJ. - RunSpec: Whenever an XML test is declared to use '<run>', we need to determine the current JVM version and again dynamically add the parameter when forking the target JVM. - AntSpec: Whenever an XML test is declared to use '<ant>', we need to determine the current JVM version dynamically add two properties usable from within Ant scripts: 'aj.addOpensKey' and 'aj.addOpensValue'. Unfortunately, Ant needs to use two '<argLine>' parameters, because the two parts of the option are separated by a space character. - Ant scripts: When triggered by an AntSpec, each Ant target using LTW needs to manually set <jvmarg value="${aj.addOpensKey}"/> <jvmarg value="${aj.addOpensValue}"/> for each '<java>' task. It was quite tedious to find all(?) of them. TODO: In the AspectJ 1.9.7 release notes we need to document that this parameter is now needed for LTW. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
3 years ago
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <project xmlns="http://maven.apache.org/POM/4.0.0"
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_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.7.BUILD-SNAPSHOT</version>
  9. </parent>
  10. <artifactId>run-all-junit-tests</artifactId>
  11. <dependencies>
  12. <dependency>
  13. <groupId>org.aspectj</groupId>
  14. <artifactId>asm-renamed</artifactId>
  15. </dependency>
  16. <dependency>
  17. <groupId>org.aspectj</groupId>
  18. <artifactId>util</artifactId>
  19. <version>${project.version}</version>
  20. <type>test-jar</type>
  21. <scope>test</scope>
  22. </dependency>
  23. <dependency>
  24. <groupId>org.aspectj</groupId>
  25. <artifactId>ajde</artifactId>
  26. <version>${project.version}</version>
  27. <type>test-jar</type>
  28. <scope>test</scope>
  29. </dependency>
  30. <dependency>
  31. <groupId>org.aspectj</groupId>
  32. <artifactId>ajde.core</artifactId>
  33. <version>${project.version}</version>
  34. <type>test-jar</type>
  35. <scope>test</scope>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.aspectj</groupId>
  39. <artifactId>asm</artifactId>
  40. <version>${project.version}</version>
  41. <type>test-jar</type>
  42. <scope>test</scope>
  43. </dependency>
  44. <dependency>
  45. <groupId>org.aspectj</groupId>
  46. <artifactId>bridge</artifactId>
  47. <version>${project.version}</version>
  48. <type>test-jar</type>
  49. <scope>test</scope>
  50. </dependency>
  51. <dependency>
  52. <groupId>org.aspectj</groupId>
  53. <artifactId>loadtime</artifactId>
  54. <version>${project.version}</version>
  55. <type>test-jar</type>
  56. <scope>test</scope>
  57. </dependency>
  58. <dependency>
  59. <groupId>org.aspectj</groupId>
  60. <artifactId>runtime</artifactId>
  61. <version>${project.version}</version>
  62. <type>test-jar</type>
  63. <scope>test</scope>
  64. </dependency>
  65. <dependency>
  66. <groupId>org.aspectj</groupId>
  67. <artifactId>ajdoc</artifactId>
  68. <version>${project.version}</version>
  69. <type>test-jar</type>
  70. <scope>test</scope>
  71. </dependency>
  72. <dependency>
  73. <groupId>org.aspectj</groupId>
  74. <artifactId>weaver</artifactId>
  75. <version>${project.version}</version>
  76. <type>test-jar</type>
  77. <scope>test</scope>
  78. </dependency>
  79. <dependency>
  80. <groupId>org.aspectj</groupId>
  81. <artifactId>taskdefs</artifactId>
  82. <version>${project.version}</version>
  83. <type>test-jar</type>
  84. <scope>test</scope>
  85. </dependency>
  86. <dependency>
  87. <groupId>org.aspectj</groupId>
  88. <artifactId>testing-client</artifactId>
  89. <version>${project.version}</version>
  90. <type>test-jar</type>
  91. <scope>test</scope>
  92. </dependency>
  93. <dependency>
  94. <groupId>org.aspectj</groupId>
  95. <artifactId>testing-drivers</artifactId>
  96. <version>${project.version}</version>
  97. <type>test-jar</type>
  98. <scope>test</scope>
  99. </dependency>
  100. <dependency>
  101. <groupId>org.aspectj</groupId>
  102. <artifactId>testing-util</artifactId>
  103. <version>${project.version}</version>
  104. <type>test-jar</type>
  105. <scope>test</scope>
  106. </dependency>
  107. <dependency>
  108. <groupId>org.aspectj</groupId>
  109. <artifactId>org.aspectj.matcher</artifactId>
  110. <version>${project.version}</version>
  111. <type>test-jar</type>
  112. <scope>test</scope>
  113. </dependency>
  114. <dependency>
  115. <groupId>org.aspectj</groupId>
  116. <artifactId>build</artifactId>
  117. <version>${project.version}</version>
  118. <type>test-jar</type>
  119. <scope>test</scope>
  120. </dependency>
  121. <dependency>
  122. <groupId>org.aspectj</groupId>
  123. <artifactId>tests</artifactId>
  124. <version>${project.version}</version>
  125. <type>test-jar</type>
  126. <scope>test</scope>
  127. </dependency>
  128. <dependency>
  129. <groupId>org.aspectj</groupId>
  130. <artifactId>org.aspectj.ajdt.core</artifactId>
  131. <version>${project.version}</version>
  132. <type>test-jar</type>
  133. <scope>test</scope>
  134. </dependency>
  135. <dependency>
  136. <groupId>org.aspectj</groupId>
  137. <artifactId>testing</artifactId>
  138. <version>${project.version}</version>
  139. <type>test-jar</type>
  140. <scope>test</scope>
  141. </dependency>
  142. </dependencies>
  143. <profiles>
  144. <profile>
  145. <!--
  146. ATTENTION: This profile is inactive by default, because when active and running a full reactor build, it makes
  147. almost all tests run 2x, doubling the build time without any added value. This Maven module only exists for
  148. convenience: As a developer, your IDE can detect and run 'RunTheseBeforeYouCommitTests'. That way, you do not
  149. have to use Maven and get the test results reported within the IDE's JUnit user interface.
  150. -->
  151. <id>repeat-all-unit-tests</id>
  152. <activation>
  153. <activeByDefault>false</activeByDefault>
  154. </activation>
  155. <build>
  156. <plugins>
  157. <plugin>
  158. <groupId>org.apache.maven.plugins</groupId>
  159. <artifactId>maven-surefire-plugin</artifactId>
  160. <configuration>
  161. <testFailureIgnore>true</testFailureIgnore>
  162. <argLine>${jvm.arg.addOpens}</argLine>
  163. </configuration>
  164. <executions>
  165. <execution>
  166. <id>extra-test-run</id>
  167. <phase>test</phase>
  168. <goals>
  169. <goal>test</goal>
  170. </goals>
  171. </execution>
  172. </executions>
  173. </plugin>
  174. </plugins>
  175. </build>
  176. </profile>
  177. </profiles>
  178. <build>
  179. <plugins>
  180. <plugin>
  181. <groupId>org.apache.maven.plugins</groupId>
  182. <artifactId>maven-surefire-plugin</artifactId>
  183. <configuration>
  184. <testFailureIgnore>true</testFailureIgnore>
  185. <argLine>${jvm.arg.addOpens}</argLine>
  186. </configuration>
  187. <executions>
  188. <execution>
  189. <id>default-test</id>
  190. <!-- By default, do not run any tests -->
  191. <phase>none</phase>
  192. <goals>
  193. <goal>test</goal>
  194. </goals>
  195. </execution>
  196. </executions>
  197. </plugin>
  198. </plugins>
  199. </build>
  200. </project>