Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 56690 invoked from network); 14 Feb 2001 19:44:01 -0000 Received: from unknown (HELO ?195.115.98.1?) (195.115.98.1) by h31.sny.collab.net with SMTP; 14 Feb 2001 19:44:01 -0000 Received: from maileu.imediation.com by [195.115.98.1] via smtpd (for h31.sny.collab.net [64.208.42.41]) with SMTP; 14 Feb 2001 20:43:46 UT Received: (private information removed) Message-ID: <9B3E950CB293D411ADF4009027B0A4D2975CFB@PARSV011> From: Stephane Bailliez To: ant-user@jakarta.apache.org Subject: RE: setting properties on a per user, per project basis Date: Wed, 14 Feb 2001 19:49:03 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C096BF.2EB38210" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C096BF.2EB38210 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Yes, you can specify a file properties. For example: ... // default global properties The setted properties will be the first one found using the following = order: 1) command line properties 2) user properties in file 3) global default properties Hope it helps. --=20 St=E9phane Bailliez=20 Software Engineer, Paris - France=20 iMediation - http://www.imediation.com=20 Disclaimer: All the opinions expressed above are mine and not those = from my company.=20 > -----Original Message----- > From: Phillip Lord [mailto:p.lord@hgmp.mrc.ac.uk] > Sent: Wednesday, February 14, 2001 4:45 PM > To: ant-user@jakarta.apache.org > Subject: setting properties on a per user, per project basis >=20 >=20 >=20 >=20 >=20 > Apologies for a second post in two days! >=20 > =20 > Is it possible to set properties on a per user basis and=20 > per project basis? >=20 > I've now got ant up and running quite nicely, and have=20 > written my first build file (which took me about 1/5 the time it took > me to get my first Makefile written, which is I think a positive > thing!).=20 >=20 > I want to write a buildfile which is nice and generic, so=20 > at the beginning I have set up the following... >=20 >=20 > > > =20 > > > =20 > > >=20 > > >=20 > > >=20 > =20 > This is fine, and will work as a build for my > distributable. The problem is that it does not really suit my file > system. So I have over-ridden these properties on the command > line. Currently I am launching ant with.... >=20 >=20 > ant -emacs -Dbuild.compiler=3Djikes =20 > -Dbuild.compiler.emacs=3Dtrue -Dclasses=3D~/include/java =20 > -Dext=3D~/include/ext -Ddist=3D~/scratch >=20 > which is a bit of a mouthful, and I can tell that its only=20 > going to get longer.=20 >=20 > The approach that I have taken to get around this is to > stick this... > =20 > > =20 > at the bottom of my file, which works nicely when > launching the build from within emacs. But I don't really want this = to > go in the buildfile I ship with my distributable. >=20 > So what I would like is the ability to specify properties=20 > in some file on a per project basis, where I can stick all of this > stuff. Preferably I would like to be able to still override these > properties with command line parameters (so I can switch between > jikes, and javac easily for instance).=20 >=20 > Is it possible to do this at the moment? >=20 > Phil >=20 ------_=_NextPart_001_01C096BF.2EB38210 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: setting properties on a per user, per project basis

Yes, you can specify a file properties. For = example:

<project name=3D"myproject">
        <property = file=3D"${user.home}/user.properties"/>
        ...
        // = default global properties
</project>

The setted properties will be the first one found = using the following order:

1) command line properties
2) user properties in file
3) global default properties

Hope it helps.

--
 St=E9phane Bailliez
 Software Engineer, Paris - France
 iMediation - http://www.imediation.com
 Disclaimer: All the opinions expressed above = are mine and not those from my company.



> -----Original Message-----
> From: Phillip Lord [mailto:p.lord@hgmp.mrc.ac.uk]<= /FONT>
> Sent: Wednesday, February 14, 2001 4:45 = PM
> To: ant-user@jakarta.apache.org
> Subject: setting properties on a per user, per = project basis
>
>
>
>
>
>        = Apologies for a second post in two days!
>
>        =
>        Is it = possible to set properties on a per user basis and
> per project basis?
>
>        I've = now got ant up and running quite nicely, and have
> written my first build file (which took me = about 1/5 the time it took
> me to get my first Makefile written, which is I = think a positive
> thing!).
>
>        I = want to write a buildfile which is nice and generic, so
> at the beginning I have set up the = following...
>
>
>   <!-- Where to find the route = directory of the source hierarchy -->
>   <property name=3D"src" = value=3D"../../../.."/>
>  
>   <!-- Where should the class = files that are produced by put -->
>   <property = name=3D"classes" value=3D"${src}"/>
>  
>   <!-- Where should the = distributable jar files be generated -->
>   <property = name=3D"dist" value=3D"${src}"/>
>
>   <!-- Where are the additional = jar files required for the
> compilation -->
>   <property name=3D"ext" = value=3D"${classes}/ext"/>
>
>   <!-- Compile with debug on or = not -->
>   <property = name=3D"debug" value=3D"off"/>
>
>          = ;  
>         = This is fine, and will work as a build for my
> distributable. The problem is that it does not = really suit my file
> system. So I have over-ridden these properties = on the command
> line. Currently I am launching ant = with....
>
>
> ant -emacs  -Dbuild.compiler=3Djikes  =
> -Dbuild.compiler.emacs=3Dtrue  = -Dclasses=3D~/include/java 
> -Dext=3D~/include/ext  = -Ddist=3D~/scratch
>
>         = which is a bit of a mouthful, and I can tell that its only
> going to get longer.
>
>         = The approach that I have taken to get around this is to
> stick this...
>     
> <!--
>  In this section I am defining the local = variables that I use to
>  customise the build process for my own = nefarious ends.
>
>  Local Variables: ***
>  compile-command: ("ant -emacs = \
>  -Dbuild.compiler=3Djikes \
>  -Dbuild.compiler.emacs=3Dtrue \
>  -Dclasses=3D~/include/java \
>  -Dext=3D~/include/ext \
>  -Ddist=3D~/scratch" ) ***
>  End: ***
>  -->

>         = at the bottom of my file, which works nicely when
> launching the build from within emacs. But I = don't really want this to
> go in the buildfile I ship with my = distributable.
>
>         = So what I would like is the ability to specify properties
> in some file on a per project basis, where I = can stick all of this
> stuff. Preferably I would like to be able to = still override these
> properties with command line parameters (so I = can switch between
> jikes, and javac easily for instance).
>
>         = Is it possible to do this at the moment?
>
>         = Phil
>

------_=_NextPart_001_01C096BF.2EB38210--