You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nathan Coast <na...@shadowsolutions.co.uk> on 2003/04/25 06:10:14 UTC
plugin properties
Hi,
I'm writing a plugin that delegates some work to the war plugin. Is
there any way to access the properties defined in the
war/plugin.properties ?
I want the default values of some of the properties used in my plugin to
be the same as the values for the war properties. So, if the user
overrides the property in the war plugin, they don't have to modify some
other property for my plugin.
e.g.
war/plugin.properties
maven.war.build.dir=${maven.build.dir}
my-plugin/plugin.properties
maven.myplugin.war.dir=${maven.war.build.dir}
It seems slightly unintuitive that I have access to properties declared
within the war plugin.xml e.g. ${maven.war.final.name} but not the props
from properties.xml e.g. ${maven.war.build.dir}. or is there a good
design reason for this?
cheers
Nathan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: plugin properties
Posted by Ben Walding <de...@walding.com>.
You use the following construct:
<j:set
var="cloverReportDirectory"
value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}/clover"/>
Which grabs the maven.docs.dest property from the xdoc plugin
You will need to do a few if statements to handle your logic.
Nathan Coast wrote:
> Hi,
>
> I'm writing a plugin that delegates some work to the war plugin. Is
> there any way to access the properties defined in the
> war/plugin.properties ?
>
> I want the default values of some of the properties used in my plugin
> to be the same as the values for the war properties. So, if the user
> overrides the property in the war plugin, they don't have to modify
> some other property for my plugin.
>
> e.g.
>
> war/plugin.properties
> maven.war.build.dir=${maven.build.dir}
>
> my-plugin/plugin.properties
> maven.myplugin.war.dir=${maven.war.build.dir}
>
> It seems slightly unintuitive that I have access to properties
> declared within the war plugin.xml e.g. ${maven.war.final.name} but
> not the props from properties.xml e.g. ${maven.war.build.dir}. or is
> there a good design reason for this?
>
> cheers
> Nathan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org