I figured this out.

Add this field to your mojo:

    /**
     * The maven project.
     *
     * @parameter expression="${project}"
     * @required
     * @readonly
     */
    private MavenProject project;

Then in your code:

            project.getProperties().put("myKey", myValue);

And finally in the pom:

        ${myKey}

J

On 8-Feb-06, at 4:06 PM, Julian Wood wrote:

I have a plugin which does some work and generates a value. How can I access that value in the POM?

I've tried adding the value into the Map retrieved from getPluginContext(), and using System.putProperty, but in neither case can I access the property in the POM, using something like $ {maven.myplugin.value}.

The plugin is bound and generates it's value correctly, btw.

What's the procedure?

Thanks,

J
--
Julian Wood <[EMAIL PROTECTED]>

Programmer/Analyst
University of Calgary

http://commons.ucalgary.ca


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Julian Wood <[EMAIL PROTECTED]>

Programmer/Analyst
University of Calgary

http://commons.ucalgary.ca


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to