Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Frequently Asked Questions
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.
YAML version directly and do away with the tedious sync?Why not modify Maven to read the
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.
YAML files look like crap in IDEA, surely there is a better way?The
There is. Install the Ruby plugin, which has support for YAML files that will make viewing and editing YAML much easier.