Frequently Asked Questions

mrdon edited this page Sep 13, 2010 · 4 revisions

Why would I want to use this plugin?

The YAML version of pom.xml tends to cut the size down 2-4x, making it much more readable and easy to modify. For small projects, it means the pom is now simple enough to write from scratch, and for larger projects, it makes quick work of long dependency lists. Since the regular pom.xml is still around, your tools and existing build processes work as they did. In fact, co-workers can continue to modify the XML version and ignore the YAML one without problems.

What limitations exist?

The primary limitation is the sync command manages the formatting of both the XML and YAML versions, so if your pom.xml has a bunch of comments or special formatting, it will be erased in the sync process. On the other hand, this means the formatting of pom.xml stays consistent and can be maintained automatically, so it may be a good thing, depending on the project and team.

Why not modify Maven to read the YAML version directly and do away with the tedious sync?

Currently, Maven 2 cannot handle different formats of the pom. although I hear in Maven 3 that may be possible. However, even if it was possible today, chances are your tools wouldn’t be ready, so all the nice integration you get in IDEA and Eclipse would be lost. Finally, the sync allows other, more XML-happy, developers to continue to modify, and more importantly, copy-paste large swaths of XML between poms, which for larger teams or companies, can be a huge timesaver.

Is this your idea?

Nope. The original idea, or at least as far as I’m aware, came from Maven Less Ugly, a blog post by Eric Redmond that used a Ruby script to do the conversion. I painfully ported the clean ruby into verbose Java, and continued to try to find a way to best integrate the concept into the Maven process.

The YAML files look like crap in IDEA, surely there is a better way?

There is. Install the Ruby plugin, which has support for YAML files that will make viewing and editing YAML much easier.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.