powertools-lambda-java
powertools-lambda-java copied to clipboard
Compilation warning when using powertools logging utility
What were you trying to accomplish?
Compile a Java lambda using the Powertools logging utility without receiving compilation warnings.
Expected Behavior
No compilation warning when compiling.
Current Behavior
We introduced the powertools logging utility to our lambdas, compiled with Gradle. We're using the AspectJ Weaving Plugin to bring in the package. Now, when compiling the Java for each lambda in the project we receive a warning:
[warning] no match for this type name: SqsLargeMessageAspect [Xlint:invalidAbsoluteTypeName]
I’ve found the SqsLargeMessageAspect
class defined in the powertools-sqs package - but we’re not using it. I’ve tried including it in the project to see if it helps with the warning, but it doesn’t.
The only other reference I can find to it is in software.amazon.lambda.powertools.logging.internal.LambdaLoggingAspect
where it’s declared in a DeclarePrecedence
annotation.
Steps to Reproduce (for bugs)
- Clone
https://github.com/alphagov/di-ipv-core-back
- Run
./gradlew clean :lambdas:select-cri:compileJava
- Observe warning
Environment
- Powertools version used: 1.12.2
- Packaging format (Layers, Maven/Gradle): Gradle
- AWS Lambda function runtime: java11
- Debugging logs
> Task :lambdas:select-cri:compileJava
/di-ipv-core-back/lambdas/select-cri/build/classes/java/main/uk/gov/di/ipv/core/selectcri/SelectCriHandler.class [warning] no match for this type name: SqsLargeMessageAspect [Xlint:invalidAbsoluteTypeName]
(no source information available)
[Xlint:invalidAbsoluteTypeName]
1 warning