Closed CyborTronik closed 3 years ago
Looks like this works in the latest snapshot version, had to add <complianceLevel>14</complianceLevel>
.
The full config can be found below:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>${aspectj-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<configuration>
<complianceLevel>${maven.compiler.source}</complianceLevel>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
Version 1.11 does not work on JDK 9+, see this short recap of the project history over the last few years. Other people - me included - were forced to fork the plugin. But after a few years of inactivity, now the Mojohaus version is being maintained again and a release probably is not far in the future, maybe as soon as a couple of weeks according to one of the maintainers. If you need a stable non-snapshot which also supports Java 8-16, use the AspectJ.dev variant (dev.aspectj:aspectj-maven-plugin:1.13.M3
) for now. That version still has a few more features, but basically the two are identical, and we are working on getting them merged back in here. If you do not mind the snapshot, just stick with the Mojohaus version.
fixed with next version 1.14.0
Thank you @olamy
Seems that java tools jar has been changed in latest versions of jvm. This plugin or one of it's dependencies tries to use it directly (by the path). Getting the next error: