Tag Archives: Maven

Looking for JBoss Maven Repository?

JBoss has decommissioned their Maven 2 repository (about an year ago according to their site) which was available at http://repository.jboss.org/maven2. But many resources out there still refer to this repository, and many people face the following error when they try to use this repository.

Access denied to: http://repository.jboss.org/maven2

This is because JBoss has deactivated this repository and setup a 403 (HTTP Forbidden) error on this URL. After googling for a while, reading through JIRA entries etc., I found this page which pointed to a new repository from JBoss that contains most (if not all) of the artifacts from the previous one. The new repository URL is http://repository.jboss.org/nexus/content/groups/public-jboss/.

It could have been better if JBoss could have given a hint about this in their old repository URL, instead of sending a 403, which gives no clues.

In fact, as the URL indicates, this is a Nexus Maven Repository instance. You can access the Nexus Repository Manager from http://repository.jboss.org/nexus/ which lists all repositories hosted in it.

Resolving Maven blacklisted artficats

I am fairly new to Maven (been reading a lot about it but did not use it for anything larger than sample apps), and recently attempted to set up an internal Maven repository (using Artifactory) in my organization. Due to misconfiguration of proxy settings, I was not able to download a plugin from the internal repo (that was not cached there at the time, which Artifactory attempted to download from central), and my internal repository got blacklisted for that particular artifact.

However, even after I fixed Artifactory configuration to use the correct proxy to download from central, I was not able to get the build working because for that particular artifact, Maven has blacklisted my internal repository. Each consecutive Maven run fails even without even checking my internal repo as it is blacklisted.

The way to get around from such a situation is to use the -U flag when invoking Maven run, so that it will force Maven to update all plugins from the repository. For example, if you are trying to run the install life cycle phase,


mvn -U install

Once -U flag was given, Maven successfully attempted to resolve the dependency from my internal repository, which then downloaded and cached it from central, and made it available for my build.

I found the above solution buried under replies for a post in a Maven-User mailing list, after some time spent Googling.

So I just thought of writing about this here in my blog, hoping that Google will pick this up and help a poor soul in search for a solution for the same thing :).

A look at Apache Maven 2

I was using Apache Ant for for managing my day to day build tasks. I wanted to take a look at Maven for sometime now, specially as it is gaining popularity among open source circles, including Apache Software Foundation. But until recently I couldn’t find some free time to spend on Maven. I took a look at what it is here and then, but it was not very clear to me first because the concept of Maven is entirely different from Ant.

This weekend, I managed to spend sometime looking at Maven, and I have to say that I am impressed with the concept. Specially with the concept of using archetypes and phases, building on common patterns in building software. I tried out building simple projects using Maven, but still have to try to create a full blown J2EE application with Maven.

However, one thing I noted was the time it takes to download libraries from remote repositories. Its really annoying, specially when you start working with Maven for the first time, as it downloads required dependency from repositories. Since my Internet connection is not very fast, I had to wait about an hour till all the dependencies (I was trying out AppFuse) was downloaded. Also, later on, I tried to build another project, and it took about 30mins before it was done, because of downloading dependencies. It was really annoying to wait for 30mins just to get your build done. I didn’t like it, and I believe this is same with other developers, as I saw this discussed in developer forums.

Apart from this annoying time it takes for downloading libraries, the concept of Maven is cool, using build patterns, the way it resolves dependencies etc. It’s really worth to spend sometime on this tool, as it can reduce the time you spend working on writing build files (the Ant approach).