I use clean install
after change one line in one file. Project has a lot of source files, and it seems, that each source rebuilding again. Am I wrong? Is there way to speed up?
Asked
Active
Viewed 831 times
1
-
1Have you tried doing `mvn install` instead? – wjans Feb 14 '19 at 07:00
-
@wjans no, I haven't... Yes it's sounds quite logical . I've try this in next time, and come back with feedback). But I think, you're completely right – Feb 14 '19 at 07:08
-
Which IDE are you using? Where and how are you deploying? In eclipse, if you have selected Build Automatically then you don't need to run "mvn clean install", eclipse will automatically invoke mvn builder once you have saved your changes.. – Rahul Feb 14 '19 at 07:10
-
@Rahul, I don't use IDE. I'm writing code in *emacs*, and building with *maven* tool from command line (terminal) – Feb 14 '19 at 07:12
-
@Belenot: It definitely makes sense not to execute a `clean`, but on the other hand, it will depend on your module setup whether or not all source files will be recompiled. – wjans Feb 14 '19 at 07:13
1 Answers
1
You included clean
in your command - it deletes all built sources previously created and maven needs to build everything again. Try to use just install
.

Vlad Hanzha
- 464
- 3
- 11
-
Actaully with relative fresh maven version it's enough to use only "mvn verify". "install" is step which also add prepared artifact into repository, which cost some additional time and not always necessary. – Gmugra Feb 14 '19 at 11:17