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 5276] New: - Statement Fileset, statement include, input file not included in final jar file
Date Wed, 05 Dec 2001 08:50:16 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=5276>.
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=5276

Statement Fileset, statement include, input file not included in final jar file

           Summary: Statement Fileset, statement include, input file not
                    included in final jar file
           Product: Ant
           Version: 1.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: anavodnik@src.si


Hi there,

I would like to report a bug which relates to the ANT utility program. I wanted 
to build a JAR file with the following BUILD.XML file:

<?xml version="1.0" encoding="windows-1250" ?>

<project name = "ant-bug" default = "build_jar">

   <property name="srcDir" value="d:\andrej\java\ShowDocInBrowser\ant-bug" />
   <property name="jar_name" value="${srcDir}\test.jar" />

   <target name="delete_jar" >
      <delete file="${jar_name}" />
   </target>

   <target name="build_jar" depends="delete_jar" >
      <jar jarfile="${jar_name}" compress="yes" >
         <fileset dir="${srcDir}"  >
            <patternset id = "JarClasses" >  
               <include name="**/ShowDoc$ShowDocumentActionListener.class" />
            </patternset>
         </fileset>       
      </jar>  
   </target>

</project>

Before that I had created an inner class 
named "ShowDoc$ShowDocumentActionListener.class". After running ANT program 
using option -VERBOSE I received the following output:

Ant version 1.4.1 compiled on October 11 2001
Buildfile: build.xml
Detected Java version: 1.4 in: d:\java\j2sdk1_4_0_beta3\jre
Detected OS: Windows NT
parsing buildfile D:\Andrej\java\ShowDocInBrowser\ant-bug\build.xml with URI = 
file:D:/Andrej/java/ShowDocInBro
wser/ant-bug/build.xml
Project base dir set to: D:\Andrej\java\ShowDocInBrowser\ant-bug
Build sequence for target `build_jar' is [delete_jar, build_jar]
Complete build sequence is [delete_jar, build_jar]

delete_jar:
   [delete] Could not find file D:\andrej\java\ShowDocInBrowser\ant-
bug\test.jar to delete.

build_jar:
Overriding previous definition of reference to JarClasses
      [jar] Updating jar since cannot read current jar manifest: 
java.util.zip.ZipExceptionThe system cannot fi
nd the file specified
      [jar] Building jar: D:\andrej\java\ShowDocInBrowser\ant-bug\test.jar

BUILD SUCCESSFUL

Total time: 2 seconds


The final Jar file is empty - file "ShowDoc$ShowDocumentActionListener.class" 
is not included. Is this an error? Using statement 

<include name="**/*.class" /> 

actually does include the file. 

If I list current directory I get:

D:\Andrej\java\ShowDocInBrowser\ant-bug>dir
 Volume in drive D is DiskD
 Volume Serial Number is BC93-A441

 Directory of D:\Andrej\java\ShowDocInBrowser\ant-bug

05.12.01  09:38         <DIR>          .
05.12.01  09:38         <DIR>          ..
05.12.01  09:37                    708 build.xml
04.12.01  15:12                  2.361 ShowDoc$ShowDocumentActionListener.class
05.12.01  09:38                  1.697 test.jar
               5 File(s)          4.766 bytes
                            590.098.432 bytes free

I hope that this report will help you to reproduce the error and improve 
already know very good software.

Best regards,
Andrej Navodnik

--
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