Maven 组件插件 &增量构建
看来程序集插件(或 jar/war 插件)只是愚蠢的。 他们只是想不出什么时候无事可做。
如果目标的所有依赖项都比目标旧,则基本“Makefile”将不会重新编译目标。
对于maven来说,似乎打包是“一直”完成的! 如果我先执行“mvn package”,然后执行“mvn Integration-test”,Maven 将一次又一次地处理这些包。 由于我构建了一些胖独立罐子:这需要一段时间!
这是否也适合您,或者我的配置是否有问题。
预先感谢您的帮助,
拉斐尔
It seems that the assembly plugin (or jar/war plugin) are just dumb.
They just can't figure out whenever there is just nothing to do.
A basic "Makefile" won't recompile a target if all its dependencies are older than the target.
For maven, it seems that the packaging is done "all the time" !
if I do "mvn package" and then "mvn integration-test", Maven will process the packages again and again.
Since I build some fat-standalone jars : it takes a while !
Is it also the way is works for you, or is there something broken in my configuration.
Thanks in advance for your help,
Raphaël
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Maven 中存在一个 Life-Cycle ,它贯穿每次调用一个阶段时。
意味着运行集成测试之前的所有阶段(包括集成测试本身),其中包括您的案例中的包阶段。此外,您不应该调用集成测试,因为在这种情况下集成后测试将不会运行。您应该调用 mvn verify 来代替。
上面的结果是你应该简单地调用 mvn Integration-test ,打包阶段就会自动运行。 Maven 不是 Make。
In Maven exists a Life-Cycle which is run through every time you call a phase.
means to run all phases which are before integration-test (incl. integration-test itself) which includes in your case the package phase. Furthermore you shouldn't call integration-test cause the post-integration-test will not run in this case. You should call mvn verify instead.
The result from the above is you should simply call mvn integration-test and the package phase will run automatcially. Maven is not Make.