I needed to do some work on an old Maven project I have that I’ve worked on for years, and when I fired up my handy Netbeans IDE and ran the obligatory “priming build”, I was surprised to get an error on one of the basic Maven plugins.

Now I’ve worked through similar issues to this before, so I probably could have remembered the root cause, but looking at my screen and seeing the log it appeared I had some corruption in my local repository:

So I wasted some time looking at the plugin section of my POM, wondering if it was because I had a newer version of NB (and therefore Maven), or if there was a problem on my local folder.

After trying a number of things, including deleting my local repository in the ~/.m2 folder, I decided to run mvn with the “-X” flag to see more details:

And noticing that it was looking for a check but seeing HTML, which told me that there was something wrong with the download from http://repository.codehaus.org

Back to my trusty Google, and pretty soon I came across an search result saying that CodeHaus.org wasn’t hosting a repo any more. In fact the HTML I saw in the log was due to the way my ISP (CenturyLink) handles addresses that don’t exist any longer, displaying a sort of web search page.

After more digging, I found this page http://www.codehaus.org/mechanics/maven/  which talked about Codehaus no longer serving repositories, so I tried the suggestion there (with no luck).

Now I probably should have remembered that one of the things to love and hate about Maven, is that you can define things in all sorts of different ways. Doing a quick search through my project’s pom.xml file, I found the culprit: A plugin repository was defined in the XML that was pointing to the offending url:

And the fix was actually just to remove the Codehaus specific pluginRepository entry (since the plugin I needed is actually hosted in the main repo anyway).