My first impressions of Maven2

Before tonight I had never used Maven. I often notice articles and blog entries about Maven and have been curious. The way I understand it, Maven has created standardized ant build scripts for common tasks found in almost every kind of project. It also keeps a repository of dependencies on my hard drive sync'd with one or more remote servers. We can set up our own Maven repository at work if we wanted to. Maven makes managing dependencies and versions of dependencies simple.

The reason I didn't give it a look in the past is because I thought it was for those old fogies who still use text editors instead of IDEs. IDEs provide all of this functionality already (so I thought). Then I got thinking about how neat it would be if the buttons and menu items in my IDE mapped directly to Maven goals instead of the IDE generated ant targets. I looked into it a bit more and discovered that NetBeans 6 has Maven2 project integration. I gave it a try and was pleasantly surprised. It looks and feels like I'm working with a normal Java SE, Web, Java EE, etc. project but under the hood Maven is the build system. The project properties dialog and a few other screens are Maven specific. Very cool.

The two things I like most about this are:

  1. Project portability. Now it doesn't matter if one developer wants to use Eclipse, an other NetBeans, an other IntelliJ, etc. We can all work using the same IDE independent project files.
  2. It manages dependencies in a standardized way. I can check out my project from subversion to any computer and build it. I don't have to worry about my IDE specific project files that point to jar files in some folder on my computer that doesn't exist on the other computer.

I'm almost sold on Maven2. However there are still some things I need to find out. What functionality of my IDE will no longer work? Will I still be able to use the profiler? Visual web tools? Debugger? PMD/FindBugs/CheckStyle plugins inside of the IDE? I'll have to do some more research later.

Comments (1)

Comments:

visual web will not work. It's too tied to ant based projects. Maybe for post 6.0.
profiling will currently work as "attach profiler". Hope to add/simplify for 6.0, depends on complexity and timing. Debugger is ok.
the checkstyle/pmd/... plugins will probably work, will not take the configuration from the maven pom though.

Posted by Milos Kleint on October 05, 2007 at 02:02 AM EDT #

Post a Comment:
  • HTML Syntax: Allowed