0
我在maven中有一個多模塊項目,並且我創建了一個主子模塊(這意味着這個子模塊具有主類)。我添加其它子模塊到主的子模塊(這是子模塊-0)作爲依賴關係:Maven多模塊:子模塊作爲依賴關係
<dependencies>
<dependency>
<groupId>ProjectGroupId</groupId>
<artifactId>Submodule-1</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ProjectGroupId</groupId>
<artifactId>Submodule-2</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ProjectGroupId</groupId>
<artifactId>Submodule-3</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
我有Artifactory的在我的LAN和我的行家的settings.xml被配置爲連接到本地Artifactory的。在我安裝Artifactory的PC中,此設置工作正常,但是當我在另一臺計算機(我的筆記本電腦)中運行安裝程序時,找不到子模塊庫,但我可以在使用Netbeans的項目的依賴項部分中看到它。
產生的錯誤是:
[ERROR] Failed to execute goal on project Submodule-0: Could not resolve dependencies for project ProjectGroupId:Submodule-0:jar:0.0.1: Failed to collect dependencies at ProjectGroupId:Submodule-1:jar:0.0.1: Failed to read artifact descriptor for ProjectGroupId:Submodule-1:jar:0.0.1: Failure to find ProjectGroupId:MultiModule:pom:0.0.1 in http://192.168.10.136:8081/artifactory/libs-release was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
我希望你們能幫助,如果這是一個重複的問題,希望你們能導致我在正確的道路。
是的,他們有相同的settings.xml,但除了在設置爲本地主機而不是特定IP的Artifactory的機器之外。 – megamoth
好了,您是否運行了部署構建?順便說一句,Artifactory是否有某種網絡界面來檢查神器的存在? – Rob
這可能是另一個問題,但子模塊和外部maven項目之間有什麼區別,因爲我已經添加到依賴關係中的外部maven項目根本沒有問題,但是子模塊在編譯時遇到問題 – megamoth