You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Vincent Massol <vm...@pivolis.com> on 2005/04/02 11:45:42 UTC

RE: Handling default property values

You can use the <maven:property> tag. Check other plugins to see how to use
it.

-Vincent

> -----Original Message-----
> From: Haryon [mailto:ha.ryon@gmail.com]
> Sent: samedi 2 avril 2005 10:18
> To: Maven List
> Subject: Q : Handling default property values
> 
> I am creating a plugin, I would like to use some properties pointing
> to some directories (just like maven.build.dir, or maven.src.dir). I
> would like those directories to have a default, but if the user wants
> to override them, he can.
> 
> I have done a prepare-src goal which is prereq of everything that
> needs those properties (it also creates the directories if not
> existing). It looks like this :
> <goal ....>
>    <j:set var="maven.myplugin.import" value="${maven.build.dir}/import" />
> </goal>
> 
> This doesn't allow for user override. I think I'm looking for something
> like :
> <if not set maven.myplugin.import>
>   <j:set var="maven.myplugin.import" value="${maven.build.dir}/import" />
> </if>
> I'll be adding something like <if test="${maven.myplugin.import ==
> null}">, but I was wondering whether there where a much better way of
> declaring properties required by a plugin and their default value ?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


_________________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
Yahoo! Mail : http://fr.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org