Maven dependency from SVN repository

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 02:36:36

问题


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.


回答1:


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 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.

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.




回答2:


AFAIK Maven does not understand how to check things out of SVN.

Of course, you could fall back on embedding Ant targets in your Maven POM ... but that is rather unpleasant.



来源:https://stackoverflow.com/questions/3716510/maven-dependency-from-svn-repository

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!