简体   繁体   English

使用Nexus中的Maven为第3方jar创建存储库

[英]To create a repository for 3rd party jars using Maven in Nexus

I am new to Maven. 我是Maven的新手。

I need to create a repository in Nexus for all 3rd party jars used in our project. 我需要在Nexus中为项目中使用的所有第3方jar创建一个存储库。 These 3rd party jars should be pushed to Nexus repository from the maven repository. 这些第3方jars应该从maven存储库推送到Nexus存储库。

When compiling the java code the 3rd party jars should be downloaded to the .m2 folder (local repository) and the code should be complied. 编译Java代码时,应将第3方jars下载到.m2文件夹(本地存储库)中,并遵守代码。

Could you share the sample pom.xml? 您可以共享样本pom.xml吗?

I think you are misunderstanding how things are working. 我认为您误会了事情的进展。 Nexus can proxy the Central Repository and others. Nexus可以代理中央存储库和其他存储库。 When configured correctly Maven will download all needed plugins and jar dependencies via Nexus into the local Maven repository and make them available on the classpath during the build as needed. 正确配置后,Maven将通过Nexus将所有需要的插件和jar依赖项下载到本地Maven存储库中,并在构建期间根据需要在类路径上将其提供。

See more in the documentation. 请参阅文档中的更多内容。 Esp check out the concepts and the Maven section: Esp检查概念和Maven部分:

You can also try it with the eval guide and the example projects. 您也可以尝试使用评估指南和示例项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM