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> |
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