You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ekio <ek...@hotmail.com> on 2006/12/15 02:38:13 UTC

System variables don't work on ?

Hi,

Is it intended that system properties don't work with things within
<parent>?  
Let say I have the following in the POM, and I call mvn help:effective-pom
-Dsomething=-dev
It seems like ${something} is not getting filtered...

<parent>
	<groupId>group</groupId>
	<artifactId>artifact</artifactId>
	<version>1.0.0${something}</version>
</parent>

-- 
View this message in context: http://www.nabble.com/System-variables-don%27t-work-on-%3Cparent%3E--tf2824696s177.html#a7884910
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: System variables don't work on ?

Posted by Christian Goetze <ch...@sensage.com>.
Wendy Smoak wrote:

> On 12/14/06, ekio <ek...@hotmail.com> wrote:
>
>> Is it intended that system properties don't work with things within
>> <parent>?
>> Let say I have the following in the POM, and I call mvn 
>> help:effective-pom
>> -Dsomething=-dev
>> It seems like ${something} is not getting filtered...
>>
>> <parent>
>>         <groupId>group</groupId>
>>         <artifactId>artifact</artifactId>
>>         <version>1.0.0${something}</version>
>> </parent>
>
>
> I don't think this can work.  One of the first things Maven does is
> figure out the pom hierarchy, so if it can't find its parent pom, it
> stops.  Replacing expressions with values comes later.

I know we had this exchange before, at least now I see I'm not alone...

I don't think it would be a disaster if properties specified via -D 
would always be resolved. In fact, it would add consistency and also be 
in line with the tradition of honoring the most recently specified 
settings over any computed or derived settings. I'm really at a loss to 
understand the objections against this. In a similar manner, environment 
variables should be resolvable at any time also, but I can live without 
that.

On a side note, I think that any setting that has unresolved ${...} 
constructs should cause errors, and -not- as it does today create 
directories named ${xyz}, which tend to cause interesting problems when 
viewed via samba or such :)

Yes, it would be nice if I could do everything within maven, but until 
maven offers a usable C/C++ artifact type and the associated plugins, 
maven should at least assist in the task of embedding it into a larger 
scale build system instead of making it hard to do.
--
cg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: System variables don't work on ?

Posted by Wendy Smoak <ws...@gmail.com>.
On 12/14/06, ekio <ek...@hotmail.com> wrote:

> Is it intended that system properties don't work with things within
> <parent>?
> Let say I have the following in the POM, and I call mvn help:effective-pom
> -Dsomething=-dev
> It seems like ${something} is not getting filtered...
>
> <parent>
>         <groupId>group</groupId>
>         <artifactId>artifact</artifactId>
>         <version>1.0.0${something}</version>
> </parent>

I don't think this can work.  One of the first things Maven does is
figure out the pom hierarchy, so if it can't find its parent pom, it
stops.  Replacing expressions with values comes later.

Without knowing more about your project, I would suggest inheriting
from one parent pom, and using profiles to configure the different
setup you need. (Maybe development, test and live environments?)

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org