ant
ant

Reputation: 22948

question about maven clean

Why does maven download dependencies when I run mvn clean? can I turn that off?

Upvotes: 1

Views: 168

Answers (2)

Pascal Thivent
Pascal Thivent

Reputation: 570325

Why does maven download dependencies when I run mvn clean?

AFAIK, it doesn't, Maven doesn't perform a dependency resolution during clean (I just cross checked that and I confirm it doesn't, at least not with Maven 2.2.1 and the clean plugin 2.2). Having that said, it seems that attaching a plugin to the clean phase can interfere and cause a dependency resolution (e.g. this happens with antrun as reported in JBBUILD-585). Maybe it's your case.

can I turn that off?

If you are doing some fancy stuff during the clean phase, remove it :) Another option would be to run maven offline during a clean (with the -o or --offline options).

Upvotes: 3

Igor Artamonov
Igor Artamonov

Reputation: 35961

run as mvn -o clean

Upvotes: 2

Related Questions