I have a project that uses Mojo's AspectJ Maven Plugin. It works fine with jdk 8. When I try to switch to jdk14, the build fails with the following error:
[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.11:compile (default) on project AspectJDemo: Execution default of goal org.codehaus.mojo:aspectj-maven-plugin:1.11:compile failed: Plugin org.codehaus.mojo:aspectj-maven-plugin:1.11 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:13.0.2 at specified path /usr/local/Cellar/openjdk/13.0.2+8_2/libexec/openjdk.jdk/Contents/Home/../lib/tools.jar -> [Help 1]
Mojo's website confirms that this file is a required dependency. However, according to this tools.jar has been removed since jdk 9. I have tried to provide a hardcoded path to this jar file in my dependencies like this:
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.8</version>
<scope>system</scope>
<systemPath>/path/to/tools.jar</systemPath>
</dependency>
But then the build completely fails as if it stops recognizing Java entirely. I get numerous errors such as:
[ERROR] can't find critical required type java.lang.Object
<unknown source file>:<no line information>
Does this mean Mojo's AspectJ Maven Plugin does not support jdk9+? Any idea on how I could resolve this is appreciated.