Maven 3

编程入门 行业动态 更新时间:2024-10-23 10:30:47
Maven 3 - 在测试和编译中使用不同的依赖关系(Maven 3 - Use different dependencies in test and compile)

我有一个依赖Spring 3的项目。我已经编写了依赖于Spring 4中的特性的集成测试。我如何使用Spring 4运行我的测试(集成测试只会是最好的,但在Spring中运行的单元测试4是可以接受的)但保持我的编译依赖3?

我已经考虑过用于集成测试的模块。 这不太理想,所以我正在寻找不需要模块的解决方案。

I have a project with a dependency on Spring version 3. I've written integration tests that depend on features in Spring 4. How do I run my tests with Spring 4 (integration tests only would be the best, but running unit tests in Spring 4 would be acceptable) but keep my compile dependency on 3?

I've already considered a module for integration tests. It's less than ideal, so I'm looking for solutions that do not require modules.

最满意答案

经过一番考虑后,我认为这是模块的完美选择。 我为我的代码和单元测试创​​建了一个模块,并为我的IT创建了独立的Spring 4依赖模块

After some more consideration I think this is a perfect candidate for modules. I created one module for my code and unit tests and a separate Spring 4 dependent module for my IT's

更多推荐

本文发布于:2023-07-31 01:50:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1340543.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Maven

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!