2012-05-12 58 views
5

如何將Versions-Maven-Plugin添加到我的Eclipse項目中?版本Eclipse中的Maven Plugin

我嘗試了Add Plugins菜單選項,但它似乎無法找到插件。

+0

爲什麼您需要將版本插件添加到項目中?爲此目的? – khmarbaise

+0

檢查依賴關係的版本更新。我正在使用beta測試版。 –

+0

啊...抱歉誤會。 – khmarbaise

回答

5

您必須將versions maven plugin添加到您的pom的報告部分中,以創建有關依賴關係更新的適當報告。

<reporting> 
    <plugins> 
    <plugin> 
     <groupId>org.codehaus.mojo</groupId> 
     <artifactId>versions-maven-plugin</artifactId> 
     <version>1.3.1</version> 
     <reportSets> 
     <reportSet> 
      <reports> 
      <report>dependency-updates-report</report> 
      <report>plugin-updates-report</report> 
      <report>property-updates-report</report> 
      </reports> 
     </reportSet> 
     </reportSets> 
    </plugin> 
    </plugins> 
</reporting> 

無法安裝在Eclipse版本,Maven的插件,使版本Maven的插件是一個Maven插件,而不是一個Eclipse插件。但不是一個壞主意。

+0

上面的代碼片段也可以在他們的網站上找到:http://mojo.codehaus.org/versions-maven-plugin/usage.html – ruhong

14

在Eclipse中檢查Maven插件版本:

  • 單擊窗口 - >首選項 - >的Maven - >安裝。它會向您顯示帶有Maven版本的安裝窗口。
相關問題