I am using using the jaxb2 xjc
plugin for generating java files from a XSD
. Therefore I used to configure my pom.xml as follows:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<packageName>com.mypackage.model</packageName>
<schemaDirectory>${basedir}/src/main/resources/XSD</schemaDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
I changed my developing environment to Eclipse Indigo and this does not work any more. The error says: "Plugin execution not covered by lifecycle configuration". I understand I have to define the execution of my plugin differently so that it works in my new environment.
I followed the instructions on this page M2E plugin execution not covered but the source files are not generated when executing the generate-sources
phase.
Could anybody show me how to exactly refactor my pom so that my files are properly generated?
Thanks for helping!