Mitigating verbosity of Maven pom.xml files (or: a critique of Maven by a fan)?

Maven configuration is certainly verbose, Maven 3 aims to address this amongst other things (see these videos for some idea), and there is a plugin for Maven 2 that allows for configuration to be defined in YAML. There's also an experimental "terse" branch that supports attributes, reducing the size of the configuration somewhat.

Maven configuration is certainly verbose, Maven 3 aims to address this amongst other things (see these videos for some idea), and there is a plugin for Maven 2 that allows for configuration to be defined in YAML. There's also an experimental "terse" branch that supports attributes, reducing the size of the configuration somewhat. For example: groupId: org.twdata.

Maven artifactId: maven-yamlpom-plugin version: 1.0-SNAPSHOT packaging: maven-plugin name: YAML POM Plugin dependencies: - { groupId: org.apache. Maven, artifactId: maven-plugin-api, version: 2.0 } - { groupId: SnakeYAML, artifactId: SnakeYAML, version: 1.1 } - { groupId: commons-io, artifactId: commons-io, version: 1.4 } - { groupId: dom4j, artifactId: dom4j, version: 1.4 } - { groupId: junit, artifactId: junit, version: 3.8.1, scope: test } - { groupId: xmlunit, artifactId: xmlunit, version: 1.2, scope: test } build: plugins: - artifactId: maven-compiler-plugin configuration: source: 1.5 target: 1.5 repositories: - id: snakeyaml name: SnakeYAML repository url: http://snakeyamlrepo.appspot.com/repository With Maven 2, you can mitigate the verbosity by defining common configuration in a parent project, in the examples you cite, the dependencies can all be defined in the parent, or in the dependencyManagement section of a parent so a child can declare the junit dependency as junit junit which is a bit of an improvement. The plugins can both be declared in the parent and need not be defined in your child.

I completely agree with you that some parts of the pom. Xml may be condensed, in particular the part. I really like the Ivy way of declaring dependencies : ... I've seen a blog post that proposed an experimental tool to create the dependencies as Ivy do.

However, I've never tried it.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions