I am trying to get the log4j2 configured for my aws lambda function using java8 runtime. Aws lambda handler does provide context-Lambdalogger but I want to use the standard log4j configuration so that it can be declared in every class and log it as required without passing the context-Lambdalogger to every method and so on. As per aws documentation I have tried to use the below dependencies and plugin as mentioned below. But I get the below error . Any clues or idea can help.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.0.0:shade (default) on project lcc: Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:3.0.0:shade for parameter transformer: Cannot create instance of interface org.apache.maven.plugins.shade.resource.ResourceTransformer: org.apache.maven.plugins.shade.resource.ResourceTransformer.<init>() -> [Help 1]
< dependency><br/>
< groupId>com.amazonaws< /groupId><br/>
< artifactId>aws-lambda-java-log4j2< /artifactId><br/>
< version>1.0.0< /version><br/>
< /dependency><br/>
< dependency><br/>
< groupId>org.apache.logging.log4j< /groupId><br/>
< artifactId>log4j-core< /artifactId>
< version>2.8.2< /version><br/>
< /dependency><br/>
< dependency><br/>
< groupId>org.apache.logging.log4j< /groupId><br/>
< artifactId>log4j-api< /artifactId><br/>
< version>2.8.2< /version><br/>
< /dependency><br/>
< plugin><br/>
< group Id>org.apache.maven.plugins< /group Id><br/>
< artifactId>maven-shade-plugin< /artifactId><br/>
< version>3.0.0< /version><br/>
< executions><br/>
< execution><br/>
< phase>package< /phase><br/>
< goals><br/>
< goal>shade< /goal><br/>
< /goals><br/>
< configuration><br/>
< transformers><br/>
< transformer><br/>
implementation="com.github.edwgiz.mavenShadePlugin.log4j2CacheTransformer.PluginsCacheFileTransformer"><br/>
< /transformer><br/>
< /transformers><br/>
< /configuration><br/>
< /execution><br/>
< /executions><br/>
< dependencies><br/>
< dependency><br/>
< group Id>com.github.edwgiz< /group Id><br/>
< artifact Id>maven-shade-plugin.log4j2-cachefile-transformer< /artifactId><br/>
< version>2.8.1< /version><br/>
< /dependency><br/>
< /dependencies><br/>
< /plugin>
<transformer..../>
is not under<executions></executions>
– Seko