Dependency report causing maven builds to run slowly

Issue:

Maven builds running unusually slowly when using site-deploy. Dependency report taking a long time to generate. Url is invalid – repository will be blacklisted.

Cause:

By default, dependency location checking is enabled, and maven will try to connect to the dependency repository URLs for each external dependency. If it cannot connect to those URLs for whatever reason, it’ll time out – but not until after a long pause, sometimes up to 10 minutes for each URL.

Fix:

One way of speeding up these builds is to bypass the whole dependency checking process. You can do this by defining the maven-project-info-reports plugin in your pom, and setting dependencyLocatiosEnabled to false:

 

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-project-info-reports-plugin</artifactId>

<configuration>

<dependencyLocationsEnabled>false</dependencyLocationsEnabled>

</configuration>

</plugin>

 

The only drawback of this fix is that the dependency repository locations won’t be published in your maven site report.