Kengo's blog

Technical articles about original projects, JVM, Static Analysis and JavaScript.

Maven tips in my repository

Currently my GitHub has 22 repositories. I think reading all of them is little hard.
So I've picked up some tips from them, they'll be helpful for you.

rejecting old maven

To force user to use new Maven, you can use prerequisites property.

	<!-- you should use 3.0.4 or higher -->
update: for Maven3 2012/June/13

You have to use Require Maven Version plugin for Maven3.

using latest hamcrest

The latest junit depends on hamcrest-core 1.1, and it isn't latest. If you wants to use latest hamcrest, you have to use junit-dep instead of junit.


avoiding javadoc warnings caused by Mojo annotations

Mojo uses javadoc annotation as parameter, but maven-javadoc-plugin cannot handle it correctly and prints a lot of warnings.
You have to configure tagletArtifact like below.

		<!-- avoiding javadoc warnings caused by Mojo annotations -->

repository for args4j

In some years ago, we used m.g.o-public to get args4j. But currently it doesn't work well. We have to use Maven repository for Jenkins.

		<!-- repository for args4j -->