Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Adding lombok to the project causes compilation error

nikunjj81682294
Level 2
Level 2

I made the following change.

root pom.xml dependency

core pom.xml

Adding the above dependencies in the project causes the following compilation issues

Project is based on this repo as a base: https://github.com/adobe/aem-project-archetype/tree/aem-project-archetype-19/src/main/archetype

Any help is much appreciated.

Thanks,

Nikunj Jariwala

1 Accepted Solution
Ankur_Khare
Correct answer by
Community Advisor
Community Advisor

nikunjj81682294

It's a third party jar file it wont work like this-

You need to embed it in your pom.xml file like below-

https://forums.adobe.com/thread/2653586#11256831

1849308_pastedImage_2.png

Hope that helps..

View solution in original post

4 Replies
Ankur_Khare
Correct answer by
Community Advisor
Community Advisor

nikunjj81682294

It's a third party jar file it wont work like this-

You need to embed it in your pom.xml file like below-

https://forums.adobe.com/thread/2653586#11256831

1849308_pastedImage_2.png

Hope that helps..

View solution in original post

nikunjj81682294
Level 2
Level 2

I don't think whatever you said applies to Lombok since it's a compile time only jar.

It's a jar used to create getters and setters for you during compile time. The jar is not required during runtime in AEM.

The same set up seems to be working with project created with archetype 20 and 21.

Not sure why it would cause a problem on the project created with archetype 19.

Thanks,

Nikunj Jariwala

Jörg_Hoh
Employee
Employee

The problem isn't lombok, but rather this:

Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure

cannot access aQute.bnd.annotation.ConsumerType

  class file for aQute.bnd.annotation.ConsumerType not found

I haven't found an dependency to an aqute artifact. Have you tried to add it (steal it from archetype 21).

mmange
Level 2
Level 2

Add the following dependency to your project and it will fix this issue. 

 

<!-- FIX FOR : cannot access aQute.bnd.annotation.ConsumerType -->
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bndlib</artifactId>
<version>2.4.0</version>
<scope>provided</scope>
</dependency>