Posted on 2009-05-18 17:27
itVincent 閱讀(2690)
評論(0) 編輯 收藏 所屬分類:
maven
Maven Dependency Plugin 一個關于maven依賴操作的插件
下面是我覺得幾個比較有用的插件方法:
dependency:list 將pom.xml中包的依賴包顯示成列表形式
dependency:sources 下載依賴包的源代碼,這樣就可以在eclipse下查看依賴包的源代碼了,相比用參數的方式 -DdownloadSources=true , -DdownloadJavadocs=true 簡單一些
dependency:tree 將依賴包以樹狀形式顯示
dependency:go-offline 檢查dependencies, plugins, reports配置,下載依賴包,以便之后maven可以在離線情況下執行
其他的插件功能可以去官方網站查看:Maven Dependency Plugin
補充一下:有時運行dependency:sources之后下載被跳過了,這時先執行一下mvn clean ,之后再執行dependency:sources就可以正常下載了