Maven Again

Because my new team at VCE uses Maven, I just picked it up again. Last time I used it was when I helped to port the CloudTools to vSphere for the CloudFoundry demo for VMworld 2009 keynotes. Because the project founder Chris Richardson had chosen Maven, I just followed his footsteps forward. After that, I didn’t use Maven.

In the last two years, however, I got a few requests from the community on supporting Maven in VI Java API project. I haven’t got time for it, but noticed it’s actually included in Hudson/Jetkins project. Using VI Java API with Maven is not hard after all. But life could be easy and I will do something there later.

Lost VMs or Containers? Too Many Consoles? Too Slow GUI? Time to learn how to "Google" and manage your VMware and clouds in a fast and secure HTML5 App.

I know developer community is divided on Maven – some love it and some hate it, all with good reasons. I think I am in the group of the others who don’t have a strong opinion about it.

Based on my limited experience with Maven, I think it’s definitely a good tool that makes it easy to build and manager typical projects in particular Java projects. But it seems like a magic box to users, meaning if you have special needs, you may be easily lost and ends up hours on the Web and trials researching for a solution.

Unlike last time I used Maven mainly with command line, I just installed the m2e plugin from from its update site this time. The installation process is pretty straightforward and fast. After that, I got into a trouble that Maven complains it cannot find javac compiler. Having changed the eclipse.ini and the preference page pointing to a JDK by default, I still found the same error. With a few more trials, I got it work after deleting the previous JRE entry in the Installed JREs in the Eclipse preference page. So it seems not enough to set a JDK as default – you have to delete the other JRE. It seems working fine afterwards.

Then, I wanted to try a bit more with something not so quite usual. I decided to create a HelloWorld project for a final jar with a timestamp suffix, such as the vijava API convention:, in which 5 is the version number and the 20110926 is the date of the release.

As it’s not supported out of box, at least I thought that way initially, I got the Maven Build Number plugin. After several Web pages (I found the plugin usage page is a bit confusing) and trials, I still could not get it to work as I wanted. Basically null took the place of timestamp indicating a problem with the generation.

In the end it worked without the Maven Build Number plugin, a pleasant surprise. Here is the pom.xml:

<project xmlns="" xmlns:xsi=""


Here is my after-thought from trying Maven. It’s a powerful tool with many great features, some of which are just hidden or not well documented, therefore just do a disservice to users who may either skip them or keep trying but waste much time that should be saved otherwise.

Having said that, I don’t have a silver bullet. But I think that is definitely something all software designer should think about and pay attention to while designing their applications and APIs.

This entry was posted in Software Development and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.


  1. Mikhail Stepura
    Posted November 4, 2011 at 3:05 am | Permalink

    Hi Steve,
    have you considered to publish VI Java API to the Maven Central?

  2. Posted November 4, 2011 at 3:13 am | Permalink

    Hi Mihail,
    I’ve thought about it and actually did someting with Sonatype but then got disrupted by other things. Will continue to work on it. Have you done it so be my consultant?

  3. Mikhail Stepura
    Posted November 4, 2011 at 3:32 am | Permalink

    @Steve Jin
    Unfortunately I have no such experience. Hope that would explain the process:
    I could help in case of maven related questions.

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.