ant $1 --------------------------------------------
but when I ran build.sh(on unix/solaris), I got following error: ----------------------------------------------- $ ./build.sh /home/mm/ant/bin/ant: uname: not found /home/mm/ant/bin/ant: basename: not found /home/mm/ant/bin/ant: dirname: not found /home/mm/ant/bin/ant: null directory -----------------------------------------------
anyone know the reason?
thanks a lot for the help!!!
noel angel
Ranch Hand
Joined: Oct 27, 2002
Posts: 75
posted
0
ANT requires xml syntax. The build file must be named build.xml or you need the option to rename the file when you call ant. This is not the correct way to handle the environment. your snippet looks like a shell file not an ant build file???
Noel
Lewin Chan
Ranch Hand
Joined: Oct 10, 2001
Posts: 214
posted
0
You might find changing it to
might be more useful... the ant script itself cannot find any of the standard programs in /usr/bin, /usr/local/bin etc.
If all your build.sh is doing is wrapping the ant script, then it might be more logical to just add the required variables to your .profile or similar, rather than using another script
L
I have no java certifications. <br />This makes me a bad programmer.<br />Ignore my post.
marshal ma
Greenhorn
Joined: May 31, 2004
Posts: 23
posted
0
Thanks noel angel and Lewin Chan !!! :-)
Noel, yeah, this is shell file, I didn't put build.xml here since I know it's right, I have used it to build successfully in Win env. Sorry I didn't express clearly here.
Lewin, you are right, "PATH=$PATH:/home/mm/ant/bin:$JAVA_HOME/bin" works!! I also found if I export ANT_HOME, it also can build, but still showed /home/mm/ant/bin/ant: uname: not found /home/mm/ant/bin/ant: basename: not found /home/mm/ant/bin/ant: dirname: not found /home/mm/ant/bin/ant: null directory before building. Using your code get these error disappear and I needn't export ant_home neither.