|
The JNLP velocity template may contain variables for system properties and/or Maven POM properties.
However, the plugin treats Maven POM properties with higher precedence than system properties. I.e. a property defined in the <properties> section of the POM file will be used instead of a system property of the same name.
This behavior is the exact opposite of what Maven generally does: Maven treats system properties with higher precedence. So by providing a -D command line option you can overwrite a property defined in the POM file.
The plugin should be fixed to use the same precedence as Maven does.
In the class org.codehaus.mojo.webstart.generator.AbstractGenerator, method createAndPopulateContext, the following two lines should be switched:
addPropertiesToContext( System.getProperties(), context );
addPropertiesToContext( mavenProject.getProperties(), context );
On a side note, the documentation on http://mojo.codehaus.org/webstart/webstart-maven-plugin/jnlp-mojos-overview.html states that $property can be used to access properties. This is misleading since $property.<propertyname> doesn't. Instead you just write the property name: $<propertyname>. Maybe you can clarify this.
|