When generating sources, the "generateDirectory" is added as source folder to the IDE.
When setting the execution phase to "generate-test-sources", they're not. This leads to compile errors in the IDE (test cases cannot find the classes, of course).
Description
When generating sources, the "generateDirectory" is added as source folder to the IDE.
When setting the execution phase to "generate-test-sources", they're not. This leads to compile errors in the IDE (test cases cannot find the classes, of course).
If maven-jaxb2-plugin is executed in the generate-test-sources phase, target directory is not considered by the M2Eclipse - therefore the project is missing target source folder (ex. target/generated-sources/xjc) in Eclipse.
This is not a bug. By default, M2Eclipse only executes the lifecycle only up to the process-resources phase. The generate-test-sources phase is coming after the process-resources phase and therefore is not executed. Accordingly, target directory is not added to the Maven project source directories.
To resolve, please change the following setting:
Window > Preferences > Maven > Goals to run when updating project configuration: > process-test-resources User Guide
lexi added a comment - 19/Jan/11 11:50 AM This is not a bug.
If maven-jaxb2-plugin is executed in the generate-test-sources phase, target directory is not considered by the M2Eclipse - therefore the project is missing target source folder (ex. target/generated-sources/xjc) in Eclipse.
This is not a bug. By default, M2Eclipse only executes the lifecycle only up to the process-resources phase. The generate-test-sources phase is coming after the process-resources phase and therefore is not executed. Accordingly, target directory is not added to the Maven project source directories.
To resolve, please change the following setting:
Window > Preferences > Maven > Goals to run when updating project configuration: > process-test-resources
User Guide
This is not a bug.
If maven-jaxb2-plugin is executed in the generate-test-sources phase, target directory is not considered by the M2Eclipse - therefore the project is missing target source folder (ex. target/generated-sources/xjc) in Eclipse.
This is not a bug. By default, M2Eclipse only executes the lifecycle only up to the process-resources phase. The generate-test-sources phase is coming after the process-resources phase and therefore is not executed. Accordingly, target directory is not added to the Maven project source directories.
To resolve, please change the following setting:
Window > Preferences > Maven > Goals to run when updating project configuration: > process-test-resources
User Guide