I Need –help!


I’ve bragged that Maven2 is the best technology to emerge since Compact Discs replaced cassette tapes but in all honesty it suffers from a little thing I like to call… umm… block-head user-interface design! I hope none of the M2 developers frequent my site and take offense, believe me I am deeply thrilled with your product if you are reading but check it out. I should not have to waste hours googling the net, posting stoopid forum help requests, or getting side tracked on unrelated but interesting links from your wiki to figure out what the how to set the compiler to JDK5 level during a build. The plain fact is that Maven2’s interface is just a little, how should I put it? …A little less than user friendly. To start it’s a command line. OK, I’m blugened with command line work every minute being a Linux user so that doesn’t hurt me as much. (I can’t say the same for poor Windows users.) But then the command line is hard to use. You got plugins for everything, a separate syntax for plugin options versus the syntax for core maven options, the hard to manage requirement of qualifying a plugin by using a package name/groupid so now I have to “-DarchetypeName=myCustomArchetype -DarchetypeGroupId=com.pkg.something -DarchetypeVersion=1.0 -DarchetypeNextOfKin=cousinMarchetypePlugin -DarchetypeNextOfKinName=… -DarchetypeNextOfKinGroupId=… -DarchetypeNextOfKinBloodType=…”

Here’s the story, true story. I began this morning on a quest to understand Maven deeper since we’re using it a lot more at my job and all. I thought it’d be a good idea if I learned exactly how to manage the versioning and intermitten releases of a given project. I picked up the latest copy of “Better Builds With Maven” because frankly I’m interested in having a better build of our project. I started reading and following allong the example daytrader EJB application. I even downloaded the source and started running the commands. Somewhere in the example there was a mention of running “mvn -N install” in the root directory of the project. I was curious. “-N” was an option that I don’t use and I wanted to know what it meant. I did what would come natural to any Java developer on a linux box. I ran “man mvn”. Realizing there were no man pages for the mvn command I progressed my documentation search to the next level. I ran mvn with no args then when that didn’t work I ran “mvn help”. That activated the help plugin which naturally wanted to look for a project. I was totally confused so I went on the Maven web site and browsed the online documentation. I couldn’t find an explanation to either the “-N” param or any documentation on the mvn command line available options. After furiously Goolging for an answer I stumbled across a page that pointed me to “mvn –help”. I thought, “Oh, now why didn’t I think of that earlier?” I’ll tell you why. Because I thought of “mvn help” first and because that invoked the help plugin I thought that would be the most natural place to put help documentation. To be honest I’ve gotten so used to “cmd help” syntax of Bazaar and svn (I’ve been using both of them a lot more recently) that it never occured to me that some commands expect “–help” as a parameter instead. Infact there are some commands that look for “help” some that look for “-help” and some that expect “–help”. It’s all too confusing. by default mvn should at least indicate the need the use the –help flag when you run it without arguments and it throws an error. I’m just too frustrated and if you feel my pain holler back…

4 thoughts on “I Need –help!

  1. Right. This time with diamond brackets:

    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
    <source>1.5</source>
    <target>1.5</target>
    </configuration>
    </plugin>

  2. Thanx Merlyn. Yeah, I know now how to set JDK-1.5 for compiles after Googling it on four separate occasions. My real problem is how you have to “know” Maven intimately before you can do even the more subtle tweaks to it. Something as simple as discovering the meaning of a -N flag on the command line or generating a starter web-app project should not involve random web searches and hours of manual browsing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s