Maven Annoys Me

Maven is kind of everywhere in the Java build world, but nonetheless it annoys me to no end. I've been using Ant for many years now, but never really found a good use for Maven since it never really fit with my needs since most of the projects I worked on in the past were in a mixture of C, Python and other languages. In that space I never found much need to the dependency handling capabilities that Maven brings to the table.

At my new job though... we have some Java code... and it uses Maven.

This afternoon (and into the late evening) I spent fighting with Maven doing something that made no sense. I had been working happily along on a project when all of a sudden it stopped compiling with the following error:

Failure executing javac, but could not parse the error:  
    An exception has occurred in the compiler (1.6.0_31). Please file a bug at the Java Developer Connection (  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.

Thank you.$CompletionFailure: class file
    for org.hibernate.annotations.CacheConcurrencyStrategy not found

This is pretty strange since the project doesn't use hibernate (at least not for the part I'm working on) and it was compiling fine 10 minutes ago and there haven't been any updates to the SCM repository. So what the hell is going on here. Ultimately I ended up having to add some dependencies and a repository for getting the missing Hibernate libraries. But I still don't understand what went wrong in the first place. And weirder still... it continued to compile for one of my coworkers throughout this period. Very very strange indeed.

If you run into this problem... the quick solution is to update your pom.xml with the following hunks:

    <name>JBoss Maven Repository</name>

And while I'm talking about it... what the hell is up with those version numbers for the hibernate dependencies... Once is #.#.#.Final and the other is #.#.#-Final. Why?!