Le mercredi 11 mars 2009 19:24:20, Nord, James a écrit :
> The following will set a variable I_WAS_HERE to "true".
Thanks, that's what I was looking for.
Simple :)
Paul
> /**
> * Goal which stores some properties
> *
> * @goal getProperty
> * @phase validate
> */
> The following gets the maven version and stores it as the maven.version
> property.
>
> public class MavenPropertiesMojo extends AbstractMojo {
>
>
> /**
> * The Maven project.
> *
> * @parameter expression="${project}"
> * @required
> * @readonly
> */
> private MavenProject project;
>
> /**
> * @component
> */
> private RuntimeInformation runtime;
>
>
> public void execute() throws MojoExecutionException {
>
> project.getProperties().put("I_WAS_HERE", "true");
> }
>
> }