2017-03-20 68 views
0

我有兩個模塊:Maven的依賴插件下載POM,而不是tar.gz的

module 1: builds as .tar.gz with assembly plugin (type declared as 'pom' in its pom.xml) 

    module 2: needs to depend on the .tar.gz from the module above but always pulls the pom from the nexus instead. 

有什麼訣竅?我在我的Nexus上正確地看到了我的.tar.gz,這只是模塊2從來沒有去過,總是隻是下載POM。

+0

你如何聲明依賴關係?你指定類型嗎? – Harald

+0

是的,我確實有.tar.gz。我沒有從構建它的程序集插件作業中獲得分類器。在我看到nexus元數據xml之前,這並不容易查明。 – JvmSd121

回答

1

我終於找到了問題。如果我查看nexus的元數據(maven-metadata.xml)

我看到我的.tar.gz帶有來自maven程序集插件id(外部程序集xml中的一個)的分類標記。

我在依賴項插件配置中有這個,但在我的pom的實際依賴項部分沒有這個。一旦我在這裏添加了分類器標籤,它也可以按預期工作。

+0

有沒有辦法通過mvn依賴:通過沒有pom的get命令? –