Move to Maven 3.0.4
I have been using Maven for ages now. I was running on 3.0.3 till last week. Being a Maven evangelist it is unlike of me to have not moved onto the latest version for so long. But I did linger on with 3.0.3 longer than I was comfortable. And the reason was whenever I tried to move to 3.0.4 it will simply not download the dependencies, while working behind proxy. I would get a long list of warnings and errors starting with the following.
Failed to retrieve plugin descriptor …
This was irritating to say the least. This weekend I rolled up my sleeves and set out to find what I was doing wrong. Turned out my beloved Maven was doing it wrong this time – and not me for a change, which is good. Apparently they did not add a jar that is required for working behind proxy [JIRA].
So, what do we do to fix it? Like most of the thing with Maven, it is quite simple. Download the requisite jar. Copy it at [your directory structure]\apache-maven-3.0.4\lib\ext. And that's it. You are all set. Start using Maven the way you have always done.
A humble request to Maven guys – we all know what an awesome job you have done and continue to do. Guess it is only normal to have a couple of bugs like this slip through. However, it has been there for six months now. Fix it please. I have been a passionate evangelist of this software and it helps my job if things like this do not linger on.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)






Comments
Wal Rus replied on Thu, 2012/08/02 - 11:34am
Well... I don't know what to say. Every time I build a project off of internet maven fails miserably due to missing artifacts all over the place. So I don't really understand how can anyone advocate for maven.
Harald Wellmann replied on Thu, 2012/08/02 - 12:39pm
in response to:
Wal Rus
Wal Rus replied on Thu, 2012/08/02 - 12:41pm
Well. Artifacts are missing from my local repository also.
Something like mvn --majic --majic --majic might just work
Mladen Girazovski replied on Fri, 2012/08/03 - 2:41am
in response to:
Wal Rus
I don't know what to say either.
Most of the time i build a maven project it works perfectly, especially when i have set it up myself.
On the other side, i've seen more broken maven builds than correct ones, must be the tool if people fail at it, right? ;)Wal Rus replied on Fri, 2012/08/03 - 11:44am
It boils down to a single mistake: multiple repositories. There shoudl be "One" repository where everyone must submit their artifacts. If there are many, you'll certainly have a problem.
Wal Rus replied on Fri, 2012/08/03 - 4:17pm
Though possibly there is a solution.
http://maven-proxy.codehaus.org/Downloads
Chris Clark replied on Fri, 2012/08/03 - 5:13pm
A solution is an artifact manager (or repository manager)
Nexus is one product that seems to be up to the task: http://www.sonatype.org/nexus/
You can create cached repositories (wherein artifacts are downloaded via proxy from the internet and cached on the server), and a repository group (wherein you aggregate repository definitions inside one central repository, and that you can set in your settings.xml or your pom.xml)
The overhead of course is that you need to have a dedicated repository manager (so have some server that will run the tool and also have the storage for the artifacts, and make sure that all is stable and backed up)
But maybe that is just me speaking from an enterprise perspective. From an individual developer perspective, it is down to a matter of having the POMs or settings.xml configured the way you want it.