不要只重建与Maven必要的罐子 [英] Do rebuild of only necessary jars with Maven

查看:291
本文介绍了不要只重建与Maven必要的罐子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能让所有行家重建取决于某一模块 A 上的所有模块?也就是说,包括具有依赖于 A 模块模块等一路上涨的依赖关系树?

Is it possible to have all maven rebuild all modules that depend on a given module A? That is, including modules that have modules that depend on A, etc. all the way up the dependency tree?

我知道我可以做这样的事情
<一href=\"http://programmers.stackexchange.com/questions/144568/force-recompilation-of-war-file-including-its-jar-dependencies\">http://programmers.stackexchange.com/questions/144568/force-recompilation-of-war-file-including-its-jar-dependencies
手动得到这个正在进行。然而,这与任何真实的code时就变得很麻烦。如果你有上百个,有很多依赖的模块,你真的不希望为每一组不同组合的POM。而你不希望有一个超级POM,因为这将只是采取永远建立。

I know I can do something like this http://programmers.stackexchange.com/questions/144568/force-recompilation-of-war-file-including-its-jar-dependencies to manually get this going. However this becomes cumbersome when working with any real code. If you have hundreds of modules with lots of dependencies you really don't want to make a pom for each set of different combinations. And you don't want to have a super pom because that will just take forever to build.

该算法是非常基本的。如果模块 A 的变化只是看东西的地方依赖于它,然后重建为好。在刚刚建成的模块重复,直到没有更多的模块离开了。这是否在功能存在的Maven没有必须创建一个新的POM?

The algorithm would be fairly basic. If module A changes just look for where something depends on it, then rebuild that as well. Repeat with the just built modules until no more modules are left. Does this functionality exist in maven without have to create a new pom?

编辑:用快照打交道时,我的意思。由于@StackFlowed

I meant when dealing with snapshots. Thanks @StackFlowed

推荐答案

您应该看一看

mvn -pl ModuleYouWouldLikeBuild -amd 

应该做你喜欢什么。 -amd代表也使依赖

should do what you like. -amd stands for also make dependencies

这篇关于不要只重建与Maven必要的罐子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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