http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1540
*** shadow/1540 Thu Apr 26 10:36:28 2001
--- shadow/1540.tmp.12005 Thu Apr 26 10:36:28 2001
***************
*** 0 ****
--- 1,75 ----
+ +============================================================================+
+ | Ant doesn't regenerate the 2nd class found in a .java file |
+ +----------------------------------------------------------------------------+
+ | Bug #: 1540 Product: Ant |
+ | Status: NEW Version: 1.3 |
+ | Resolution: Platform: PC |
+ | Severity: Normal OS/Version: Windows NT/2K |
+ | Priority: Component: Build Process |
+ +----------------------------------------------------------------------------+
+ | Assigned To: [EMAIL PROTECTED] |
+ | Reported By: [EMAIL PROTECTED]
|
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ If I have two classes defined in a java source file and delete the ".class"
file
+ not having the same name as the ".java" file, ant will not regenerate the
second
+ class file when ant is run again.
+
+ Here is what I did...
+
+ Using the command:
+ ant -buildfile .\build.xml
+
+ and with the build.xml file containing:
+
+ #####
+ <!-- build.xml file for the ems_v01 project -->
+
+ <project name="emsv01" default="CompileAll" basedir=".">
+
+ <target name="CompileAll">
+ <!-- Compile entire source tree in debug mode -->
+ <javac srcdir="." debug="on">
+ </javac>
+
+
+ </target>
+
+ </project>
+ #####
+
+ I compiled the file "test.java" which was located in the same directory as
the
+ build.xml file. The "test.java" file contained:
+
+ ######
+ class test
+ {
+ }
+
+ class test2
+ {
+ }
+ ######
+
+ This produced the expected "test.class" and a "test2.class" file. I then
+ deleted the "test2.class" file and re-ran the ant command. I got the
following
+ output:
+
+ #######
+ Buildfile: .\build.xml
+
+ CompileAll:
+
+ BUILD SUCCESSFUL
+
+ Total time: 4 seconds
+ #######
+
+ but only the "test.class" file still existed in the directory. "test2.class"
+ was not recreated.
+
+ Besides using the not so wise convention of placing two or more classes in a
+ single java file, what am I doing wrong?