I see ${pom.getPluginContext('plugin-name').getVariable('variable')} used
frequently. However, I also see that Project.getPluginContext is
deprecated. I believe that the pom bean is a Project, right? If so, what
should be used in place of pom.getPluginContext? The javadoc for the method
says to use the tag instead, but doesn't say which tag. Further, there are
cases where using a tag is not possible because an expression is required.
Anybody know what should be done or should we simply continue using
pom.getPluginContext?
> -----Original Message-----
> From: Eric Giguere [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 01, 2004 2:03 PM
> To: Maven Users List
> Subject: Re: Jelly variables
>
>
> Hi Jon
>
> I'll give a try to explain the behavior.
>
> Plugins.. When executing, all of them have a context that is built up
> live on a specific project. For every property or variable that a plugin
> declares, you must call a method of the pom bean to get the actual value
> for the property (or variable) that the plugin uses while executing. My
> guess with maven.final.name, since its a project variable, is set to
> snapshotSignature only in the plugin's context. So its never really set
> back to the original value, it just didn't ever change, in your
> project's context anyway.
>
> Did you try using this snapshotSignature value directly in your project?
> If its empty, ask the plugin for its value, maybe it'll be available in
> your post goal using this call:
> ${pom.getPluginContext('plugin-name').getVariable('variable')
>
> just guessing here...
>
> Hope it helps
> Eric.
>
>
> STRAYER, JON (SBCSI) wrote:
>
> >I have a deploy goal in my maven.xml that uses the artifact
> plugin. When I
> >use it to deploy the results of a jar:jar everything works fine.
> When I use
> >it to deploy a snapshot jar it tries to deploy the normal jar.
> >
> >My goal is here:
> > <goal name="deploy">
> > <artifact:deploy
> > artifact="${maven.build.dir}/${maven.final.name}.jar"
> > type="jar"
> > project="${pom}"
> > />
> > </goal>
> >
> >As you can see, I'm using maven.final.name for the name of the jar. The
> >jar:snapshot goal sets this varaiable to ${snapshotSignature}.
> But by the
> >time my postGoal executes it's back to the name of the normal jar.
> >
> >My questions are:
> >1. Is there a variable that will be available during the post goal that
> >contains the name of the jar?
> >2. What is setting maven.final.name back to the default value?
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]