2014-09-04 74 views
0

我想學習hyperjaxb3,所以我下載了包含maven項目的purchase order tutorial用於休眠和maven from this link的zip文件,然後將它作爲新的maven項目導入到eclipse中。maven jar插件無法解析

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> 
但我在pom.xml收到以下錯誤消息

但我仍然收到同樣的錯誤。沒有堆棧跟蹤,因爲我沒有嘗試編譯該程序。這是eclipse在pom中給出的編譯錯誤消息。

如何解決此錯誤?

可以查看完整的pom.xml文件by clicking on this link

回答

2

執行目標插件需要移動到<pluginManagement>以擺脫此錯誤。它應該看起來像這樣:

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

謝謝!我如何處理沒有執行目標的其他插件? pom在鏈接中,您可以點擊我上面的原始帖子。這是一個小型的POM,但還有其他插件沒有執行目標。 – CodeMed 2014-09-04 22:46:28

+0

我更新了答案。你可以讓他們在 Kapep 2014-09-04 22:49:07

+0

謝謝。 +1。我認爲解決了它。在將其標記爲答案之前,我需要使用它一段時間才能確認。 – CodeMed 2014-09-04 23:03:57

相關問題