December 28, 2020
Estimated Post Reading Time ~

WCMUsePojo “aQute.bnd.annotation.ConsumerType not found” (fix)

On rare occasions, when developing a Java class that extends WCMUsePojo class, you will get the error of “class file for aQute.bnd.annotation.ConsumerType not found“.



This problem can be easily solved by adding the dependency to your parent-pom.xml and core-pom.xml as shown below:

//parent-pom.xml
<!-- https://mvnrepository.com/artifact/biz.aQute.bnd/bndlib -->
<dependency>
    <groupId>biz.aQute.bnd</groupId>
    <artifactId>bndlib</artifactId>
    <version>2.4.0</version>
    <scope>provided</scope>
</dependency>


//core-pom.xml
<dependency>
    <groupId>biz.aQute.bnd</groupId>
    <artifactId>bndlib</artifactId>
</dependency>


Summary:
The latest AEM maven archetype-20 comes pre-configured with this dependency.

During the time of development, an AEM engineer may have removed this maven dependency. https://github.com/adobe/aem-project-archetype/tree/aem-project-archetype-20


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.