difference between building in eclipse UI and CLI #1473
-
I observed that building in the command line (mvn) takes considerably huge amount of time(with lot of dependency downloads etc.), even comparing with project->clean build.Are the two builds doing exactly the same? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
It depends on what "commandline" you compare ... beside that "UI" builds are never the same as "commandline" as they are using different tools/concept. |
Beta Was this translation helpful? Give feedback.
-
"Project > Clean Build" does use Eclipse JDT incremental builder and doesn't invoke |
Beta Was this translation helpful? Give feedback.
-
Thanks @laeubi and @mickaelistria for the response and detailed explanation.I understand the difference now. |
Beta Was this translation helpful? Give feedback.
"Project > Clean Build" does use Eclipse JDT incremental builder and doesn't invoke
mvn
at all even for Maven projects. What happens is that Eclipse has an internal translation of project configuration (settings, dependencies) according to Maven (Eclipse m2e provides that) and this configuration is reused for a clean build, so only .class files are generated accordingly.The
mvn
command-line does resolution of dependencies, check for remote artifacts, extra configuration and many more things more than "just" compiling, as a result the operation is much longer.The only drawback with this approach is that it can happen for some cases (depending on the Maven plugins being used or other Mave…