This is exactly the scenario that the new model builder is designed to handle in 3.0. You can transform from any format to a canonical data format and have the pom processed. You could even create a hierarchy of yaml files for inheritance, interpolation, etc. Take a look at blogs here: http://blogs.sonatype.com/people/author/shane/ to get an idea.
Shane On Tue, Jan 20, 2009 at 2:20 PM, Nathaniel Harward <[email protected]>wrote: > I was going to create a new MNG issue but thought I'd start here first: > managing large XML documents is no fun and long POM definitions with many > dependencies are subject to this. I saw a thread from 2007 that Eric > Redmond linked to regarding a YAML -> XML program ( > > http://markmail.org/message/5eiwzf5dgnb2hhjj#query:maven%20yaml+page:1+mid:jqspgciwwbzmvsvq+state:results > ), > but I wanted to investigate if there is any interest in building this > directly into Maven(/Modello) so that if pom.xml doesn't exist, next up > would be pom.yml (or pom.properties or the like, anything less verbose than > XML). An acquaintance of mine also suggested it might be nice to have a > Groovy/BeanShell/other file that's passed an empty Model object to populate > so that, for example, profiles could be triggered by other/non-standard > means, as well as listing dependencies and anything else in the POM. That > would give some dynamic programming flexibility to construct the POM along > with a relatively compact file format even for static definitions. > > After browsing the Maven source code it looks to me like the best way to do > this is to create a YAML plugin for Modello, then somehow glue that into > the > core Maven code. I don't have any prior experience developing either one > (though I am a developer), but as I have time I can look at it and > experiment with it. Any code tips on how I might do this as a contribution > would be welcomed, as well as any reasons why I should *not* do this or why > this would not be a desirable change. If there is enough interest and > people think it's an idea worth pursuing, I'll jump on IRC to try to get a > jump start. > > Thank you, > Nat Harward >
