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 15568] New: - outputFile attribute in ILASM task cannot create new file
Date Fri, 20 Dec 2002 14:08:20 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15568>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15568

outputFile attribute in ILASM task cannot create new file

           Summary: outputFile attribute in ILASM task cannot create new
                    file
           Product: Ant
           Version: 1.5.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Optional Tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: mschilling@amberpoint.com


Look at the processing of the outputFile attribute in the 
org.apache.tools.ant.taskdefs.optional.dotnet.Ilasm class:

    protected String getOutputFileParameter() {
        if (outputFile == null || outputFile.length() == 0) {
            return null;
        }
        File f = outputFile;
        return "/output=" + f.toString();
    }

If the "outputFile" field were a String, this would be correct; it would check 
if the field had been set to a non-empty string.  Since outputFile is a File, 
it checks whether the file exists and has non-zero length.  The result is that 
output will be set to the specified location only if the file already exists 
with non-zero length.  

Workaround: in the ANT script, first use "echo" to create the target file, then 
call the ilasm task.

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


Mime
View raw message