You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Luis Arias <lu...@elysia.com> on 1999/12/12 15:16:32 UTC
PATCH : Ant build dist fails under windows
I found this while trying different things with ant on Windows 98. The
problem comes because the user.home property turns out to be c:\windows on
my system !?
When doing a build dist of ant itself, there are some references in the
build file to directories that end up looking like c:\windows/opt/ant etc...
This caused exceptions in tasks like Mkdir.
I modified Project.resoveFile to replace any '/' in path names to '\\' when
running under windows, which fixed the exception problem.
cvs diff Project.java (in directory
C:\dev\jakarta-tools\ant\src\main\org\apache\tools\ant\)
cvs diff: warning: unrecognized response `cvs: setgroups: Operation not
permitted' from cvs server
Index: Project.java
===================================================================
RCS file:
/home/cvspublic/jakarta-tools/ant/src/main/org/apache/tools/ant/Project.java
,v
retrieving revision 1.16
diff -r1.16 Project.java
354c354
< if (fileName.indexOf(":\\")==1) return new File( fileName );
---
> if (fileName.indexOf(":\\")==1) return new File( fileName.replace('/',
'\\'));
--
Luis Arias
Elysia, Sarl - http://www.elysia.com
1, rue de Stockholm
75008 PARIS
FRANCE
+33 1 44 70 70 90
+33 1 44 70 72 09 fax
+33 6 14 20 87 93 mobile