ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40852] New: - Javadoc failed: java.io.IOException: CreateProcess
Date Tue, 31 Oct 2006 16:24:57 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40852>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40852

           Summary: Javadoc failed: java.io.IOException: CreateProcess
           Product: Ant
           Version: 1.6.5
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Keywords: PatchAvailable
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: dribagnac@bigfoot.com


I had an exception (Javadoc failed: java.io.IOException: CreateProcess) when 
I run my Doclet task on Windows XP. The fact is : my classpath is very long and 
Windows' shell can not handle it.
   The 'useExternalFile' flag is set to true but it does not affect the 
classpath's variable.
   So I modify javadoc.java with the following code, is it possible to include 
it within a new release of Ant ?


----------------------------------------------
        File tmpList = null;
        File optionsTmpList = null;
        PrintWriter srcListWriter = null;
        PrintWriter optionsListWriter = null;
        try {

            /**
             * Write sourcefiles and package names to a temporary file
             * if requested.
             */
            // Code added
            // Write all options to a file             
            if (useExternalFile) {
                if (optionsTmpList == null) {
                	optionsTmpList = fileUtils.createTempFile
("javadocOptions", "", null);
                	optionsTmpList.deleteOnExit();
                	
                	String[] listOpt = toExecute.getArguments();
                	toExecute.clearArgs();
                    toExecute.createArgument()
                        .setValue("@" + optionsTmpList.getAbsolutePath());
                    
                    optionsListWriter = new PrintWriter(
                            new FileWriter(optionsTmpList.getAbsolutePath(),
                                           true));
                    
                    for (int i = 0; i < listOpt.length; i++) {
						String string = listOpt[i];
						
						if (string.startsWith("-J-")) {
							toExecute.createArgument
().setValue(string);
						} else  {
							if (string.startsWith("-
")) {
							
	optionsListWriter.println();
							
	optionsListWriter.print(string);
							} else {
							
	optionsListWriter.print(string);
							}
							optionsListWriter.print
(" ");
						}
					}                   
                }
                // End of added code
                
                if (tmpList == null) {
                    tmpList = fileUtils.createTempFile("javadoc", "", null);
                    tmpList.deleteOnExit();
                    toExecute.createArgument()
                        .setValue("@" + tmpList.getAbsolutePath());
                }


...




        } finally {
            if (srcListWriter != null) {
                srcListWriter.close();
            }
            
            // Added code
            if (optionsListWriter != null) {
                optionsListWriter.close();
            }
        }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message