需要运行“maven包”更新单元测试 [英] Need to run "maven package" to update unit tests

查看:220
本文介绍了需要运行“maven包”更新单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在我添加了maven2管理之前,每当我在maven2中启动依赖关系管理更新测试 - 更改将显示即时。



然而,现在我必须先运行mvn clean package,然后才能轻松的改变。



我可以看到Maven Builder:AUTO_BUILD运行每当我保存一个类,但更新只是没有被拾起,直到我运行mvn目标。



当我右键单击项目并转到属性>构建者时,我似乎也无法配置Maven Builder。



对此的任何帮助将不胜感激。



感谢
Gearoid。

解决方案

奇怪的一个 - 我右键单击我的项目,然后进入属性> Maven> LifeCycle Mapping。



我添加 />

有趣的是,我回去删除了包,一切正常。


I recently "enabled dependency management" in maven2 for a web project which I had a simple test class running in.

Before I added the maven2 management, whenever I updated the test - the change would appear instantaneous.

However, now I have to run "mvn clean package" before the slightest change can be picked up.

I can see "Maven Builder: AUTO_BUILD" run whenever I save a class but the update just isn't picked up until I run the mvn goal.

I also can't seem to configure a "Maven Builder" when I right click on the project and go to Properties > Builders.

Any help on this would be much appreciated.

Thanks, Gearoid.

解决方案

Strange one - I right clicked on my project and went Properties > Maven > LifeCycle Mapping.

I added "package" to the mapping and everything started working correctly.

Interestingly, I went back and removed "package" and everything worked as normal.

这篇关于需要运行“maven包”更新单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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