Ok, a bit more clarity - the child build that fails has a dependency on
another child which has a dependency on something with ${foo.version}.
Once that dependency is attempted to be resolved transitively, the property
is NOT expanded to the -D value, but simply whatever was set in the top
level pom.
On Mon, Jan 23, 2012 at 6:12 PM, Maven User wrote:
> Hi all -
>
> I've got a bit of a head scratcher here and while I know this isn't the
> BEST way to solve things, it seems to be how it is getting done.
>
> We have a parent pom that has a list of a few child modules. In the
> parent pom, we have a property that defines what version of a dependency we
> should be resolving.
>
> When building on the command line, sometimes it's easier just to do a
> -Dfoo.version=2.1.2 for example to try out a different release of something.
>
> Three of the five child poms get it correct. The fourth keeps defaulting
> to whatever is defined in the top level pom (and the fifth we never get to
> see build).
>
> I've looked at the GAV for the child pom and it's healthy (pointing to the
> correct pom and everything).
>
> What are we doing wrong? This feels like a bug but I couldn't find one
> documented like this...
>