问题描述
我们正在为第三方 jar 使用内部 Nexus 存储库,这些 jar 是我们应用程序中的依赖项.
We are using an internal Nexus Repository for third party jars which are dependencies in our applications.
我正在开始一个新项目,并且有一组 4 个第三方 jar 文件,我想将它们上传到 Nexus,然后在理想情况下作为我的项目 pom.xml 中的单个依赖项(即 artifactId/version)引用.
I am starting a new project, and have a set of 4 third party jar files which I want to upload to Nexus, and then reference, ideally, as a single dependency (i.e. artifactId/version) from my project pom.xml.
这些 jar 总是一起提供,从不单独进行版本控制,因此为每个 jar 设置单独的 artifactId/version 组合是没有用的.是否可以将所有 jar 文件上传到 Nexus 中的单个工件/版本文件夹中,然后在我的 Maven 项目中将它们作为单个依赖项引用?
These jars are always given together, never versioned separately, so having a separate artifactId/version combination for each jar is not useful. Is it possible to upload all the jars into a single artifact/version folder in Nexus, and then to reference them as a single dependency in my Maven project?
推荐答案
正如您在评论中提到的,您可以创建自己的 pom 文件,该文件取决于您谈论的四个 jar.然后,将其发布到您的本地关系网.完成后,您可以将其作为 pom 依赖项进行依赖,它将引入您想要的四个库.
As you refer to in your comment, you can create a pom file of your own that depends on the four jars you talk about. Then, release this to your local nexus. Once this is done, you can depend on it as a pom dependency, which will bring in the four libraries you want.
这篇关于Maven:是否可以将一组 3rd 方 jar 上传到存储库,然后可以将其作为单个依赖项引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)