eclipse 生命周期配置未涵盖插件执行
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9843468/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Plugin execution not covered by lifecycle configuration
提问by Dhruv
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:-
我是 maven 的新手。我正在尝试添加 JAXB2 插件和依赖项以从 xsd 生成 xml 文件。当我在下面添加依赖项时,标记下会抛出一个错误:-
Plugin execution not covered by lifecycle configuration: org.jvnet.jaxb2.maven2: maven-jaxb2-plugin:0.7.4:generate(execution: default, phase: generate-sources)
生命周期配置未涵盖的插件执行: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.
该错误在 jaxb2 插件中被标记为 over tag。我参考 Internet 上的解决方案添加了此标签,但没有任何效果。
My pom.xml looks like this:-
我的 pom.xml 看起来像这样:-
<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>
采纳答案by lexicore
This should be resolved with maven-jaxb2-plugin
0.8.1 and m2e 1.1.
这应该用maven-jaxb2-plugin
0.8.1 和 m2e 1.1解决。