views:

707

answers:

3

Hey! I am trying to get ant installed and actually already did following this instructions however, I get this error:

Buildfile: build.xml does not exist!
Build failed

which it says there I might get so I just tried executing the next command it says I should(since I'm under Windows it's this one):

build -Ddist.dir=<C:\Ant> dist

anyway I get "access denied" when hitting enter and I can't figure out why. I also tried

build install

and

build install-lite

but I always get that message =/ any ideas why? or what am I doing wrong?


Edit

Without the < > I get a:

'build' is not recognized as an internal or external command, operable program or batch file.


Edit2 Well, my ANT_HOME is in C:\Ant and I'm trying to run the command while placing myself on that folder, isn't that correct?

A: 

Not sure if this helps but the first question that comes to mind is "do you have appropriate permissions on the file"?

Ankur
yes I'm the administrator
Luis Armando
+1  A: 

You are taking the < and > symbols too literally. Take them off.

Kind of like C:\Users\<Your ID> the symbols are placeholders.

Are you in the right directory? Do you have something else called build in your path that may be superceeding the build you are trying to call. Can you create a file in that directory?

PROMPT> copy con foo.txt
asdf
asdf
sdf
CONTROL-D
ojblass
Then thats the real problem hidden by the pipe to what I imagine is a directory you cannot write to or an existing dir. Even as an admin I keep getting asked to allow file operations in certain parts of the file tree.
ojblass
Once you have installed the source, change into the installation directory... you sure you are in the right place?
ojblass
+1  A: 

Ant is already installed correctly if you're getting this:

Buildfile: build.xml does not exist!
Build failed

The "build" commands you tried next are only for building Ant from source. You don't need to do this, since Ant is already installed.

In general, the "'XXXX' is not recognized..." means XXXX is not a command/executable, or that it's not on your PATH.

rkb
I still think ant is bootstrapping itself and he is in the wrong directory. I kicked myself for about two hours one day with that.
ojblass
How is it bootstrapping itself? That's output from the ant executable, so maybe he's in <ant install dir>\bin. Either way, put that directory in the PATH and he's probably good to go.
rkb