aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Buildfile:build.xml does not exist! Build failed. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Buildfile:build.xml does not exist! Build failed." Watch "Buildfile:build.xml does not exist! Build failed." New topic
Author

Buildfile:build.xml does not exist! Build failed.

Ranjeet Deshmukh
Ranch Hand

Joined: Jan 18, 2013
Posts: 32

Hi All,

I'm working on windows box and running following commands in Cygwin to run build.xml file.


export TS_HOME=/cygdrive/c/tcktest/TCK/TCK/jmstck
export ANT_HOME=$TS_HOME/tools/ant
export TS_ANT_JAR=$TS_HOME/lib/ant_sun.jar
export HARNESS_JARS=$TS_HOME/lib/tsharness.jar
export CLASSPATH=$TS_ANT_JAR:$HARNESS_JARS
export JAVACMD=
export TIBEMS_ROOT=/cygdrive/c/EMS630/Home/ems/6.3/
export PATH=/cygdrive/c/JAVA/jdk/bin:$PATH
export JAVA_HOME=/cygdrive/c/JAVA/jdk

after running these commands I tried "echo" to ensure path is correct or not. It's working fine but when I execute command :

"$ $ANT_HOME/bin/ant -buildfile $TS_HOME/bin/build.xml -listener com.sun.ant.TSBuildListener -logger com.sun.ant.TSLogger gui"

It gives the:

"Buildfile: \cygdrive\c\tcktest\TCK\TCK\jmstck\bin\build.xml does not exist!
Build failed"

Please note build.xml is present under "$TS_HOME/bin/"

Please can any one help?


~R@njeet.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

If you run "ls \cygdrive\c\tcktest\TCK\TCK\jmstck\bin" does build.xml show in the list?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ranjeet Deshmukh
Ranch Hand

Joined: Jan 18, 2013
Posts: 32

Jeanne Boyarsky wrote:If you run "ls \cygdrive\c\tcktest\TCK\TCK\jmstck\bin" does build.xml show in the list?


When I executed above command, I got:

$ ls \cygdrive\c\tcktest\TCK\TCK\jmstck\bin
ls: cannot access cygdrivectcktestTCKTCKjmstckbin: No such file or directory

But when I traversed to the same directory using "cd" and executed "ls", I got:


$ ls
build.properties java.policy sig-test.map ts.jtx
build.xml jndi.properties sig-test-pkg-list.txt tsant
setup.bat ts.jte tsant.bat
harness.policy setup.jdk15.bat ts.jte.orig version
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

This is good. That means you can reproduce the problem from the command line without Ant.

What happens if you run "pwd" after cd'ng to the directory? My guess is that it doesn't match the path in ls.
Ranjeet Deshmukh
Ranch Hand

Joined: Jan 18, 2013
Posts: 32

Jeanne Boyarsky wrote:This is good. That means you can reproduce the problem from the command line without Ant.

What happens if you run "pwd" after cd'ng to the directory? My guess is that it doesn't match the path in ls.


Yes, it doesn't match the path in 'ls' command.

rmanedes@rmanedes-t430 ~
$ ls \cygdrive\c\tcktest\TCK\TCK\jmstck\bin
ls: cannot access cygdrivectcktestTCKTCKjmstckbin: No such file or directory

After cd'ng:
rmanedes@rmanedes-t430 /cygdrive/c/tcktest/TCK/jmstck/bin
$ pwd
/cygdrive/c/tcktest/TCK/jmstck/bin
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

Great. We got to the bottom of it! Now you can change your TS_HOME variable and re-run.
Ranjeet Deshmukh
Ranch Hand

Joined: Jan 18, 2013
Posts: 32

Jeanne Boyarsky wrote:Great. We got to the bottom of it! Now you can change your TS_HOME variable and re-run.


What should I change in TS_HOME variable?
Maxim Karvonen
Ranch Hand

Joined: Jun 14, 2013
Posts: 103
    
  11
Hi, Ranjeet.

You are trying to pass a "/cygdrive/..." path to a tool which is completely unaware about Cygwin. Resolution of Cygwin paths (such as absolute paths, paths passing /cygdrive, etc...) is performed somewhere inside a cygwin dll library and all Cygwin programs are linked to that library. So only cygwin programs can access all the variety of paths. Other (native Windows) application may work fine with relative paths (because they are same in Windows and cygwin) but not with absolute paths.

There are several possible solutions:
1. Compile your own Cygwin-aware java and use it inside cygwin instead of windows-native java.
2. Change directory to a directory with a build file and use only relative paths.
3. Convert "cygwin" path to a windows path. Read Using Cygwin effectively with Windows chapter of Cygwin documentation. There is even an example related to java (read the article carefully, you have an issues with a CLASSPATH too).

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Buildfile:build.xml does not exist! Build failed.