809N/A# Licensed to the Apache Software Foundation (ASF) under one or more 809N/A# contributor license agreements. See the NOTICE file distributed with 809N/A# this work for additional information regarding copyright ownership. 809N/A# The ASF licenses this file to You under the Apache License, Version 2.0 809N/A# (the "License"); you may not use this file except in compliance with 809N/A# the License. You may obtain a copy of the License at 0N/A# Unless required by applicable law or agreed to in writing, software 0N/A# distributed under the License is distributed on an "AS IS" BASIS, 0N/A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0N/A# See the License for the specific language governing permissions and 0N/A# limitations under the License. 0N/A####################################################################### 0N/A# wrapper script for invoking ant in a platform with Perl installed 0N/A# this may include cgi-bin invocation, which is considered somewhat daft. 0N/A# (slo: that should be a separate file which can be derived from this 0N/A# and returns the XML formatted output) 0N/A# the code is not totally portable due to classpath and directory splitting 0N/A# issues. oops. (NB, use File::Spec::Functions will help and the code is 0N/A# structured for the catfile() call, but because of perl version funnies 0N/A# the code is not included. 0N/A# author: Steve Loughran steve_l@sourceforge.net 0N/A####################################################################### 0N/A# - ANT_HOME has been set 0N/A# - target platform uses ":" as classpath separator or perl indicates it is dos/win32 0N/A# - target platform uses "/" as directory separator. 0N/A#be fussy about variables 0N/A#platform specifics (disabled) 0N/A#use File::Spec::Functions; 0N/A#turn warnings on during dev; generates a few spurious uninitialised var access warnings 0N/A#and set $debug to 1 to turn on trace info 0N/A####################################################################### 0N/A# check to make sure environment is setup 0N/A die "\n\nANT_HOME *MUST* be set!\n\n";
0N/Aif ($^O
eq "NetWare")
0N/A#ISSUE: what java wants to split up classpath varies from platform to platform 0N/A#and perl is not too hot at hinting which box it is on. 0N/A#here I assume ":" 'cept on win32, dos, and netware. Add extra tests here as needed. 0N/Aif(($^O
eq "MSWin32") || ($^O
eq "dos") || ($^O
eq "cygwin") ||
0N/A#build up standard classpath 0N/A#set JVM options and Ant arguments, if any 0N/A#construct arguments to java 0N/Apush @
ARGS,
"-classpath",
"$localpath";
0N/A push @
ARGS,
"-Dcygwin.user.home=\"$CYGHOME\"" 0N/A # make classpath literally $CLASSPATH 0N/A # this is to avoid pushing us over the 512 character limit 0N/A # even skip the ; - that is already in $localpath 0N/Aprint "\n $JAVACMD @ARGS\n\n" if ($
debug);
0N/A # only 0 and 1 are widely recognized as exit values 0N/A # so change the exit value to 1