Maven tweaks continued…

In a previous post I mentioned using the settings.xml file to force maven to use a local repository. In my case this is Jfrog’s Artifactory.

This was accomplished using the “mirror” element in the settings.xml file (example). While most of our artifacts are downloaded from the “central” repository. Some of them have dependencies that are not part of “central”. This resulted in the build reaching out to other 3rd party sites to download artifacts. This is undesirable for us because we want to have control over all artifacts, and in addition this can also slow down the build or even break it when those sites go down. Which is how we discovered it in the first place.

I banged around on google for a while looking for mailing list posts or examples to force mirroring of all repos to no avail. So on my lunch break today I decided to stop by the book store and pick up the Oreilly Maven Book. A couple of minutes poking around and I found an example that setup a mirror using a wildcard.

This entry was posted in /geek, /sysadmin, /unix, /work and tagged , , , , , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

One Comment

  1. Nitya Doraisamy
    Posted April 21, 2010 at 1:57 pm | Permalink

    You should be able to prevent maven from going to the central repo by overriding the central & snapshot repository in the pom.xml

    See – Overriding the Build-in repositories section:
    http://wiki.jfrog.org/confluence/display/RTF/Configuring+Artifacts+Resolution

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv Enabled