News: Blog post: Writing your Maven 3 pom files in Groovy
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. You can learn more in the following blog entry: "Writing your pom files in Groovy - a sneek preview of Maven 3's polyglot features".
- Posted by: John Smart
- Posted on: October 27 2009 02:30 EDT
- Useless. by Alex Besogonov on October 27 2009 08:44 EDT
- Re: Blog post: Writing your Maven 3 pom files in Groovy by Kristoffer Sj??Gren on November 02 2009 10:36 EST
So, you've replaced a declarative, parsable format with imperative, Turing-complete code which can't be parsed or modified by an IDE. And all this for... nothing? Congratulations! PS: sometimes anti-XML fervor is just as bad as earlier XML fervor.
PS: sometimes anti-XML fervor is just as bad as earlier XML fervor.Well said, and couldn't agree more. Early 2000 was an era where we are putting every thing in XML, now even for things that make sense to be in XML are pushing back to code. It reminds me what a shallow community (IT) we belong to.
+1 Although accessing or updating the POM programmatically is good, having the ability to externally define the POM using any language is a slippery slope. Better to stick with universal XML. Or even a DSL. The important thing is it should be universal. I don't want to have to learn a new language just so I can understand someone else's POM.
Maybe Maven 3 is just jealous of Gradle, the Groovy-based build DSL. Gradle's founder, Hans Dockter, gave a great presentation on Gradle at SpringOne2GX. Before anyone starts to use Groovy to drive Maven, they should first take a look at Gradle. --Matt The Software Grove
Umm no, but nice plug.
Hi I have looked for a feature where i can define some kind of template or profile centrally and inherit that for each "component". A component for us, has a special meaning in maven. For example, a general definition of a component is a maven pom type project and may contain the following projects: * EAR (depends on all other projects within this component) * IF (no dependencies) * EJB (ejb type project that depend on interface project) * WAR (war type project that depend on interface AND ejb project) * RAR (rar type project that depend on the interface project) There are other type of projects that are part of this definition but i have left them out here for brevity. We also have a couple of profiles and plugins that we need for each and every component. Together, this make our pom file very verbose. Our system consist of quite many components (~35-45, each with maybe 5-6 projects) and so we repeat ourselves alot and it's hard to maintain consistency throughout the system. We did construct such a building system in Ant previously, and I havent found any similar feature in Maven or if it is even possible to do with a plugin? Cheers, -Kristoffer