You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sachin Patel <sp...@gmail.com> on 2005/09/13 16:58:39 UTC

[m1] setting system property

How can I set a system property using jelly in a parent maven.xml so 
that the project.properties can reference it? I tried the following 
setting the ant property as well as var, but neither of them were picked 
up by the project.properties.

<j:set var="os" value="${os.name}"/>
        <if test="${os.startsWith('Windows')}">
          <ant:property name="swt.fragmentid" value="win32.win32.x86"/>
          <j:set var="swt.fragmentid" value="win32.win32.x86"/>
 </if>   

Thanks.

Sachin

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


Re: [m1] setting system property

Posted by Dion Gillard <di...@gmail.com>.
${systemScope.put('swt.fragmentid', 'win32.win32.x86')}

On 9/14/05, Sachin Patel <sp...@gmail.com> wrote:
> How can I set a system property using jelly in a parent maven.xml so
> that the project.properties can reference it? I tried the following
> setting the ant property as well as var, but neither of them were picked
> up by the project.properties.
> 
> <j:set var="os" value="${os.name}"/>
>         <if test="${os.startsWith('Windows')}">
>           <ant:property name="swt.fragmentid" value="win32.win32.x86"/>
>           <j:set var="swt.fragmentid" value="win32.win32.x86"/>
>  </if>
> 
> Thanks.
> 
> Sachin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 


-- 
http://www.multitask.com.au/people/dion/
"You are going to let the fear of poverty govern your life and your
reward will be that you will eat, but you will not live." - George
Bernard Shaw

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


Re: [m1] setting system property

Posted by Sachin Patel <sp...@gmail.com>.
I also tried...

 ${systemScope.setProperty('swt.fragmentid','win32.win32.x86')}

At the top level maven.xml, this works however, I need it at a 
particular project.  A dependency location is dependent on this value 
however if I move this into that projects maven.xml the project.xml is 
parsed first and fails since the property has not been set yet.  Is 
there a way around this?

Sachin Patel wrote:
> How can I set a system property using jelly in a parent maven.xml so 
> that the project.properties can reference it? I tried the following 
> setting the ant property as well as var, but neither of them were 
> picked up by the project.properties.
>
> <j:set var="os" value="${os.name}"/>
>        <if test="${os.startsWith('Windows')}">
>          <ant:property name="swt.fragmentid" value="win32.win32.x86"/>
>          <j:set var="swt.fragmentid" value="win32.win32.x86"/>
> </if>  
> Thanks.
>
> Sachin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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