我正在尝试学习hyperjaxb3,因此我下载了包含purchase order tutorial
的maven项目的zip文件(用于hibernate和maven from this link),然后将其作为新的maven项目导入到eclipse中。但是我在pom.xml中收到以下错误消息:
Plugin execution not covered by lifecycle configuration:
org.jvnet.hyperjaxb3:maven-hyperjaxb3-plugin:0.5.6:generate (execution: default, phase: generate-sources)
我尝试通过将以下依赖项添加到pom.xml中来解决此错误消息,我发现at this link:
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
</dependency>
但是我仍然遇到同样的错误。没有堆栈跟踪,因为我没有尝试编译该程序。这是eclipse在pom中给出的编译错误消息。
如何解决此错误?
完整的pom.xml可以在by clicking on this link中查看。
最佳答案
需要将具有执行目标的插件移至<pluginManagement>
才能消除此错误。它看起来应该像这样:
<build>
<plugins>
<!-- plugins -->
</plugins>
<pluginManagement>
<plugins>
<!-- plugins with execution goals -->
</plugins>
</pluginManagement>
</build>