Skip to main content

Exploring Maven 3 with John Ferguson Smart

Posted by editor on October 22, 2009 at 5:44 AM PDT

John Ferguson Smart's new article and his latest blog post both investigate aspects of the upcoming Version 3 of Apache Maven. Maven, in case you're not familiar with it, is a "software project management and comprehension tool." At the core of Maven's application to a specific software project is the project object model (POM). The POM file provides information on the basic structure of the project, and enables Maven to manage a project's build, reporting, and documentation. It's all about automating tasks that once required a lot of repetitious keystrokes by developers, QA teams, and others.

If you read John's writings on and elsewhere, it's readily apparent that automating the processes of developing, building, and testing software are high on his list of concerns. In fact, professionally, he spends a lot of his time training and mentoring companies on agile development and software lifecycle management. Given this background, it's no surprise that Maven is among John's interests.

Last week we published John's article, "Working with Maven in NetBeans 6.7.1". This article outlines and demonstrates many new features in NetBeans 6.7.1 that facilitate working with Maven. Subtopics in the article include:

  • Creating a Maven project in NetBeans
  • Working with your Maven project
  • Managing the Pom file
  • Managing Dependencies

In his latest blog post, Writing your pom files in Groovy - a sneek preview of Maven 3's polyglot features, John talks about the new Maven 3 feature where your POM file doesn't have to be written in the historical XML format. In the post, John demonstrates how you could write a POM file in Groovy. He notes, however, that Maven 3 is expected to support writing POM files in other scripting languages as well.

One interesting item in the new Maven is the translator tool. This tool will translate your existing XML POM files into a different language, for example, Groovy:

$ translator pom.xml pom.groovy

John closes his blog post with:

I've just scratched the surface of Maven 3 Groovy support, but hopefully this will give you some idea of what it's all about. In the coming weeks, I'll write about some of the other new features in Maven 3.

I look forward to reading those posts!

In Java Today, the Mobile and Embedded Community is featuring the story Mixins in JavaFX 1.2 Technology:

With the release of version 1.2 of JavaFX technology, developers have a new style of class inheritance: a mixin. A mixin is a type of class that can be inherited by a subclass, but it is not meant for instantiation. In this manner, mixins are similar to interfaces in the Java programming language. However, the difference is that mixins may actually define method bodies and class variables in addition to constants and method signatures...

The NetBeans Community is featuring a news item on OSUM: OSUM Hosts Global NetBeans Demo Fest!:

For the month of October, the OSUM (the Open Source University Meetup) Community is celebrating NetBeans technology by hosting tech demos of the IDE around the world! OSUM is a global network of student developers and on-campus clubs. Membership in OSUM gives students access to free technology training, on-campus events, and tons of free student resources to help them grow as developers and widen their career opportunities. Are you a student or an educator? You can join OSUM and participate in the community's month-long NetBeans Demo Fest by visiting the OSUM site, locating your school's OSUM group, and finding scheduled demo events. Gather your developer friends or students and watch (or show) cool demos of the NetBeans IDE in action...

peligri announces Now Playing, Kohsuke! Recording of Hudson Webinar Now Available:

Kohsuke's Webinar on Hudson last week was a success;
it was very well attended and had
Great Reviews,
and it is now
Available for Replay (free, but requires registration). If you are interested in the topic, also check the
Hudson Whitepaper...

In today's Weblogs, John Ferguson Smart discusses Writing your pom files in Groovy - a sneek preview of Maven 3's polyglot features:

Maven 3 is promising to be the most significant upgrade since the release of Maven 2. While maintaining backward compatibility with existing Maven 2 projects, it introduces a number of powerful and compelling new features, such as a complete rewrite of the internal architecture, OSGi support and multi-language pom files. In this article, I will be giving a preview of this last feature. One exciting new feature in Maven 3 is it's ability to work with pom files written in non-XML notations. The Maven core now provides an underlying DSL to access the Maven internals, and write POM files in the language of your choice...

Joshua Marinacci introduces My new blog:

As many of you may know, user interface design is a passion of mine. I want software that both looks pretty and acts well. I've had lots of ideas on the topic, often bleeding over into art and traditional design, in addition to usability. After thinking about it for a couple of years I've finally decided to create a blog dedicated to the topic: At Josh On Design I'll be writing on art, design, and usability, but with a twist. There are plenty of design sites that focus on professional designers. My site will focus specifically on design for software engineers...

And Cay Horstmann provides instruction on Monitoring the HTTP Traffic in a JSF Redirect:

I wanted to trace exactly what happens when a JSF page uses a redirect. Here are my experiences with the HTTP and TCP/IP monitors in NetBeans and Eclipse, and why I ended up using Wireshark instead. Consider the usual JSF flow. The client makes a GET request for the first page. That's a special case, but from then on everything follows a pattern. The server renders a page containing an HTML form that is to be posted back to the same URL. The client makes a POST, the server navigates to a new page and renders it. The problem is that the browser requested the new page with the old URL, and so the browser bar URL is always one step behind...

In the Forums, pablopina needs information on JMS lookup in clustered environment: "We are trying to deploy our app to a cluster. My app client can't find the JMS resources any more on startup (through @Resource annotaions). Is there a different way of looking up JMS resources when running on cluster? ..."

scottjg needs help regarding ServiceActivity and ActivityEndEvent: "Hi, Does Mobicents send ActivityEndEvent for ServiceActivity when for example service is uninstalled or stoped? I provide method for ServiceStartedEvent and ActivityEndEvent, and additionaly I attache again to ServiceActivity ACI in..."

And matbitty has a Problem using the data-extension.type with graphml and JAXB: "[nobr]My first post, so trying to get everything correct

Related Topics >>


Maven 3: does it require Groovy?

One thing I didn't get from John's article was whether Maven 3 requires poms to be in Groovy. Call me old-fashioned but a pom seems like just the sort of thing that should be in XML, and I'm not terribly interested in turning it into a programming language artifact.

(Incidentally, kudos on your front page work; I like your voice and style very much.)

Maven 3 POMs

No, Maven 3 doesn't require POMs to be in Groovy. That's just a new option. I agree that XML is the natural language for a "project object model" file. That's still there. I think the point is that developers who work more exclusively in languages like Groovy, or Ruby, will now be able to write their POMs using the language they know best. Undoubtedly, under the hood, Maven 3 has simply added a new collection of POM interpreters. The original one read XML, now they have others that read other languages.