question

kascatchme_38391 avatar image
kascatchme_38391 asked kascatchme_38391 answered

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

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

Erick Ramirez avatar image Erick Ramirez ♦♦ commented ·

@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 ♦♦ commented ·

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

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