Why Installing Maven dependencies with the generatePom option is a good idea
I recently noticed my project’s Maven build takes ages to complete. Looking more closely I found out that on each build, Maven was trying to download a number of Poms from all declared repositories, waiting for a response from these repositories took some time and made my build process much longer. All the mentioned dependencies were ones I had to install locally on my local repository for licensing reasons.
So what’s happening here? When you skip -DgeneratePom=true while installing a local dependency, Maven will obviously not create a pom.xml for the dependency. Each time you build, Maven will try to download the dependency pom. I removed all problematic dependencies and installed again in the following method:
<pre style="font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; border: 1px dashed rgb(153, 153, 153); line-height: 14px; padding: 5px; overflow: auto; width: 95%;">
mvn install:install-file -Dfile=