Version 2

    A local instance of Nexus (or another repository manager) can significantly improve the speed of your builds, especially if/when the time comes to clean out your local repository.  For example, if you want to build with a clean local repository to be absolutely sure that your build is not dependent on some locally cached jar file.


    The process to set up a local Nexus instance is relatively quick and painless.  And if you are not happy with the results, you can always remove it.


    Step 1 - Download and Install Nexus OSS


    Nexus can be downloaded for free from Sonatype's web site (

    I recommend starting out with the bundle zip since this is probably the easiest to set up.

    After downloading the bundle zip, just unzip it, and then run the appropriate startup script for your platform located under $NEXUS_HOME/bin/jsw

    $NEXUS_HOME/bin/jsw/linux-x86-32/nexus start


    If you need more detailed instructions, for example how to set up Nexus as a service, the process is well documented also at Sonatype's web site (


    Step 2 - Configure Nexus to Use JBoss and other Maven repositories

    The Nexus UI should now be available via your web browser



    Log in with the default username (admin) and password (admin123), and now you can add local proxies to the various jboss Maven repositories (Maven Repository).  For example to add a proxy to the jboss public group, use settings similar to the following.




    Note: There is one tricky part to this, Nexus proxy repositories can be snapshot repositories or release repositories, and the "public" group includes both snapshots and releases.



    So you'll probably want to create two proxy repositories both pointing to the jboss "public" group, and set the Repository Policy of one to "Release" and the other to "Snapshot".  Then you have to create a repository group which includes both of these proxy repositories.  Then you will have a local repsitory which matches the contents of the "public" group.


    Now you should have a repository group on your local Nexus which looks something like the following.




    Step 3 - Configure Local Maven Mirror Settings


    The next step is to configure Maven to use your local Nexus instance instead of using the remote repository URL.


          <name>Paul Server JBoss Public</name>


    Make sure the name in "mirrorOf" matches the name you specified in the pom or settings.xml


    Step 4 - Build

    Now try running a Maven build and see if it works.  The first build with a clean local repo may take a while as the local Nexus instance is populated.  However, subsequent builds using a clean local repository will have blazingly fast download speeds!