Getting the wrong jar out of Maven repository

From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Saturday, September 29, 2012 5:24 PM
To: Ruckman, Maurice (HAL)
Subject: Re: Nexus and Maven

If for some reason (and it rarely happens), you think you have a wrong jar in your local repository, you can rename the repository folder and maven will think it doesn't have a local repo and re-download everything:

$ mv /home/maurice/.m2/repository /home/maurice/.m2/disabled-repository
$ mvn install
-> maven will recreate the /home/maurice/.m2/repository folder with fresh content it will have to redownload
If you believe the shared Nexus repository contains an eronous jar, you can disable it in your settings.xml (see /home/maurice/.m2/settings.xml). You will have to fight with the proxy if you disable the shared Nexus repo on your VM as maven will try to connect directly to the internet.

Hope all is well

G

Leave a Reply