忽略第三方JAR中的POM

[英]Ignore POM in 3rd party JAR


I have uploaded a 3rd party JAR file to my Artifactory repository. This JAR file contains a POM, but the pom is only valid inside the 3rd-parties build environment.

我已將第三方JAR文件上傳到我的Artifactory存儲庫。此JAR文件包含POM,但pom僅在第三方構建環境中有效。

When I attempt to build a project that uses this JAR, I get errors because it is looking for a parent project that we don't have access to.

當我嘗試構建一個使用此JAR的項目時,我會收到錯誤,因為它正在尋找我們無法訪問的父項目。

I understand from this post that this is because the POM is being read from inside the 3rd party Jar.

我從這篇文章中了解到這是因為正在從第三方Jar內部讀取POM。

Is there a a way to edit the POM of our project to tell Maven to ignore the pom of this 3rd party Jar?

有沒有辦法編輯我們項目的POM,告訴Maven忽略這個第三方Jar的pom?

(as a workaround, I can remove the POM from the Jar - this fixes the issue, but I would prefer not to have to remember to do this on every release of this 3rd-party component).

(作為一種解決方法,我可以從Jar中刪除POM - 這解決了這個問題,但我寧願不記得在第三方組件的每個版本上都這樣做)。

Please also note that I am very new to Maven, so use short words and long explanations ;-)

還請注意我對Maven很新,所以請使用簡短的單詞和長解釋;-)

1 个解决方案

#1


1  

The best way to fix it is to deploy the parent pom to Artifactory. That's how Maven works.

解決它的最佳方法是將父pom部署到Artifactory。這就是Maven的工作方式。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2013/10/28/724dae557b8e0288eef5fbdadd8fc91.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com