Need to run “maven package” to update unit tests

一曲冷凌霜 提交于 2019-12-24 10:24:04

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/5662437/need-to-run-maven-package-to-update-unit-tests

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