If your maven site build is too slow

Today I stumbled upon a very slow site generation with mvn site. To be honest I didn’t really bother about having a look into tho log messages at first. But these messages should have made me conscious that something was going wrong:


[ERROR] Unable to determine if resource batik:batik-util:jar:1.6-1:compile exists in https://repository.jboss.org/nexus/content/groups/public/
[ERROR] Unable to determine if resource com.google.appengine:appengine-api-stubs:jar:1.4.3:test exists in https://repository.jboss.org/nexus/content/groups/public/

The message is quite clear, one of the report plugins (namely the dependency report plugin) tries to determine if resources are located within a given repository. If that repository doesn’t exist anyomore or is just terribly slow, your site build will be as well.

Thanks to Andy I figured out that I can easily swith that part off by providing an extra parameter to mvn site -Ddependency.locations.enabled=false.

Enjoy your faster site build, and do check your repository configurations regualary!

Advertisements