If you simply execute ant, it looks for a file called build.xml
ant -buildfile simple.xml will call that file (which you correctly 
deduced)

Now, when you do that, the new error message says it can't find the 
_target_ build.xml so in your [build | simple].xml  It's now finding 
the file fine, but the target is missing.  Your header looks something 
like this, no?

<project name="myproject" default="build.xml" basedir=".">

Do you have a line in there that looks like this?
<target name="build.xml" >
...
</target>

If not, that's your problem.  Personally, I'd drop the .xml part (to 
reduce confusion) but do as you please.

If you do have that target there, then that's interesting.  Try ant 
-projecthelp [-buildfile simple.xml]  See what targets it finds.  If 
that doesn't solve your problem, post the output of that and your XML 
file.

/bill


-----Original Message-----
From: bernd.gruendling [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 03, 2001 6:34 AM
To: ant-user; bernd.gruendling
Subject: Target 'build.xml' does not exist...


Hi,

I'm trying to set up my first ANT project. I started with this 
four-liner in a file called "simple.xml":

   <project default="whatever">
      <target name="whatever">
      </target>
   </project>

The currenct directory contained nothing but this. My first attempt was

   [d:\temp\anttest]ant
   Buildfile: build.xml does not exist!
   Build failed.

Well. I understand that: build.xml is the default name for the build 
file. Lets try

   [d:\temp\anttest]ant -buildfile simple.xml
   Buildfile: build.xml does not exist!
   Build failed.

Why does it insist on build.xml?


Lets rename simple.xml to build.xml:

   [d:\temp\anttest]ren simple.xml build.xml
   [d:\temp\anttest]ant
   Buildfile: build.xml

   BUILD FAILED

   Target 'build.xml' does not exist in this project.

Why does ANT confuse the build file and the target?

   [d:\temp\anttest]ant -buildfile build.xml
   Buildfile: build.xml

   BUILD FAILED

   Target 'build.xml' does not exist in this project.

Hm.

   [d:\temp\anttest]ant -help
   Buildfile: build.xml

   BUILD FAILED

   Target 'build.xml' does not exist in this project.


Time to go home.

What did I wrong?




Regards,
Bernd Gründling
_______________________________________________________________________
Bernd Gruendling                            Custom Software Development
Systemberatung Softwaredesign                    for Mac OS and Windows

Wendenstrasse 16                                Phone: +49 5363 97676-0
38448 Wolfsburg, Germany                    Facsimile: +49 5363 97676-9

Reply via email to