You can use the <maven:property> tag. Check other plugins to see how to use it.
-Vincent > -----Original Message----- > From: Haryon [mailto:[EMAIL PROTECTED] > 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] _________________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais ! Yahoo! Mail : http://fr.mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
