SVN存储库中的Maven依赖项 [英] Maven dependency from SVN repository

查看:158
本文介绍了SVN存储库中的Maven依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Maven 2,有什么办法列出对另一个SVN服务器上但不在Maven存储库中的另一个Maven项目的依赖关系?

Using maven 2, is there any way to list a dependency to another maven project which is on a different SVN server but is not on a maven repository?

理想情况下,应该可以编译和运行主项目,而不必手动检出并建立依赖项.

Ideally, it should be possible to compile and run the main project without having to manually checkout and build the dependency.

推荐答案

使用Maven 2,有什么办法列出对另一个SVN服务器上但不在Maven存储库中的另一个Maven项目的依赖关系?

Using maven 2, is there any way to list a dependency to another maven project which is on a different SVN server but is not on a maven repository?

Maven依赖项始终通过本地存储库解决,可以从远程存储库下载,也可以在install期间安装.对于您的情况,您必须install提及的项目.

Maven dependencies are always resolved through the local repository and are either downloaded from a remote repository or installed during install. In your case, you'd have to install the mentioned project.

如果要避免手动检出,则可以使用svn:externals与主"库同时从另一个存储库中提取另一个项目,并在两个库上都建立一个反应堆.

If you want to avoid the manual checkout, you could maybe use svn:externals to extract the other project from the other repository in the same time as the "main" one and setup a reactor build on both.

这应该可行,但并不理想(并且由于项目不在您的控制之下而导致构建失败时,您会发疯).理想的解决方案是在远程存储库中提供其他项目工件.

This should be doable, but is not ideal (and you'll get crazy when the build will fail because of the project that is not under your control). The ideal solution would be to make the other project artifacts available in a remote repository.

这篇关于SVN存储库中的Maven依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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