Forums Register Login

build.xml question

+Pie Number of slices to send: Send
I'm trying to decode this build file. Line 3, the project tag, sets the default attribute (am I correct in calling this an attribute?) to "build" and the basedir to "." which I am assuming is the directory from which you launch the "ant deploy" or "ant all deploy" command, or whatever else you want to do. If this is correct, then on my system, the project tag has told Ant to put stuff (or look for it?) in C:\java\build\.
(Am I on the right track so far?)

I noticed on lines 9 and 10 that the property tags for src.dir and resources.dir indicate that these directories are to be put inside the basedir, so they will be found at C:\java\src\ and C:\java\resources\ respectively. But line 11 puts the build.dir directly at build\. I am assuming that the project tag has already told Ant to put build in the basedir, therefore it doesn't have to give the fully qualified location as it did in lines 9 and 10. Is this correct? (Also, is my terminology correct? I hate calling things by the wrong name. It adds to my confusion, as well as making discussion confusing.


<?xml version="1.0"?>
< !-- This build file uses ant 1.6 -->
<project name="bee" default="build" basedir=".">

<target name="init">
<property file="${user.home}/build.properties"/>
<property name="app.name" value="bee"/>

<property name="src.dir" location="${basedir}/src"/>
<property name="resources.dir" value="${basedir}/resources"/>
<property name="build.dir" location="build"/>
<property name="classes.dir" location="${build.dir}/classes"/>

<property name="dist.dir" location="${build.dir}/dist"/>
</target>

(I didn't ask for my title without good reason.....)
[ February 27, 2006: Message edited by: Carol Murphy ]
+Pie Number of slices to send: Send
no code.......
+Pie Number of slices to send: Send
 

Originally posted by Chandra Sagi:
no code.......


I believe she is referring to this ant build file.
+Pie Number of slices to send: Send


CM: I'm trying to decode this build file. Line 3, the project tag, sets the default attribute (am I correct in calling this an attribute?)

MdQ: Yes, it is an attribute.

CM: to "build" and the basedir to "." which I am assuming is the directory from which you launch the "ant deploy" or "ant all deploy" command, or whatever else you want to do. If this is correct, then on my system, the project tag has told Ant to put stuff (or look for it?) in C:\java\build\.

MdQ: You're almost correct. You have set the default target to "build" and the basedir to whichever directory your build.xml file lives in (which is probably C:\java, the same directory that your src and resources subdirectories live in).

CM: (Am I on the right track so far?)

I noticed on lines 9 and 10 that the property tags for src.dir and resources.dir indicate that these directories are to be put inside the basedir, so they will be found at C:\java\src\ and C:\java\resources\ respectively. But line 11 puts the build.dir directly at build\. I am assuming that the project tag has already told Ant to put build in the basedir, therefore it doesn't have to give the fully qualified location as it did in lines 9 and 10. Is this correct? (Also, is my terminology correct? I hate calling things by the wrong name. It adds to my confusion, as well as making discussion confusing.

MdQ: Good observation, Carol. Actually, the ${basedir} part of lines 9 and 10 appear to be redundant for our use since src.dir and resources.dir are also subdirectories of the basedir.

p.s. by "fully qualified location" I suspect you mean "absolute path"
[ February 27, 2006: Message edited by: Marilyn de Queiroz ]
They worship nothing. They say it's because nothing lasts forever. Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1534 times.
Similar Threads
Warning Message When I Ran My ANT build.xml File
an ant question
J2EE Deployment using ANT
Build failed- ejb3.deployer not found
Ant building error
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 16:54:59.