ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: 'basedir' property
Date Mon, 21 Oct 2002 20:49:56 GMT
No, and No!

basedir should most of the time be omitted, in which case it defaults to the
parent directory of the build.xml file. If your build.xml is at the root of
your project (most people do that), don't define it at all, or define it to
"." (not the current directory, but the directory in which build.xml is).

If not set in <project>, basedir is set by Ant, so cannot be overridden
later. --DD

-----Original Message-----
From: Saripalli, Raju [mailto:Raju.Saripalli@jenzabar.net] 
Sent: Monday, October 21, 2002 3:42 PM
To: 'ant-user@jakarta.apache.org'
Subject: 'basedir' property

Hi,

Normally, the signature for the start of an ant
build file is in the following form:

<project name="projA" default="compile" basedir="D:/source">

Can 'basedir' be set and/or reset elsewhere in the ant file ?

For example, I would like to abstract all hard-coded directory
information into a seperate XML file that gets included as part
of the build process. This way, the "core" buidl file does not change,
only a few properties in a XML file.

Can 'basedir' be set 

(A) before the <project> element as below :
Can it be set in "user-build.xml" ?


<?xml version="1.0" encoding="UTF-8"?>

<!-- user-build.xml has the property settings -->
<!DOCTYPE project [
    <!ENTITY user SYSTEM "user-build.xml">
    <!ENTITY common SYSTEM "common-build.xml">
]>

<project name="projA" default="compile" basedir="D:/source">

....
....

</project>


(B) after the <project> element ?

<project name="projA" default="compile">

<!-- set basedir after start of project element -->
<property name="basedir" value="D:/source"/>
....
....

</project>


Thanks,

Raju

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


Mime
View raw message