ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Albertus Vermeulen <Albert...@meb.co.za>
Subject RE: Including a common build file with common targets.
Date Tue, 16 Oct 2001 12:54:56 GMT
Jim,
 
Unfortunately that won't work for us. As I mentioned in my initial post:
 
"In the archives&faq I have seen recommendations to use a command of the
following syntax: 
<!DOCTYPE project [<!ENTITY common SYSTEM "  <file:common.xml>
file:./common.xml">]> 
 
Unfortunately for me I don't have a fixed location for the common.xml file.
I need to use an environment variable to specify the location (i.e.
something like:  <file:$> file:${SOME_DIR}/common.xml )and therefor the
above doesn't work for me.
 
Using <property environment="ENV"/> I can access environment properties from
a shared location but unfortunately not the common targets I need. <property
file="${ENV.DEVELOP_HOME}/tools/make/.antproperties"/> 
 
Does anyone have some ideas? I saw someone mention the Jakarta-Taglibs
project, but I could not see where any files made reference to the
common.xml file ?"
 
Do you have any ideas as to something else I could try ?
 
Albertus

-----Original Message-----
From: Jim Jackl-Mochel [mailto:jmochel@foliage.com]
Sent: 16 October 2001 02:03
To: ant-user@jakarta.apache.org
Subject: Re: Including a common build file with common targets.


We uyse a common confi.ant file that is brought in via entity reference from
a common location. I believe the method is descrivbed  in the FAQ.
 
Jim

----- Original Message ----- 
From: Albertus  <mailto:AlbertusV@meb.co.za> Vermeulen 
To: 'ant-user@jakarta.apache.org' <mailto:'ant-user@jakarta.apache.org'>  
Sent: Tuesday, October 16, 2001 7:00 AM
Subject: RE: Including a common build file with common targets.

Hi Jerry,
 
Thanks for your input, your solution would mean less lines in the build.xml
files, but doesn't really provide me with the solution I'm looking for. I'm
really looking for an equavalent of include in makefiles. In our development
environment we have seperate components that developers are working on. They
all need to make the same targets, but for their own projects. We currently
maintain these "make" targets in one file and this ensures that there is
very little clutter in the Makefiles of each developer. This can't be
changed when we move to Ant.
 
Do you or anyone else have any other suggestions I might try ? Are there any
features of Ant which I've missed in the docs that might help me out ?
 
Albertus

-----Original Message-----
From: Li, Jerry [mailto:Jerry.Li@WorldChain.com]
Sent: 15 October 2001 06:14
To: 'ant-user@jakarta.apache.org'
Subject: RE: Including a common build file with common targets.


I have put all my common targets into build_cfg.xml, and call it in my local
build.xml as the following:

<project default="compile" basedir=".">

<!-- =================================================================== -->

<!-- Initialization target -->

<!-- =================================================================== -->

<target name="init">

<tstamp/>

<property environment="ENV"/>

<property name="ANTCONF_DIR" value="${ENV.WORK_DIR}/src"/>

<property name="SRC" value="${user.dir}"/>

</target>

<!-- =================================================================== -->

<!-- Compiles the source directory -->

<!-- =================================================================== -->

<target name="compile" depends="init">

<ant antfile="${ANTCONF_DIR}/build_cfg.xml" target="compile"/>

</target>

</project>

 

Please note that I am using the ENV to specify where my build_cfg.xml.

jerry

-----Original Message-----
From: Albertus Vermeulen [mailto:AlbertusV@meb.co.za]
Sent: Monday, October 15, 2001 8:58 AM
To: 'ant-user@jakarta.apache.org'
Subject: Including a common build file with common targets.



Hi, 

I'm new to Ant and would like to move our current Makefiles to Ant. I have a
requirement to be able to include common properties and targets from a
shared file.

In the archives&faq I have seen recommendations to use a command of the
following syntax: 

<!DOCTYPE project [<!ENTITY common SYSTEM " file:./common.xml
<file:./common.xml> ">]> 

Unfortunately for me I don't have a fixed location for the common.xml file.
I need to use an environment variable to specify the location (i.e.
something like: file:$ <file:$> {SOME_DIR}/common.xml )and therefor the
above doesn't work for me.

Using <property environment="ENV"/> I can access environment properties from
a shared location but unfortunately not the common targets I need. 

<property file="${ENV.DEVELOP_HOME}/tools/make/.antproperties"/> 

Does anyone have some ideas? I saw someone mention the Jakarta-Taglibs
project, but I could not see where any files made reference to the
common.xml file ?

Any help would be greatly appreciated. 

Albertus 


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

Note: The information contained in this message may be privileged and
confidential and protected from disclosure. If the reader of this message is
not the intended recipient, or an employee or agent responsible for
delivering this message to the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and deleting it from
your computer. Thank you. 

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


Mime
View raw message