Post image for What is a Maven POM?

What is a Maven POM?

by simpsonjulian on July 8, 2009

Why I am asking about Maven POMs? I do know, honest. But I often read blog posts or articles about Maven and wonder about the language being used. There’s some very domain specific terms in use here. So I decided to offer some definitions for people starting out with Maven.

Today, we start with POMs. I asked Maurizio Pillitu of SourceSense to define the term for me.

The Project Object Model is a description of your project; it is exactly a model, as stated in its name, it is the breakdown of all the elements of your application: dependencies, repositories, SCM connectors and so on. In a POM you never implement the behavior, you just configure it, using a set of predefined conventions (like src/main/java for sources, src/site for documentation …) The POM acts as a template to finally generate an *Effective POM* which expresses all the executions of all the plugins that must take place during the build.

So a POM is telling you about every major entity in the project. Which Maven needs to know about in order to build the project. I’d summarise a POM as a kind of manifest or packing slip.

Cue man in blue coat:”Yeah, it’s all here. 5 source trees, two version control systems and a bunch of Selenium tests. We ought to have that built by Wednesday.

Maurizio continues:

The POM is one of the biggest evolutions that Maven contributed to the build tooling universe; in the past we were used to implement the behavior of the build; now we describe the prerequisites, assuming that we know what the behavior is, tweaking it a little bit with some configuration.

Which is a really interesting point. If you think Ant or one of it’s ports is a declarative tool, wait until you see a Maven POM file.

Shouts due to Maurizio and also John Smart who did a great Maven talk on Monday night. The M2Eclipse tool will save you from the horror of XML. It’s a full visual editor for POM files (and more).

Image by Tavallai


Share with the group:
  • Digg
  • del.icio.us
  • Facebook
  • DZone
  • LinkedIn
  • Slashdot
  • StumbleUpon

Related posts:

  1. Maven 2.2.0 is out Lot of fixes and some new features. This is the...
  2. Bamboo 2.5 released with improved Maven support The Atlassian guys just released Bamboo 2.5.  Highlights are: Maven...

Related posts brought to you by Yet Another Related Posts Plugin.

{ 1 trackback }

What is a Maven POM « So long, and thanks for all the posts
July 12, 2009 at 3:44 pm

{ 0 comments… add one now }

Leave a Comment

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

Previous post: Story: Daniel’s Continuous Integration System

Next post: Story: Wolf++ fixes the Deployment Process