maven clean install等于mvn clean并在mvn安装后?

时间:2012-05-17 10:34:19

标签: java performance maven install

我有多模块maven项目。发现:

mvn clean - 需要3分钟 之后

mvn install - 需要18分钟。

所以我认为mvn clean install需要21分钟,但需要30分钟! 同样如此:

mvn clean install

mvn clean
mvn install

? 感谢。

2 个答案:

答案 0 :(得分:4)

AFAIK,是的,虽然我对启动/解决/等有点惊讶。 很长时间。

OS缓存,JVM启动/优化等等等都会在差异中发挥作用。

答案 1 :(得分:2)

让我们举个例子

framework
    framework-utils
 foundation
    foundation-model
    foundation-api
    foundation-core

 The call order of my modules:
 1. mvn clean / mvn install:   [clean] framework-utils [clean] 
 foundation-model [clean] foundation-api [clean] foundation-core 
 [install] framework-utils [install] foundation-model [install] 
 foundation-api [install] foundation-core
 2. mvn clean install: [clean] framework-utils [install] 
 framework-utils [clean] foundation-model [install] foundation-model 
 [clean] foundation-api [install] foundation-api [clean] 
 foundation-core [install] foundation-core