mjn mjn - 1 month ago 16
Java Question

How can I use Maven project properties in izpack-maven-plugin install.xml?

Following http://maksim.sorokin.dk/it/2010/06/10/izpack-with-maven/ I wrote a Maven POM which creates an IzPack installer, using the izpack-maven-plugin.

However I found now way to pass plugin configuration parameters such as the artifact name and version to the install.xml file. Is there a way to pass these values from the POM to the plugin?


In the src/main/resources/install.xml:

<installation version="1.0">

How can I use the Maven properties, project.name and project.version here, so it looks like:

<installation version="1.0">


Your maven-resources-plugin invocation can filter the resources involved using project properties defined in the pom itself, or better using a properties file. maven-resources-plugin usage

     <filter> [a filter property or properties file] </filter>

A filter property has this syntax in the pom:


meaning "your.name" property has "world" value.

If you specify a properties file in src/main/resources:


and then indicate the filename in the <filter> element in the pom.