yegor256
yegor256

Reputation: 105053

Where to place generated sources in order to make them visible for testCompile goal?

maven-compiler-plugin:testCompile gets sources from ./src/test/java. How can I instruct it to use sources from ./target/generated-sources/test as well?

Maybe they should be placed somewhere else to become visible for testCompile goal?

Upvotes: 1

Views: 403

Answers (1)

Jörn Horstmann
Jörn Horstmann

Reputation: 34014

Ideally, the plugin generating these sources should configure the source folders for the compiler plugin. When these are not generated by a maven plugin, you can use the build-helper plugin to add additional folders. See the second example here.

Upvotes: 2

Related Questions