Skip to content

Injecting maven configurations by composition rather than inheritance

Notifications You must be signed in to change notification settings

maoo/maven-tiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Maven Tiles

Note! This project is not actively maintained since May 2013; please check maven-tiles fork from repaint-io

WHAT IS MAVEN TILES

Maven Tiles is a Maven Plugin (tiles-maven-plugin) that tries to bring a new level of modularity to Maven, allowing to include multiple pom snippets into your project and overcoming the bottleneck of having the project's parent as single point of inheritance.

Read more:

WHAT IS A MAVEN TILE

Tiles are plain Maven pom artifacts which contain parts of a Maven POM; every tile can contain

  • build data, for example the license tags that a company wants to report on all their artifacts
  • build aspects, for example the runnability of a project could be defined into a jetty-maven-plugin-tile

FEATURE DRIVEN TILES

The most powerful advantage comes with feature-driven tiles; if we need to perform a remote deployment using cargo, the first action is to google for "cargo maven", find some pom.xml snippets, copy/paste into your build, change some properties and give it a try. Maven Tiles basically allows you to reuse this copy/paste and reference it across an infinite number of Maven builds; no copy/paste guaranteed!

SEPARATION OF CONCERNS

Maven Tiles delivers an additional Separation of Concern into the Software Automation market: software products (e.g. RedHat JBoss) could deliver - along with the artifacts - the build behaviors (e.g. cargo-maven-plugin + configuration) that proved to be stable and consistent; developers will be able to browse Maven repositories and find the tiles they're interested to embed in their builds.

ADDITIONAL NOTES

Sometime tiles can be counter-productive to use; for example the maven-resources-tile contains the build resource configuration, which are commonly different for each project; moving it to another file just makes it more difficult for a dev to read it.

A great tool for supporting Maven POM development is the maven-help-plugin; before running a tile-aggregated build, just launch mvn help:effective-pom and analyse the final POM file that gets executed

WHAT IS WORKING

WHAT NEEDS TO BE TESTED

  • Maven properties defined within a tile should be visible from others
  • What happens when 2 tiles define the same configuration?
  • What happens when 2 tiles define 2 different executions of the same plugin?

CURRENT ISSUES

  • Plugin versions cannot be parametrized(!) - see maven-eclipse-tile
  • Test Coverage

About

Injecting maven configurations by composition rather than inheritance

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages