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 Changes Path 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 -0000 1.5 +++ DotnetTest.java 24 Oct 2003 05:53:05 -0000 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.java 23 Sep 2003 07:29:28 -0000 1.19 +++ DotnetCompile.java 24 Oct 2003 05:53:05 -0000 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]