简体   繁体   English

Maven jar插件无法解析

[英]maven jar plugin cannot be resolved

I am trying to learn hyperjaxb3, so I downloaded the zip file containing the maven project for the purchase order tutorial for hibernate and maven from this link , and then imported it into eclipse as a new maven project. 我正在尝试学习hyperjaxb3,因此我从该链接下载了包含maven项目的zip文件,该文件用于hibernate和maven的purchase order tutorial ,然后将其作为新的maven项目导入到eclipse中。 But I am getting the following error message in the pom.xml: 但是我在pom.xml中收到以下错误消息:

Plugin execution not covered by lifecycle configuration:  
org.jvnet.hyperjaxb3:maven-hyperjaxb3-plugin:0.5.6:generate (execution: default, phase: generate-sources)

I tried to resolve this error message by adding the following dependency to the pom.xml, which I found at this link : 我试图通过将以下依赖项添加到pom.xml中来解决此错误消息,该链接在在此链接中找到:

<dependency>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <version>2.3.2</version>
</dependency>

But I am still getting the same error. 但是我仍然遇到同样的错误。 There is no stack trace because I have not tried to compile the program. 没有堆栈跟踪,因为我没有尝试编译该程序。 It is a compile error message that eclipse gives in the pom. 这是eclipse在pom中给出的编译错误消息。

How can I resolve this error? 如何解决此错误?

The complete pom.xml can be viewed by clicking on this link . 单击此链接可以查看完整的pom.xml。

Plugins with executions goals need to be moved to <pluginManagement> to get rid of this error. 需要将具有执行目标的插件移至<pluginManagement>才能消除此错误。 It should look like this: 它看起来应该像这样:

<build>
    <plugins>
        <!-- plugins  --> 
    </plugins>
    <pluginManagement>
        <plugins>
            <!-- plugins with execution goals --> 
        </plugins>
    </pluginManagement>
</build>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM