cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java
bodewig 2005/04/11 01:41:27 Modified:src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java Log: Oops, forgot /reference: Revision ChangesPath 1.29 +1 -1 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java Index: DotnetCompile.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- DotnetCompile.java11 Apr 2005 08:39:40 - 1.28 +++ DotnetCompile.java11 Apr 2005 08:41:27 - 1.29 @@ -222,7 +222,7 @@ if (isWindows) { return REFERENCE_OPTION + '\"' + references + '\"'; } else { -return references; +return REFERENCE_OPTION + references; } } else { return null; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java
bodewig 2005/03/14 06:58:54 Modified:.WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java Log: References may point to files with spaces in their names, quote them Revision ChangesPath 1.778 +3 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.777 retrieving revision 1.778 diff -u -r1.777 -r1.778 --- WHATSNEW 14 Mar 2005 11:46:00 - 1.777 +++ WHATSNEW 14 Mar 2005 14:58:54 - 1.778 @@ -267,6 +267,9 @@ * 's extraoptions can now contain multiple arguments. Bugzilla Report 23599. +* The .NET compilation tasks failed if filenames given as references + contained spaces. Bugzilla Report 27170. + Fixed bugs: --- 1.27 +12 -5 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java Index: DotnetCompile.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- DotnetCompile.java14 Mar 2005 11:46:01 - 1.26 +++ DotnetCompile.java14 Mar 2005 14:58:54 - 1.27 @@ -219,7 +219,7 @@ protected String getReferencesParameter() { //bail on no references if (notEmpty(references)) { -return REFERENCE_OPTION + references; +return REFERENCE_OPTION + '\"' + references + '\"'; } else { return null; } @@ -270,8 +270,8 @@ } StringBuffer s = new StringBuffer(REFERENCE_OPTION); -s.append(refpath); -return new String(s); +s.append('\"').append(refpath).append('\"'); +return s.toString(); } @@ -903,6 +903,8 @@ if (isFileManagedBinary(file)) { if (!firstEntry) { referenceList.append(getReferenceDelimiter()); +} else { +referenceList.append('\"'); } referenceList.append(file.toString()); firstEntry = false; @@ -912,8 +914,13 @@ } } -//add it all to an argument -command.addArgument(referenceList.toString()); +// hack: This means we've added at least one reference that's +// a managed binary +if (!firstEntry) { +//add it all to an argument +command.addArgument(referenceList.toString() + '\"'); +} + return filesOutOfDate; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java NetCommand.java
bodewig 2005/03/14 03:49:29 Modified:.Tag: ANT_16_BRANCH WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/dotnet Tag: ANT_16_BRANCH DotnetCompile.java NetCommand.java Log: merge Revision ChangesPath No revision No revision 1.503.2.196 +3 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.503.2.195 retrieving revision 1.503.2.196 diff -u -r1.503.2.195 -r1.503.2.196 --- WHATSNEW 14 Mar 2005 11:35:24 - 1.503.2.195 +++ WHATSNEW 14 Mar 2005 11:49:27 - 1.503.2.196 @@ -283,6 +283,9 @@ attribute to point to. This is the last version of the XSLT stylesheet that is expected to be compatible with Xalan-J 1. +* 's extraoptions can now contain multiple arguments. + Bugzilla Report 23599. + Fixed bugs: --- No revision No revision 1.17.2.8 +13 -2 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java Index: DotnetCompile.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java,v retrieving revision 1.17.2.7 retrieving revision 1.17.2.8 diff -u -r1.17.2.7 -r1.17.2.8 --- DotnetCompile.java14 Apr 2004 15:42:40 - 1.17.2.7 +++ DotnetCompile.java14 Mar 2005 11:49:28 - 1.17.2.8 @@ -1,5 +1,5 @@ /* - * Copyright 2001-2004 The Apache Software Foundation + * Copyright 2001-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,6 +35,7 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; +import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.types.EnumeratedAttribute; @@ -469,6 +470,16 @@ } } +/** + * get any extra options or null for no argument needed, split + * them if they represent multiple options. + * + * @returnThe ExtraOptions Parameter to CSC + */ +protected String[] getExtraOptionsParameters() { +String extra = getExtraOptionsParameter(); +return extra == null ? null : Commandline.translateCommandline(extra); +} /** * Set the destination directory of files to be compiled. @@ -831,7 +842,7 @@ command.addArgument(getAdditionalModulesParameter()); command.addArgument(getDebugParameter()); command.addArgument(getDefinitionsParameter()); -command.addArgument(getExtraOptionsParameter()); +command.addArguments(getExtraOptionsParameters()); command.addArgument(getMainClassParameter()); command.addArgument(getOptimizeParameter()); command.addArgument(getDestFileParameter()); 1.25.2.6 +15 -1 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java Index: NetCommand.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java,v retrieving revision 1.25.2.5 retrieving revision 1.25.2.6 diff -u -r1.25.2.5 -r1.25.2.6 --- NetCommand.java 9 Mar 2004 17:01:44 - 1.25.2.5 +++ NetCommand.java 14 Mar 2005 11:49:28 - 1.25.2.6 @@ -1,5 +1,5 @@ /* - * Copyright 2000-2004 The Apache Software Foundation + * Copyright 2000-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -202,6 +202,20 @@ } /** + * add an argument to a command line; do nothing if the arg is null or + * empty string + * + [EMAIL PROTECTED] argument The feature to be added to the Argument attribute + */ +public void addArguments(String[] arguments) { +if (arguments != null && arguments.length != 0) { +for (int i = 0; i < arguments.length; i++) { +addArgument(arguments[i]); +} +} +} + +/** * concatenate two strings together and add them as a single argument, * but only if argument2 is non-null and non-zero length * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java NetCommand.java
bodewig 2005/03/14 03:46:02 Modified:.WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java NetCommand.java Log: split extraoptions in , PR 23599 Revision ChangesPath 1.777 +3 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.776 retrieving revision 1.777 diff -u -r1.776 -r1.777 --- WHATSNEW 14 Mar 2005 11:34:58 - 1.776 +++ WHATSNEW 14 Mar 2005 11:46:00 - 1.777 @@ -264,6 +264,9 @@ * with a single command should now work with unusal login dialogs without special read/write pairs. Bugzilla Report 26632. +* 's extraoptions can now contain multiple arguments. + Bugzilla Report 23599. + Fixed bugs: --- 1.26 +13 -2 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java Index: DotnetCompile.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- DotnetCompile.java14 Apr 2004 15:42:07 - 1.25 +++ DotnetCompile.java14 Mar 2005 11:46:01 - 1.26 @@ -1,5 +1,5 @@ /* - * Copyright 2001-2004 The Apache Software Foundation + * Copyright 2001-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,6 +35,7 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; +import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.types.EnumeratedAttribute; @@ -469,6 +470,16 @@ } } +/** + * get any extra options or null for no argument needed, split + * them if they represent multiple options. + * + * @returnThe ExtraOptions Parameter to CSC + */ +protected String[] getExtraOptionsParameters() { +String extra = getExtraOptionsParameter(); +return extra == null ? null : Commandline.translateCommandline(extra); +} /** * Set the destination directory of files to be compiled. @@ -831,7 +842,7 @@ command.addArgument(getAdditionalModulesParameter()); command.addArgument(getDebugParameter()); command.addArgument(getDefinitionsParameter()); -command.addArgument(getExtraOptionsParameter()); +command.addArguments(getExtraOptionsParameters()); command.addArgument(getMainClassParameter()); command.addArgument(getOptimizeParameter()); command.addArgument(getDestFileParameter()); 1.35 +14 -0 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java Index: NetCommand.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- NetCommand.java 6 Jan 2005 12:05:03 - 1.34 +++ NetCommand.java 14 Mar 2005 11:46:01 - 1.35 @@ -202,6 +202,20 @@ } /** + * add an argument to a command line; do nothing if the arg is null or + * empty string + * + [EMAIL PROTECTED] argument The feature to be added to the Argument attribute + */ +public void addArguments(String[] arguments) { +if (arguments != null && arguments.length != 0) { +for (int i = 0; i < arguments.length; i++) { +addArgument(arguments[i]); +} +} +} + +/** * concatenate two strings together and add them as a single argument, * but only if argument2 is non-null and non-zero length * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java
stevel 2003/10/23 22:53:05 Modified:src/testcases/org/apache/tools/ant/taskdefs/optional DotnetTest.java src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java Log: fix for bug#19630; no handling large files. Needs testing on mono! Revision ChangesPath 1.6 +8 -0 ant/src/testcases/org/apache/tools/ant/taskdefs/optional/DotnetTest.java Index: DotnetTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/DotnetTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- DotnetTest.java 21 Sep 2003 22:29:54 - 1.5 +++ DotnetTest.java 24 Oct 2003 05:53:05 - 1.6 @@ -157,5 +157,13 @@ public void testJsharp() throws Exception { executeTarget("jsharp"); } + +/** + * test we can handle jsharp (if found) + */ +public void testResponseFile() throws Exception { +executeTarget("testCSCresponseFile"); +} + } 1.20 +27 -0 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java Index: DotnetCompile.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- DotnetCompile.java23 Sep 2003 07:29:28 - 1.19 +++ DotnetCompile.java24 Oct 2003 05:53:05 - 1.20 @@ -205,6 +205,11 @@ */ protected Vector referenceFilesets = new Vector(); +/** + * flag to set to to use @file based command cache + */ +private boolean useResponseFile = false; +private static final int AUTOMATIC_RESPONSE_FILE_THRESHOLD = 64; /** * constructor inits everything and set up the search pattern @@ -796,6 +801,25 @@ return "**/*." + getFileExtension(); } +/** + * getter for flag + * @return + */ +public boolean isUseResponseFile() { +return useResponseFile; +} + +/** + * Flag to turn on response file use; default=false. + * When set the command params are saved to a file and + * this is passed in with @file. The task automatically switches + * to this mode with big commands; this option is here for + * testing and emergencies + * @param useResponseFile + */ +public void setUseResponseFile(boolean useResponseFile) { +this.useResponseFile = useResponseFile; +} /** * do the work by building the command line and then calling it @@ -806,6 +830,9 @@ throws BuildException { validate(); NetCommand command = createNetCommand(); +//set up response file options + command.setAutomaticResponseFileThreshold(AUTOMATIC_RESPONSE_FILE_THRESHOLD); +command.setUseResponseFile(useResponseFile); //fill in args fillInSharedParameters(command); addResources(command); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java
bodewig 2003/09/23 01:29:07 Modified:docs/manual/OptionalTasks Tag: ANT_16_BRANCH dotnet.html src/etc/testcases/taskdefs/optional Tag: ANT_16_BRANCH dotnet.xml src/main/org/apache/tools/ant/taskdefs/optional/dotnet Tag: ANT_16_BRANCH DotnetCompile.java Log: Merge Mono and doc fixes for from HEAD Revision ChangesPath No revision No revision 1.10.2.1 +2 -3 ant/docs/manual/OptionalTasks/dotnet.html Index: dotnet.html === RCS file: /home/cvs/ant/docs/manual/OptionalTasks/dotnet.html,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -u -r1.10 -r1.10.2.1 --- dotnet.html 1 Dec 2002 01:31:05 - 1.10 +++ dotnet.html 23 Sep 2003 08:29:07 - 1.10.2.1 @@ -117,9 +117,8 @@ includeDefaultReferences -Flag which when true automatically includes -the common assemblies in dotnet, and tells the compiler to link in -mscore.dll +Controls csc's /nostdlib argument, +"true"(default) implies /nostdlib-. "true"(default) or "false" No revision No revision 1.13.2.1 +4 -4 ant/src/etc/testcases/taskdefs/optional/dotnet.xml Index: dotnet.xml === RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/optional/dotnet.xml,v retrieving revision 1.13 retrieving revision 1.13.2.1 diff -u -r1.13 -r1.13.2.1 --- dotnet.xml21 Sep 2003 22:29:54 - 1.13 +++ dotnet.xml23 Sep 2003 08:29:07 - 1.13.2.1 @@ -142,7 +142,7 @@ destFile="${testCSC.exe}" targetType="exe" executable="mcs" - includedefaultreferences="false" + includedefaultreferences="true" > @@ -179,7 +179,7 @@ targetType="exe" srcDir="." executable="mcs" - includedefaultreferences="false" + includedefaultreferences="true" > @@ -213,7 +213,7 @@ destFile="${testCSC.dll}" targetType="library" executable="mcs" - includedefaultreferences="false" + includedefaultreferences="true" > @@ -251,7 +251,7 @@ destFile="${testCscReferences.exe}" targetType="exe" executable="mcs" - includedefaultreferences="false" + includedefaultreferences="true" > No revision No revision 1.17.2.1 +2 -4 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java Index: DotnetCompile.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -u -r1.17 -r1.17.2.1 --- DotnetCompile.java21 Sep 2003 22:29:54 - 1.17 +++ DotnetCompile.java23 Sep 2003 08:29:07 - 1.17.2.1 @@ -115,7 +115,7 @@ /** * flag to enable automatic reference inclusion */ -private boolean includeDefaultReferences; +private boolean includeDefaultReferences = true; /** * icon for incorporation into apps @@ -313,7 +313,7 @@ * in dotnet, and tells the compiler to link in mscore.dll. * * set the automatic reference inclusion flag on or off this flag controls - * the string of references and the /nostdlib option in CSC + * the /nostdlib option in CSC * [EMAIL PROTECTED] f on/off flag */ @@ -640,8 +640,6 @@ protected String getUtf8OutputParameter() { return utf8output ? "/utf8output" : null; } - - /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java
bodewig 2003/09/23 00:29:28 Modified:docs/manual/OptionalTasks dotnet.html src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java Log: Fix docs of 's includeDefaultReference attribute, fix its default value to match the documentation Revision ChangesPath 1.11 +2 -3 ant/docs/manual/OptionalTasks/dotnet.html Index: dotnet.html === RCS file: /home/cvs/ant/docs/manual/OptionalTasks/dotnet.html,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- dotnet.html 1 Dec 2002 01:31:05 - 1.10 +++ dotnet.html 23 Sep 2003 07:29:28 - 1.11 @@ -117,9 +117,8 @@ includeDefaultReferences -Flag which when true automatically includes -the common assemblies in dotnet, and tells the compiler to link in -mscore.dll +Controls csc's /nostdlib argument, +"true"(default) implies /nostdlib-. "true"(default) or "false" 1.19 +2 -2 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java Index: DotnetCompile.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- DotnetCompile.java23 Sep 2003 06:28:33 - 1.18 +++ DotnetCompile.java23 Sep 2003 07:29:28 - 1.19 @@ -115,7 +115,7 @@ /** * flag to enable automatic reference inclusion */ -private boolean includeDefaultReferences; +private boolean includeDefaultReferences = true; /** * icon for incorporation into apps @@ -313,7 +313,7 @@ * in dotnet, and tells the compiler to link in mscore.dll. * * set the automatic reference inclusion flag on or off this flag controls - * the string of references and the /nostdlib option in CSC + * the /nostdlib option in CSC * [EMAIL PROTECTED] f on/off flag */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java Ilasm.java Ildasm.java JSharp.java WsdlToDotnet.java
stevel 2003/09/22 23:28:33 Modified:src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java Ilasm.java Ildasm.java JSharp.java WsdlToDotnet.java Log: minor cleanups; no code changes Revision ChangesPath 1.18 +0 -2 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java Index: DotnetCompile.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- DotnetCompile.java21 Sep 2003 22:29:54 - 1.17 +++ DotnetCompile.java23 Sep 2003 06:28:33 - 1.18 @@ -642,8 +642,6 @@ } - - /** * add a define to the list of definitions * @param define 1.31 +1 -1 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java Index: Ilasm.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- Ilasm.java6 Sep 2003 07:09:59 - 1.30 +++ Ilasm.java23 Sep 2003 06:28:33 - 1.31 @@ -82,7 +82,7 @@ * /out:file ... /verbose is used some places; /quiet here in ildasm... etc.] * It would be nice if someone made all the command line tools consistent (and * not as brittle as the java cmdline tools) - * + * * The task is a directory based task, so attributes like includes="*.il" * and excludes="broken.il" can be used to control the files pulled * in. You can also use nestedfilesets to refer to source. 1.4 +4 -3 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ildasm.java Index: Ildasm.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ildasm.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Ildasm.java 21 Sep 2003 20:20:03 - 1.3 +++ Ildasm.java 23 Sep 2003 06:28:33 - 1.4 @@ -65,7 +65,7 @@ * into ILASM assembly code. Useful when converting imported typelibs into * assembler before patching and recompiling, as one has to do when doing * advanced typelib work. - * + * * As well as generating the named output file, the ildasm program * will also generate resource files Icons.resources * Message.resources and a .res file whose filename stub is derived @@ -76,13 +76,13 @@ * creates the resources in the directory specified by resourceDir if * set, else in the same directory as the destFile. * - * + * * This task requires the .NET SDK installed and ildasm on the path. * To disassemble using alternate CLR systems, set the executable attribute * to the name/path of the alternate implementation -one that must * support all the classic ildasm commands. * - * + * * Dependency logic: the task executes the command if the output file is missing * or older than the source file. It does not take into account changes * in the options of the task, or timestamp differences in resource files. @@ -90,6 +90,7 @@ * .il file in place with some error message. To prevent this from confusing * the dependency logic, the file specified by the dest * attribute is always deleted after an unsuccessful build. + * @ant.task category="dotnet" */ public class Ildasm extends Task { 1.6 +2 -0 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/JSharp.java Index: JSharp.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/JSharp.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- JSharp.java 21 Sep 2003 22:29:54 - 1.5 +++ JSharp.java 23 Sep 2003 06:28:33 - 1.6 @@ -58,9 +58,11 @@ /** * Compile J# source down to a managed .NET application. + * * J# is not Java. But it is the language closest to Java in the .NET framework. * This task compiles jsharp source (assumes a .jsl extension, incidentally), and * generates a .NET managed exe or dll. + * * See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vjsharp/html/vjoriMicrosoftVisualJ.asp * for vjc command options in glory detail. * @author Steve Loughran 1.16 +1 -1 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java Index: WsdlToDotnet.java ===
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java
bodewig 2003/08/14 00:02:34 Modified:src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java Log: make definitions work for Mono Revision ChangesPath 1.14 +6 -2 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java Index: DotnetCompile.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- DotnetCompile.java8 Aug 2003 00:11:05 - 1.13 +++ DotnetCompile.java14 Aug 2003 07:02:34 - 1.14 @@ -720,19 +720,23 @@ protected String getDefinitionsParameter() throws BuildException { StringBuffer defines = new StringBuffer(); Enumeration defEnum = definitionList.elements(); +boolean firstDefinition = true; while (defEnum.hasMoreElements()) { //loop through all definitions DotnetDefine define = (DotnetDefine) defEnum.nextElement(); if (define.isSet(this)) { //add those that are set, and a delimiter +if (!firstDefinition) { +defines.append(getDefinitionsDelimiter()); +} defines.append(define.getValue(this)); -defines.append(getDefinitionsDelimiter()); +firstDefinition = false; } } if (defines.length() == 0) { return null; } else { -return "/D:" + defines; +return "/d:" + defines; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java
stevel 2003/08/07 17:11:05 Modified:src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java Log: Lets try this as a fix: A new option to turn standardlib on or off that overrides the defaultreferences switch Revision ChangesPath 1.13 +31 -1 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java Index: DotnetCompile.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- DotnetCompile.java6 Aug 2003 09:53:23 - 1.12 +++ DotnetCompile.java8 Aug 2003 00:11:05 - 1.13 @@ -160,6 +160,8 @@ protected String executable; +protected Boolean standardLib; + /** * Fix .NET reference inclusion. .NET is really dumb in how it handles * inclusion. You have to list every 'assembly' -read DLL that is imported. @@ -392,7 +394,11 @@ [EMAIL PROTECTED]The Parameter to CSC */ protected String getIncludeDefaultReferencesParameter() { -return "/nostdlib" + (includeDefaultReferences ? "-" : "+"); +if(standardLib==null) { +return "/nostdlib" + (includeDefaultReferences ? "-" : "+"); +} else { +return null; +} } @@ -817,6 +823,29 @@ } /** + * turn standard lib support on or off. + * Setting this in either direction overrides anything set in defaultreferences. + * @param standardLib + */ +public void setStandardLib(Boolean standardLib) { +this.standardLib = standardLib; +} + + +/** + * get the include default references flag or null for no argument needed + * + [EMAIL PROTECTED]The Parameter to CSC + */ +protected String getStandardLibParameter() { +if (standardLib != null) { +return "/nostdlib" + (standardLib.booleanValue() ? "-" : "+"); +} else { +return null; +} +} + +/** * test for a string containing something useful * [EMAIL PROTECTED] s string in @@ -909,6 +938,7 @@ command.addArgument(getAdditionalModulesParameter()); command.addArgument(getDebugParameter()); command.addArgument(getDefaultReferenceParameter()); +command.addArgument(getStandardLibParameter()); command.addArgument(getDefinitionsParameter()); command.addArgument(getExtraOptionsParameter()); command.addArgument(getMainClassParameter()); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java
bodewig 2003/08/06 02:53:23 Modified:src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java Log: Remove trailing delimiter from addReferenceFileset Revision ChangesPath 1.12 +5 -1 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java Index: DotnetCompile.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- DotnetCompile.java1 Aug 2003 05:55:16 - 1.11 +++ DotnetCompile.java6 Aug 2003 09:53:23 - 1.12 @@ -965,11 +965,15 @@ StringBuffer referenceList = new StringBuffer(REFERENCE_OPTION); //now scan the hashtable and add the files Enumeration files = filesToBuild.elements(); +boolean firstEntry = true; while (files.hasMoreElements()) { File file = (File) files.nextElement(); if (isFileManagedBinary(file)) { +if (!firstEntry) { +referenceList.append(getReferenceDelimiter()); +} referenceList.append(file.toString()); -referenceList.append(getReferenceDelimiter()); +firstEntry = false; } else { log("ignoring " + file + " as it is not a managed executable", Project.MSG_VERBOSE); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]