开发者

Separation of a specific group of dependencies in Maven

hey, how t开发者_Go百科o deal with situation when a half of my dependencies is needed only for integration testing (runtime deps).

there is like 30-40 of them, if I have them in test scope, I have it on classpath in eclipse -> annoying, and secondly having 30 deps in pom definition just for integration testing that I run one time a week is very time demanding when developing.

Is it that I need to separate them into a child maven project that I only include when running the tests ? Or into a completely unrelated project? It just doesn't make much sense to do that, because it is not a project per se.


I think you can make a multimodule project, where the parent has the common dependencies and the integration test project depends on the "regular" project and has its additional dependencies. Or you can use inheritance. http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜