How to add dependencies to 3rd party library using nexus/maven

ⅰ亾dé卋堺 提交于 2019-12-09 11:03:07

问题


i'm trying to use Nexus + m2eclipse/maven-3 professionnally, and i've got a huge 3rd party library that needs a lot of dependencies.

Is there any ways to ease my pain by uploading to Nexus this third party library with all its dependencies linked, so that anyone who would need it would just have to add the maven-dependency-tag only for this huge library ?

Do i need to create the pom myself ?

thank you for your help.


回答1:


Is there any ways to ease my pain by uploading to Nexus this third party library with all its dependencies linked, so that anyone who would need it would just have to add the maven-dependency-tag only for this huge library?

I'm not aware of such a facility.

Do I need to create the pom myself ?

I would not create the POM for the thirdparty dependency but I would indeed consolidate dependencies in a single POM project (and upload it to Nexus).




回答2:


For future visitors, I was able to add a dependency to a 3rd party artifact within nexus, if you wish to do it this way. I followed the following steps:

  1. Create the pom file you want for the 3rd party dependency (I downloaded the existing, auto-generated pom in nexus, then added the dependency that I wanted).

  2. Delete the pom file and it's friends (the SHA1 and MD5 files). I did this through the UI.

  3. Upload the pom file through the artifact upload tab, using the same GAV information, with the artifact type being a pom file.

  4. Celebrated that it was this straightforward.

Hope that helps.



来源:https://stackoverflow.com/questions/3043969/how-to-add-dependencies-to-3rd-party-library-using-nexus-maven

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!