DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

kascatchme_38391 avatar image
kascatchme_38391 asked ·

Annotation files are not generated during mvn compile

pom.xmlI have attached my POM file. When I run mvn compile, the annotation processor is not generating files. I have annotated my entity, Dao, and mapper classes. But, when I do build in IntelliJ, the inbuilt system can able to generate the files.


What am I missing here?

driverjavaannotation-processor
pom.xml (1.2 KiB)
2 comments
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

@kascatchme_38391 There's not a lot of information to go by in your post. You've posted a similar question 3 weeks ago but with Eclipse instead of IntelliJ. We've requested you for a sample of your project but we haven't heard from you since. Could you do that please? Cheers!

1 Like 1 · ·
alexandre.dutra avatar image alexandre.dutra ♦ Erick Ramirez ♦♦ ·

Please, we need the entire project. You pom file is correct so there's nothing in there that can help us in diagnosing the problem. Please attach a zip file containing the pom.xml file, all you java files (entities, daos, mappers, etc.) and other relevant resources. Thanks!

0 Likes 0 · ·

1 Answer

kascatchme_38391 avatar image
kascatchme_38391 answered ·

@Erick Ramirez Thank you for the reply.

I will not be able to share the entire project as my organization doesn't allow it.

I will be more specific on the issue. I have enabled Annotation Processors in IntelliJ as follows.

Probably this is the one generating the files under /target/generates-sources/annotations



But I have actually found out the root cause of this issue. We are not using the maven directory structure. So, when I run mvn compile, it was searching for source files in the resources directory.


I fixed it by changing the source directory in the maven build.

<sourceDirectory>src/com/cassandra</sourceDirectory>

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.