how can we reuse maven’srepository contents to avoid redownloading external dependencies on each project’s build?

You are absolutely right.

  • 100% agree, it’s better to use common local repository. All artifacts have versions and it’s safe to reuse them among different projects.
  • Yes, Nexus and Artifactory are used exactly for this purpose. Usually, such local tool in your local network is much faster. Also, they usually store build artifacts (.jar or .war files) which you can use as dependencies in other projects.
  • This point makes sense, but I did not see it in practice. If you can set it up, then build time should be reduces even more. But if something goes wrong with this cache (eg corrupted artifact is cached) then you have to resolve it (probably manually).

Also I would recommend to analyze build time deeply. How much time do you actually spend on the dependency downloading? I don’t believe that it takes majority of the time build.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top