Using maven-processor-plugin with IDEA

IDEA seems to automatically add the default directories used by
maven-plugin-processor to the classpath:
target/generated-sources/annotation and target/generated-sources/apt.

And it does whether the plugin is used or not.

How come is IDEA adding this directories to classpath?

When configuring a specific output directory to be able to commit the
generated classes in a versioning system, IDEA doesn't take it into

Example of configuration:

the path src/main/generated is not added to classpath.

Would it be possible to automatically recognize and add it to classpath?


Comment actions Permalink

The maven "standard" is to use target/generated-sources and generated-test-sources for all generated code and IDEA's functionality is based on that standard. I think someone else has asked for IDEA to support the overrides provided by the plugin though for non-standard directory structures.


Please sign in to leave a comment.