AEM Project, 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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//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


Hello, I am an enthusiastic Adobe Community Advisor and a seasoned Lead AEM Developer. I am currently serving as an AEM Technical Lead at MNPDigital.ca, bringing over a decade of extensive web engineering experience and more than eight years of practical AEM experience to the table. My goal is to give back to the AEM Full Stack Development community by sharing my wealth of knowledge with others. You can connect with me on LinkedIn.

Leave a Reply

Your email address will not be published. Required fields are marked *


Back To Top