Maven:POM文件或settings.xml中的分发管理配置

发布于 2024-10-14 22:29:37 字数 223 浏览 12 评论 0原文

我想知道使用 Maven 设置分发管理的最佳实践是什么。

我们在 Maven settings.xml 和父 pom 文件中配置了 Nexus 存储库。由于这在所有项目中并不一致,而我们希望使其保持一致?

最好的办法是什么? pom 文件还是 settings.xml?有什么优点和缺点?

我们认为它应该位于每个人的 settings.xml 中,以便他们可以在他们想要的地方发布它。

I would like to know what's the best practice for setting up the distribution management with maven.

We have the nexus repository configured in the maven settings.xml and in the parent pom file. Where as this is not consistent across all projects and we want to make it consistent?

What's the best way? pom file or settings.xml? what's the pros and cons?

We have arguments that it should be in each person's settings.xml , so that they can release it where they want it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

知你几分 2024-10-21 22:29:37

pom 中的位置和传输协议设置。
${userhome}/.m2/settings.xml

版本中的凭据应该分发到一致的位置,否则拥有集中存储库甚至工件命名约定有什么意义。

如果您希望它位于该项目的非标准位置,那么就不要发布它,它显然不是一个版本。

Location and transport protocol settings in the pom.
credentials in ${userhome}/.m2/settings.xml

Releases should be distributed to a consistent place, otherwise what the point of having a centralised repository or even artifact naming conventions.

If you want it in a non standard place for that project, then don't release it, it is obviously not a release.

吹梦到西洲 2024-10-21 22:29:37

我认为将您想要在该工作站上处理的每个项目重复的内容放入 settings.xml 中是合适的。

因此,如果您的开发人员正在处理的所有项目都发布到同一个存储库(我认为这是在公司环境中发生的情况),那么这种设置对于集中化是有意义的。

I think it's appropriate to put things in settings.xml that you would want to repeat for each project you work on on that workstation.

So if all the projects your developers are working on are released to the same repository (which I would assume is what would occur in a corporate setting), then this setting makes sense to centralize.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文