Skip to content
highsource edited this page Oct 12, 2014 · 3 revisions

IDE Integration

Eclipse

Since the version 0.8.1, maven-jaxb2-plugin provides "native" integration for M2Eclipse. That is, the plugin provides lifecycle mapping metadata and uses Plexus Build API to check if any relevant files were changes and to refresh the workspace after source code was generated. This should resolve the "plugin execution not covered by lifecycle configuration" problem.

This feature is supported in M2Eclipse since version 1.1.

Miscellaneous Problems

Target directory ignored by M2Eclipse if plugin is executed in generated-test-sources phase

Please see this issue.

The problem appears in Eclipse environments running M2Eclipse.

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

Solving "Plugin execution not covered by lifecycle configuration" problem in Eclipse/M2Eclipse

There are following options:

  • Ugrade to M2Eclipse 1.1 and maven-jaxb2-plugin version 0.8.1 or higher

Alternatively:

  • Use one of the m2e connectors:

Window > Preferences > Maven > Discovery > Open Catalog > Find: jaxb2

Clone this wiki locally