Closed
Description
Following the setup instructions of the library and including below snippet under <build>
section, Lambda is working with runtime Java 11. Tried with Java 10, 12 and 13 as well.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.11</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Build fails with below logs:
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 /Library/../lib/tools.jar
Expected Behavior
Build should succeed and able to use the library utilities
Current Behavior
Build fails with below logs:
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 /Library/../lib/tools.jar
Possible Solution
There is a bug report on official version of aspectj-maven-plugin
which makes plugin incompatible with these java version.
Suggested workaround for now is to use below plugin as discussed in this issue until plugin is patched.
<plugin>
<groupId>com.nickwongdev</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.12.1</version>
Steps to Reproduce (for bugs)
- Follow setup instruction
- Make Lambda runtime as one of Java 10,11,12,13
- Build the project
- Build fails with below logs
Environment
- Powertools version used: Latest
- Packaging format (Layers, Maven/Gradle): Maven/Gradle
- AWS Lambda function runtime: Java 10, 11, 12, 13.
- Debugging logs
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 /Library/Java//../lib/tools.jar