I\'m using Google Protocol Buffers to generate some Java classes for my project. Using Maven 2 and its \"antrun\" plugin, these classes are freshly generated before compile,
How can I get IDE support (code completion etc.) for the generated code?
Typically I would add the m2e lifecycle-mapping plugin to the pom.xml file as described in @koppor's answer. However adding per-eclipse code to my pom.xml files is not an option at work which is mostly an IntelliJ shop.
My solution first adds the build-helper-maven-plugin to the pom.xml which works fine from the command line but not in eclipse.
To fix eclipse I installed the Apt M2E Connector from the Eclipse Marketplace. I think things started working right after I restarted and then rebuilt all of my projects. I now see the following in my source dirs: