使用“mvn verify”运行连续构建是否安全?而不是“mvn clean verify”
目前,我们正在 Hudson 上使用“mvn clean verify”运行持续构建。这就是我们一直所做的,所以我们从未质疑过。
问题是:仅使用“mvn verify”运行连续构建是否安全? 因此,这意味着 maven-compiler-plugin 只会编译自上次构建以来发生更改的类,并节省宝贵的时间。
反馈的质量是否与“干净”相同,或者是否有任何预期的缺点?
正在测试的产品是一个典型的 Java Web 应用程序,具有大量生成的代码(JSP、报告)。还有一些关于使用依赖注入的代码。
We are running our continuous builds on Hudson currently with "mvn clean verify". That is what we always did and so we never questioned it.
The question is: Is it safe to run a continuous build with "mvn verify" only?
So that would mean the maven-compiler-plugin would only compile classes that got changed since the last build and save precious time.
Will the feedback be the same quality as with "clean" or are there any drawbacks to be expected?
The product being tested is a typical Java web application with lots of generated code (JSPs, reports). There is also code around using Dependency Injection.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,这不安全! Maven 编译器插件不够智能,无法发现类
A
的 API 已更改,并且它应该检查使用的所有其他类> 这个 API 也是如此。它只会编译A
并创建一个包含大量损坏类的 jar。注意:通常最好提前运行
mvn clean
,然后运行构建/验证/编译/安装。这允许您多次运行第二个命令,而无需一直进行清理。No, it's not safe! The Maven compiler plugin is not smart enough to figure out that the API of a class
A
has changed and that it should check all other classes which use this API, too. It will only compileA
and create a jar with a lot of broken classes.Note: It's usually better to run
mvn clean
in advance and then run the build/verify/compile/install. That allows you to run the second command several times without cleaning all the time.