Board index » jbuilder » running tomcat from ant

running tomcat from ant


2003-09-03 03:19:04 AM
jbuilder2
I need to run tomcat using ant and buil.xml.
First solution works:
<exec executable="cmd" vmlauncher="false">
<arg line="/c "D:\work\mytomcat.bat\startup.bat"" />
</exec>
bat has one line:
java -classpath
...bla...\bootstrap.jar;...bla...\tools.jar" -Dcatalina.home="C:/Program
Files/JBuilder/thirdparty/jakarta-tomcat-4.0.6-LE-jdk14"
org.apache.catalina.startup.Bootstrap -config "d:\work\server8080.xml" start
I want to convert this to the ant target as follows (no fork="true" please):
<java classname="org.apache.catalina.startup.Bootstrap">
<arg value="-Dcatalina.home=C:/Program
Files/JBuilder/thirdparty/jakarta-tomcat-4.0.6-LE-jdk14"/>
<arg value="-config=d:\work\server8080.xml>
<arg value="start"/>
<classpath>
<fileset dir="${env.CATALINA_HOME}">
<include name="bin/bootstrap.jar"/>
</fileset>
<fileset dir="${jdk.home}">
<include name="jer/lib/tooks.jar"/>
</fileset>
</classpath>
</java>
What's wrong, any better version. Plz help ! Either I get all kinds of
exceptions, or message about invalid usage of command line...
 
 

Re:running tomcat from ant

Petar wrote:
Quote
I need to run tomcat using ant and buil.xml.

First solution works:

<exec executable="cmd" vmlauncher="false">
<arg line="/c "D:\work\mytomcat.bat\startup.bat"" />
</exec>

bat has one line:
java -classpath
...bla...\bootstrap.jar;...bla...\tools.jar" -Dcatalina.home="C:/Program
Files/JBuilder/thirdparty/jakarta-tomcat-4.0.6-LE-jdk14"
org.apache.catalina.startup.Bootstrap -config "d:\work\server8080.xml" start

All of the install instructions in Jbuilder explicitly tell you NOT to
install JBuilder in a directory with spaces in the name. Most Java
applications don't play nicely with such directories, so it is policy to
avoid them.
You have installed JBuilder under C:\Program Files. That is your problem.
--
Regards,
Lori Olson (TeamB)
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html
 

Re:running tomcat from ant

Hi Petar,
You might try using the DOS-style version of the Program Files directory:
C:/PROGRA~1/JBuilder...blah (and use that when installing JB). Also, you
can try putting your quotes in like "\" ...Program Files... \"" and see if
that helps.
As for the statement "Most Java applications don't play nicely with such
directories", that's only true of badly-written applications. It's
inexcusable for an app written in *any* language not to support a
widely-used, valid form of Windows and UNIX file specification, and hacks
like that bode ill for the rest of the app. In this case (and with a JB CVS
integration problem I reported earlier), the space character is in effect
being used as a file separator character, when Java goes out of its way to
make that transparent to the programmer! And since Petar's file spec was
surrounded by quotes, that should be sufficient for a decent parser to know
that that's a complete single entity and not two separate entities. If
build.xml is being processed by another app, that app must properly
recognize and handle quote groupings. It's not very difficult.
And by the way Lori, the latest JB9 patch does not resolve the "space in CVS
project" problem, nor do the release notes give any reason to hope that it
would.
Fran
 

{smallsort}