Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 78849 invoked by uid 500); 23 Jul 2001 20:31:28 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 78752 invoked from network); 23 Jul 2001 20:31:27 -0000 Date: 23 Jul 2001 20:31:30 -0000 Message-ID: <20010723203130.9978.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: ant-dev@jakarta.apache.org Cc: Subject: [Bug 2736] - Ant javac task has problems with dependencies X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2736 *** shadow/2736 Mon Jul 23 04:15:24 2001 --- shadow/2736.tmp.9973 Mon Jul 23 13:31:30 2001 *************** *** 2,9 **** | Ant javac task has problems with dependencies | +----------------------------------------------------------------------------+ | Bug #: 2736 Product: Ant | ! | Status: NEW Version: Nightly build | ! | Resolution: Platform: All | | Severity: Major OS/Version: All | | Priority: Other Component: Core tasks | +----------------------------------------------------------------------------+ --- 2,9 ---- | Ant javac task has problems with dependencies | +----------------------------------------------------------------------------+ | Bug #: 2736 Product: Ant | ! | Status: RESOLVED Version: Nightly build | ! | Resolution: WORKSFORME Platform: All | | Severity: Major OS/Version: All | | Priority: Other Component: Core tasks | +----------------------------------------------------------------------------+ *************** *** 167,170 **** the depend flag was also used in the build.xml file (see above) Best regards, ! Peter Van der Goten --- 167,228 ---- the depend flag was also used in the build.xml file (see above) Best regards, ! Peter Van der Goten ! ! ------- Additional Comments From nico@apache.org 2001-07-23 13:31 ------- ! See the description for tha javac task: ! ! "The source and destination directory will be recursively scanned for Java ! source files to compile. Only Java files that have no corresponding class file ! or where the class file is older than the java file will be compiled. ! ! Note: Ant uses only the names of the source and class files to find the classes ! that need a rebuild. It will not scan the source and therefor will have no ! knowledge about nested classes, classes that are named different from the ! source file and so on." ! ! If you call jikes and pass only the names of the files that are out of date - ! depend will not help you: ! ! "C:\temp\bug2736>type src\be\alcatel\test\TestConstsITF.java ! package be.alcatel.test; ! ! public interface TestConstsITF{ ! public static final int const1 = 11; ! } ! ! C:\temp\bug2736>jikes -depend -sourcepath %SRCDIR% -classpath .;%CLASSDIR%;c:\jd ! k131\jre\lib\rt.jar -d %CLASSDIR% %SRCDIR%\be\alcatel\test\TestConstsITF.java ! ! C:\temp\bug2736>java -cp classes be.alcatel.test.Test ! TestConstsITF.const1 = 10 ! const1 = 10 ! AnOtherTestConstsITF.const2 = 10 ! const2 = 10" ! ! Possible Solutions include: ! ! - Modify Ant to always pass all java-files it finds to the compiler (results in ! recompile everything) ! - Delete the target files before compiling (results in recompile everything) ! - Use the depend-task (find dependencies, delete files which should be ! recompiled although they are up-to-date (from a file-time perspective) and use ! javac to compile only missing/old files) ! ! This: ! ! ! ! ! ! ! ! ! ! should work for you. ! ! Nothing we can fix here, we could just slowdown ant. You are invited to come to ! ant-user if you have further questions regarding the proposed solution.