How exactly are SNAPSHOT dependencies with turn off caching efficient


(Crazyjavahacking) #1

Hi,

as part of our build on build server, we need to be sure that our build always uses the latest SNAPSHOTs, otherwise in some cases build investigation would became very confusing.

However once I turn off caching for changing modules, the configuration time takes about 10s. Yes we do have huge ~400 modules multimodule project, but still it is quite a lot of time.

Which brings me to the question:

In multi-module build, is one SNAPSHOT dependency (the same GAV and the same Maven repository) queried for Maven metadata only once?

Thanks,
Martin


(Stefan Oehme) #2

Yes, they are only refreshed once per build.

It shouldn’t affect your configuration time at all unless you have lots of snapshot dependencies in your buildscript.classpath. More likely you are resolving dependencies at configuration time, which is a really bad performance antipattern.