I think I haven�t understood you right...
Whith that approach you can specify global settings. The buildfiles load
several propertyfiles.
Because of the immutability of ant properties you can do something like:
<property file="build-${user.name}.properties"/> user and project
specific settings
<property file="build.properties"/> project specific
settings
<property file="${user.home}/ant.properties"/> user settings
<property file="${companyDir}/ant.properties"/> company settings
If the company defines javac.debug=false you can change that value on three
different places.
-----
Alternatively you can use XML-Entity includes for common things.
build.xml
------------------------------------------------
<!DOCTYPE project [
<!ENTITY incl1 SYSTEM "file:build1.inc">
]>
<project default="main">
&incl1;
...
</project>
build1.inc
------------------------------------------------
<property name="text" value="hello world"/>
<target name="compile">
<javac ... />
</target>
> -----Urspr�ngliche Nachricht-----
> Von: Schaaf, A.P. (Arjan) [mailto:[EMAIL PROTECTED]
> Gesendet am: Dienstag, 17. Juni 2003 13:20
> An: 'Ant Users List'
> Betreff: RE: Default settings for the javac task across multiple build
> fil es
>
> That's not exactly what I want. With this approach if you
> need to add an
> extra option you would have to go through all the build files
> to add the
> extra option. What I'm trying to accomplish is to create a
> global set of
> options for the javac task and only add reference to that set
> when I use the
> javac task in a build file.
>
> Arjan
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 17, 2003 12:53 PM
> To: [EMAIL PROTECTED]
> Subject: AW: Default settings for the javac task across
> multiple build fil
> es
>
>
> Use a property file.
> E.g. %user_dir%\ant.properties
> javac.debug=true
> javac.deprecation=false
>
> and use that in your buildfiles
> <property file="${user.dir}/ant.properties"/>
> <javac debug="${javac.debug}".../>
>
>
> Jan
>
> > -----Urspr�ngliche Nachricht-----
> > Von: Schaaf, A.P. (Arjan) [mailto:[EMAIL PROTECTED]
> > Gesendet am: Dienstag, 17. Juni 2003 12:49
> > An: '[EMAIL PROTECTED]'
> > Betreff: Default settings for the javac task across multiple
> > build files
> >
> > Hi there,
> >
> > I'm trying to get something sorted out, but I can't find a
> solution. I
> > have multiple ant build files which all have a compile target using
> > the <javac> task. What I would like, is to have the same settings
> > (suchs as the
> > deprecation and debug parameters) for the <javac> task
> > without having to
> > specify each parameter in each build file over and over
> again. Is this
> > possible?
> >
> > Thanks in advance.
> > Arjan
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>