如何在全球范围内管理不同的maven项目之间的依赖关系? [英] How do to manage Dependencies between different maven projects, globally?

查看:132
本文介绍了如何在全球范围内管理不同的maven项目之间的依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有X maven项目,它依赖于Y maven项目。如果我在Y项目中进行更改并构建它,那么如何启动X的构建也不需要任何人工干预?

解决方案

我希望你记住你想保持你的X项目是最新的;所以当你启动一个新的Y项目的构建,然后X项目开始一个新的编译,并采取最新版本的Y工件。如果是这样,最好的办法是将所有这些操作转移给持续的整合策略。例如,在您的情况下,您可以在Jenkins中设置一个新配置(您可以将其安装在本地的tomcat中,并在其上部署Jenkins应用程序),每次Y项目启动新的编译时,X项目将启动一个新的构建,使用新的Y版本部署库或其在maven存储库中共享的任何内容。结果是,您将始终将X项目与Y项目上的最新版本对齐。无论如何,您必须确保您已经在两个项目上定义和实施了回归测试单元,以便根据当前的项目规格来检测新版本的行为。


I have X maven project which has dependencies on Y maven project. If I make changes in Y project and build it, how to start X's build also without any manual intervention?

解决方案

I hope you mind you want to keep your X project up-to-date; so when you launch a new build of your Y project then the X project start a new compilation and takes the latest version of Y artifact. If so, the best way is to relay all these operations on a continuous integration strategy. In your case, for instance, you can set up a new configuration in Jenkins (you can install it in your local tomcat and just deploy the war Jenkins application on it) in which for every time Y project launches a new compilation the X project starts a new build taking the new Y version deployment libraries or whatever it shares in the maven repository. The result is that you will have always the X project aligned with the latest version on Y project. Anyway, you must assure you have defined and implemented regression test units either on both projects in order to detect how the new version behaves according to the current project specifications.

这篇关于如何在全球范围内管理不同的maven项目之间的依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆