You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Lenhof,Danny" <Da...@gartner.com> on 2008/03/13 18:42:21 UTC

setting properties

Newbie question:

I created an ant wrapper that calls the build.xml. The issue I have is
that the build.xml call a user.properties and overrides the values I set
for the environment.

Each developer has everything mapped to a d: drive, i.e. ant, weblogic,
etc.  I want it to use my values for my build server. 

Any help is greatly appreciated.

dll


This e-mail message, including any attachments, is for the sole use of the person to whom it has been sent, and may contain information that is confidential or legally protected. If you are not the intended recipient or have received this message in error, you are not authorized to copy, distribute, or otherwise use this message or its attachments. Please notify the sender immediately by return e-mail and permanently delete this message and any attachments.  Gartner makes no warranty that this e-mail is error or virus free. 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: setting properties

Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
Given that the properties in ant are immutable, you should have the
defaults set in a properties file and override them in your environment.
This is opposite of what you describe, where you are attempting to set
defaults in your environment and override them with a properties file.

-Rob Anderson

-----Original Message-----
From: Lenhof,Danny [mailto:Danny.Lenhof@gartner.com] 
Sent: Thursday, March 13, 2008 10:42 AM
To: Ant Users List
Subject: setting properties

Newbie question:

I created an ant wrapper that calls the build.xml. The issue I have is
that the build.xml call a user.properties and overrides the values I set
for the environment.

Each developer has everything mapped to a d: drive, i.e. ant, weblogic,
etc.  I want it to use my values for my build server. 

Any help is greatly appreciated.

dll


This e-mail message, including any attachments, is for the sole use of
the person to whom it has been sent, and may contain information that is
confidential or legally protected. If you are not the intended recipient
or have received this message in error, you are not authorized to copy,
distribute, or otherwise use this message or its attachments. Please
notify the sender immediately by return e-mail and permanently delete
this message and any attachments.  Gartner makes no warranty that this
e-mail is error or virus free. 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: setting properties

Posted by "Lenhof,Danny" <Da...@gartner.com>.
Thanks for the replies. This is what I did to get it to work. This is
not the best way I am sure, but it works in a pinch. 

 

        <ant
antfile="${soa.EBSToAthenaWS.location}/${SOA.EBSToAthenaWS.build.file}"

                 target="archive"

                 inheritAll="false" >

                 <property name="env" value="${env}"/>


                                 <property
file="E:/SOA_Build_Area/BuildScripts/EBSToAthenaWS/build.properties"/>


         </ant>

 

-----Original Message-----
From: Rebhan, Gilbert [mailto:Gilbert.Rebhan@huk-coburg.de] 
Sent: Friday, March 14, 2008 4:17 AM
To: Ant Users List
Subject: RE: setting properties

 

 

-----Original Message-----

From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de] 

Sent: Friday, March 14, 2008 8:36 AM

To: user@ant.apache.org

Subject: AW: setting properties

 

/*

> I created an ant wrapper that calls the build.xml. The issue I have is

> that the build.xml call a user.properties and overrides the 

> values I set for the environment.

 

Properties are immutable so once set further overridings are ignored.

Properties which are passed from the command line with -D are set first.

 

> Each developer has everything mapped to a d: drive, i.e. ant,

weblogic,

> etc.  I want it to use my values for my build server. 

*/

 

i guess he asks for user specific propertyfiles.

 

maybe like that =

 

use the ant builtin properties ${user.home} or ${user.name}

 

${user.home}, put the user.properties in home directory

<property file="${user.home}/user.properties"/>

 

${user.name}, create a propertyfile for every user

<property file="${user.name}.properties"/>

 

this will load the user specific propertyfiles

 

Regards, Gilbert

 

 

 

---------------------------------------------------------------------

To unsubscribe, e-mail: user-unsubscribe@ant.apache.org

For additional commands, e-mail: user-help@ant.apache.org

 


This e-mail message, including any attachments, is for the sole use of the person to whom it has been sent, and may contain information that is confidential or legally protected. If you are not the intended recipient or have received this message in error, you are not authorized to copy, distribute, or otherwise use this message or its attachments. Please notify the sender immediately by return e-mail and permanently delete this message and any attachments.  Gartner makes no warranty that this e-mail is error or virus free. 


RE: setting properties

Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
 
-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de] 
Sent: Friday, March 14, 2008 8:36 AM
To: user@ant.apache.org
Subject: AW: setting properties

/*
> I created an ant wrapper that calls the build.xml. The issue I have is
> that the build.xml call a user.properties and overrides the 
> values I set for the environment.

Properties are immutable so once set further overridings are ignored.
Properties which are passed from the command line with -D are set first.

> Each developer has everything mapped to a d: drive, i.e. ant,
weblogic,
> etc.  I want it to use my values for my build server. 
*/

i guess he asks for user specific propertyfiles.

maybe like that =

use the ant builtin properties ${user.home} or ${user.name}

${user.home}, put the user.properties in home directory
<property file="${user.home}/user.properties"/>

${user.name}, create a propertyfile for every user
<property file="${user.name}.properties"/>

this will load the user specific propertyfiles

Regards, Gilbert



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


AW: setting properties

Posted by Ja...@rzf.fin-nrw.de.
> I created an ant wrapper that calls the build.xml. The issue I have is
> that the build.xml call a user.properties and overrides the 
> values I set for the environment.

Properties are immutable so once set further overridings are ignored.
Properties which are passed from the command line with -D are set first.


> Each developer has everything mapped to a d: drive, i.e. ant,
weblogic,
> etc.  I want it to use my values for my build server. 

What is the question?


Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org