1

I am adding a new program file to an existing Maven project. This project has a lot of dependencies and I have been using the following command in order to create a single fat jar file:

mvn clean compile assembly:single

However, the above command is taking very long time to run. What is the best way to reduce the build time? Perhaps it is possible to reduce the build time by building the dependencies (and also the unchanged program files) once for all, instead of doing it every time I compile the new program file.

Any suggestions?

Gerold Broser
  • 14,080
  • 5
  • 48
  • 107
PTDS
  • 217
  • 3
  • 8
  • 5
    Wouldn't just removing the `clean` help? It's been a while since I touched Maven, but cleaning should clean all the modules in a project. (Assuming that's what you mean by "dependencies.") – millimoose Oct 22 '15 at 22:52
  • You should bind the assembly plugin to the life cycle and with that you can do this by simply using `mvn clean package`... – khmarbaise Oct 23 '15 at 09:08

0 Answers0