Return-Path: Delivered-To: apmail-xml-forrest-dev-archive@xml.apache.org Received: (qmail 53691 invoked by uid 500); 15 Nov 2002 13:53:52 -0000 Mailing-List: contact forrest-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: forrest-dev@xml.apache.org Delivered-To: mailing list forrest-dev@xml.apache.org Received: (qmail 53666 invoked from network); 15 Nov 2002 13:53:52 -0000 Received: from mail.hospitable.be (HELO relay.hospitable.be) (212.35.122.81) by daedalus.apache.org with SMTP; 15 Nov 2002 13:53:52 -0000 Received: from bert-dell.vankets.com (172.33-201-80.adsl.skynet.be [80.201.33.172]) by relay.hospitable.be (Postfix) with ESMTP id 778B1A1744 for ; Fri, 15 Nov 2002 14:51:37 +0100 (CET) Message-Id: <5.1.1.6.0.20021115144244.042e8718@mail.visitronics.be> X-Sender: postmaster.vankets@mail.visitronics.be X-Mailer: QUALCOMM Windows Eudora Version 5.1.1 Date: Fri, 15 Nov 2002 14:53:23 +0100 To: forrest-dev@xml.apache.org From: Bert Van Kets Subject: Re: path space problem In-Reply-To: <20021115132728.GQ3683@expresso.localdomain> References: <5.1.1.6.0.20021115135458.0423aa18@mail.visitronics.be> <5.1.1.6.0.20021115135458.0423aa18@mail.visitronics.be> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N There's no need for this. I have reverse engineered the task I echoed the command to screen and tweaked it till it worked. The solution is to pass the environment variables till the last commend (calling Ant). This works from a path containing a space when Forrest is deployed in a path containing a space!: "C:\jdk1.3.1_02\bin\java.exe" -classpath "C:\jdk1.3.1_02\lib\tools.jar;%ANT_HOME%\lib\resolver.jar;%ANT_HOME%\lib\nodeps.jar;%ANT_HOME%\lib\ant.jar;%ANT_HOME%\lib\ant-xalan2.jar;%ANT_HOME%\lib\ant-trax.jar;%ANT_HOME%\lib\ant-apache-resolver.jar;;%FORREST_HOME%\lib\endorsed\xalan-2.3.1.jar;%FORREST_HOME%\lib\endorsed\xercesImpl-2.1.0.jar;%FORREST_HOME%\lib\endorsed\xml-apis.jar;%FORREST_HOME%\lib\endorsed\xsltc-20020723.jar" -Dant.home="%FORREST_HOME%\ant" org.apache.tools.ant.Main -buildfile "%FORREST_HOME%\forrest.build.xml" -Dbasedir "%PROJECT_HOME%" -Dproject.home "%PROJECT_HOME%" -Dforrest.home "%FORREST_HOME%" -emacs -logger org.apache.tools.ant.NoBannerLogger seed All I need to do now is get to the point that this command is generated. Shouldn't be too hard. When this is done, we are completely free of the space problem. The solution actually lies in the buildup of the paths. Keeping the paths inn the environment variables avoids the problem altogether. This required some changes in the FOR loops though (cd to the jar directory and run the FOR there to avoid having the full path in the appended parameter). I got to run now, will finalize this in an hour or two when I'm home. Bert At 00:27 16/11/2002 +1100, you wrote: >On Fri, Nov 15, 2002 at 02:07:11PM +0100, Bert Van Kets wrote: > > The problem with the Win2K batch file is that parameters are passed > > through from one batch file to another. If the path in these > > parameters can be replaced with environment variables the problem > > should be solved. Due to the complexity of the batch calling, I > > haven't finished the problem solving yet, but I can say that we need to > > change not only the forrest.bat file but also other bat files (ant.bat > > etc.) > >Are you testing 0.2rc1 or CVS? 0.2rc1 has: > >call "%ANT_HOME%\bin\ant" ... > >whereas CVS has: > >"%ANT_HOME%\bin\ant" ... > >It was to make debugging easier, but removing the 'call' could solve any >problems of passing through parameters. > > > One of the problems lies in the fact that the CLASSPATH variable is > > "built up" and that for some strange reason spaces in the path are > > replaces by semi colons in the ant.bat file. I'm still trying to solve > > this. > >Line 21: >for %%i in ("%FORREST_HOME%\lib\endorsed\*.jar") do call appendcp.bat %%i > >I think that expands to: > >c:\Program Files\Forrest\... c:\Program Files\Forrest\... > >Which gets tokenized into > >c:\Program >Files\Forrest\... >c:\Program >Files\Forrest\... > >Ie, we would need the individual entries to be quoted: > >"c:\Program Files\Forrest\..." "c:\Program Files\Forrest\..." > >which I've no idea how to do :/ > > > Can someone confirm that I can use environment variables in the > > CLASSPATH (ex. %FORREST_HOME%\lib\endorsed\xml-apis.jar) if not, how > > do you define a classpath that contains spaces. Quotes are out of the > > question. > > > > We are nearing a working version. > >We can delay 0.2 if you think you're near a solution.. > >--Jeff > > > Bert