On Wed, 15 Aug 2001, Sacha Labourey wrote:
> Hello Jason,
Hello.
> I think that the build.bat problem still exists in the modules i.e.
> build.bat and lcp.bat do exist in jboss-*/build but not yet in the
> jboss-*/server or jboss-*/any-source-module . In these modules, only the
> build.sh script exists.
I was hoping to get to it today, but did not. I wanted to look more at the
files before I added them across modules. It has been many, many years
since I have written and dos batch (I would prefer not to either).
> Furthermore, am I the only one to have a problem with the build.bat and
> lcp.bat scripts on W2K? I always need to modify my build.bat script
> otherwise build fails. The problem is most probably in the PWD construction.
> In my case, my classpath ends up in something like
> CLASSPATH=
> ;\..\tools\apache\ant\lib\ant.jar;\..\tools\apache\ant\lib\jaxp.jar;
> \..\tools\apache\ant\lib\parser.jar;\..\tools\sun\javac\lib\javac.jar;
>
> \..\tools\dreambean\ejbdoclet\lib\ejbdoclet.jar;\..\tools\dreambean\ejbdocle
> t\lib\pretty.jar;
> \..\tools\planet57\buildmagic\lib\buildmagic-tasks.jar;
> \..\..\build\classes
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/tools/ant/Main
Sorry. =|
> Thus, each entry in the classpath is build with a leading "\" that makes
> windows thinks it is the root folder of the current drive i.e. it build
> absolute pathname entries whereas it should either be relative entries (just
> suppressing the leading backslash) or complete absolute pathnames.
>
> As the build.bat is a bit cryptic to me (dos batch files can only be
> cryptic, no?), I do not know what was the goal in the PWD search. Any hint?
All build.sh does, as should build.bat or build.cmd or whatever, is try and
find $ANT_HOME. Currently, when one of the jboss-* modules is checked out,
the tools directory is a peer (../tools) to most modules and a parent of a
peer (../../tools) for plugins. So all it has to do is check for
../tools/apache/ant
../../tools/apache/ant
build.sh checs for a few more, actually it will look down the working
directory until it gets to root (/) for a list of possible ant directory
names.
Once it has found $ANT_HOME, it sets $ANT ($ANT_HOME/bin/ant) and executes
it will whatever arguments were passed to the script.
I would have provided one myself, except I can't stand batch. I would
recommend to all batch haters which are in a win32 environment to install
Cygwin and use bash. Your life will be more fulfilling =) Down with the
evil batch language!
* * *
If you (or anyone else) can fix these scripts, make them better... please do
or at least publish your better versions and I will do it. I am a unix
user and will continue to be one. I tested things initially under win32 to
make sure it would work, but I added ant to my path or use cygwin. Batch
experts to the front. Cygwin users, your in charge. Unix guys sit back,
relax and enjor the show =)
--jason
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development