Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started



prateek.somaiya avatar image
prateek.somaiya asked thanh.tran_37000 answered

DSE Java Driver 2.2 (OSS 4.2) Annotation Processor

Having a tough time getting the annotation processor working in eclipse. I know it might work well in IntelliJ but I need to get it done in Eclipse. I have tried this and it is not working. I have also tried something like this and that too is not working, primarily because it's just hit and trial and I don't have the correct JAR name. The generated-sources directory is always empty after building the project.

Any help is appreciated

Using the latest eclipse for java developers

Eclipse IDE for Java Developers

Version: 2019-06 (4.12.0)

Build id: 20190614-1200

10 |1000

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

1 Answer

thanh.tran_37000 avatar image
thanh.tran_37000 answered

That problem is specific to Eclipse, or any IDE. As such, the answer is IDE-specific. For Eclipse, I've found that the annotation sources can be generated by installing m2e-apt from

and using the info given here:

So, after installing m2e-apt, you have to go to the project's Properties -> Maven -> Annotation Processing and choose "Experimental"

because according to the documentation, "you can change the workspace or project preferences to delegate annotation processing to maven, instead of JDT APT. This will result in slower incremental builds (all classes will be processed) but will provide identical results to maven command line builds."

Keep in mind that the doc warns that this method "will result in slower incremental builds".

If you have still have problems, specific to Eclipse, please inquire with the Eclipse Community.

10 |1000

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