Reputation: 1728
I am newbiee to maven. I am trying to add JAXB2 plugin and dependencies to generate xml files from xsd. When I add underneath dependencies then a error is thrown under markers:-
Plugin execution not covered by lifecycle configuration: org.jvnet.jaxb2.maven2: maven-jaxb2-plugin:0.7.4:generate(execution: default, phase: generate-sources)
The error is marked over tag in jaxb2 plugin. I added this tag in reference to solutions over internet, but nothing works.
My pom.xml looks like this:-
<build>
<finalName>PatternsWebapp</finalName>
<defaultGoal>install</defaultGoal>
<pluginManagement>
<plugins>
<!-- This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.appfuse.plugins
</groupId>
<artifactId>
maven-warpath-plugin
</artifactId>
<versionRange>
[2.1.0,)
</versionRange>
<goals>
<goal>add-classes</goal>
</goals>
</pluginExecutionFilter>
<action>
<execution></execution>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.7.4</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<verbose>true</verbose>
<schemaDirectory>src/main/resources</schemaDirectory>
<generatePackage>com.webapp.xml</generatePackage>
</configuration>
</plugin>
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
Upvotes: 14
Views: 14963
Reputation: 43651
This should be resolved with maven-jaxb2-plugin
0.8.1 and m2e 1.1.
Upvotes: 13