Well would it help if I pointed out that these are snippets of the
pom.xml file (or it's parents)... specifically, they're the <version>
tags from <plugin> definitions!

(It's the versions-maven-plugin) and I'm trying to ensure that
<version>${plugin.version.install}</version> evaluates correctly... of
course somebody might have forced the plugin version they are using to
be the same as either their project version or their parent's project
version...

Now a second question is this....

if I have a pluginManagement section in the parent pom that specifies
a version of the plugin using a property *that is defined with
different values in both the parent and child projects*, and the
parent and child are not in the same reactor... what version should
the child project be using?

Is it:

A. The version defined by the property in the parent pom
B. The version defined by the property in the child pom.

My feeling is that it should be A, but it's probably B!

I'm leaving it up to the enforcer to warn people of these issues, I
just whan to know what version is effectively defined in the child
pom.

-Stephen

2009/1/22 Brett Porter <br...@apache.org>:
> You're probably better getting the PluginParameterExpressionEvaluator
> component and using that (it's not the same as the interpolator in the POM
> unfortunately, but probably what you are looking for and more accessible).
>
> On 22/01/2009, at 6:55 AM, Stephen Connolly wrote:
>
>> I'm working on a mojo that needs to filter property and maven model
>> property-equivalents (i.e. ${project.parent.groupId}).
>>
>> What is the preferred way to get these values?
>>
>> My current theory is that I should use
>>
>>
>> http://maven.apache.org/ref/current/maven-project/xref/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.html
>>
>> But I'm somewhat unsure... and given that that refers to a Model, and not
>> an
>> arbitrary string....
>>
>> -Stephen
>
> --
> Brett Porter
> br...@apache.org
> http://blogs.exist.com/bporter/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to