user810430
user810430

Reputation: 11499

Maven clean install is equal mvn clean and after mvn install?

I have multimodule maven project. Found that:

mvn clean - takes 3 minutes after

mvn install - takes 18 minutes.

So I suppose that mvn clean install should take 21 minutes, but it takes near 30 minutes! So does it the same:

mvn clean install

and

mvn clean
mvn install

? Thanks.

Upvotes: 7

Views: 786

Answers (2)

aravindKrishna
aravindKrishna

Reputation: 440

let take this example

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

Upvotes: 2

Dave Newton
Dave Newton

Reputation: 160191

AFAIK, yes, although I'm a little surprised startup/resolution/etc. takes that much time.

Things like OS-caching, JVM startup/optimization/etc., and so on would all play a role in the differences.

Upvotes: 4

Related Questions