bodewig 2004/08/11 02:46:16 Modified: src/main/org/apache/tools/ant/taskdefs/optional/dotnet WsdlToDotnet.java Log: Use a different way to deal with Mono's "I don't like absolute Unix path names" feature - change into the directory that holds the WSDL file and only use the file name. (1) restores the old signature of setSrcFile (2) makes XSD include with relative URLs work (and probably WSDL import as well). Revision Changes Path 1.27 +8 -19 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java Index: WsdlToDotnet.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- WsdlToDotnet.java 4 Aug 2004 19:55:50 -0000 1.26 +++ WsdlToDotnet.java 11 Aug 2004 09:46:16 -0000 1.27 @@ -58,11 +58,6 @@ private File destFile = null; /** - * name of source file - */ - private String srcFileName = null; - - /** * language; defaults to C# */ private String language = "CS"; @@ -154,18 +149,10 @@ /** * The local WSDL file to parse; either url or srcFile is required. - * @param srcFileName name of WSDL file + * @param srcFile WSDL file */ - public void setSrcFile(String srcFileName) { - if (new File(srcFileName).isAbsolute()) { - srcFileName = FileUtils.newFileUtils() - .removeLeadingPath(getProject().getBaseDir(), - new File(srcFileName));; - } - //save the string name of the file - this.srcFileName = srcFileName; - //and save the file - wsdl.setFile(getProject().resolveFile(srcFileName)); + public void setSrcFile(File srcFile) { + wsdl.setFile(srcFile); } /** @@ -325,10 +312,12 @@ } String path; //mark for a rebuild if the dest file is newer - path=wsdl.evaluate(); - if ( !compiler.supportsAbsoluteFiles() ) { + path = wsdl.evaluate(); + if (!compiler.supportsAbsoluteFiles() && wsdl.getFile() != null) { // Mono 1.0's wsdl doesn't deal with absolute paths - path = srcFileName; + File f = wsdl.getFile(); + command.setDirectory(f.getParentFile()); + path = f.getName(); } command.addArgument(path); //add in any extra files.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]