This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ranjeet Deshmukh
Ranch Hand
Posts: 35
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34195
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you run "ls \cygdrive\c\tcktest\TCK\TCK\jmstck\bin" does build.xml show in the list?
 
Ranjeet Deshmukh
Ranch Hand
Posts: 35
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34195
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 35
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34195
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great. We got to the bottom of it! Now you can change your TS_HOME variable and re-run.
 
Ranjeet Deshmukh
Ranch Hand
Posts: 35
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 121
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic