Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Delivered-To: moderator for ant-user@jakarta.apache.org Received: (qmail 86643 invoked from network); 14 Feb 2001 10:42:51 -0000 Received: from natmail2.webmailer.de (HELO post.webmailer.de) (192.67.198.65) by h31.sny.collab.net with SMTP; 14 Feb 2001 10:42:51 -0000 Received: from nshome (p3EE2F3F4.dip.t-dialin.net [62.226.243.244]) by post.webmailer.de (8.9.3/8.8.7) with SMTP id LAA06019; Wed, 14 Feb 2001 11:43:00 +0100 (MET) Message-ID: <007b01c09673$112d70d0$0100280a@nshome> From: "Nico Seessle" To: Cc: "Vaughn Dickson" References: Subject: Re: javac taskdef recompiling up-to-date classes Date: Wed, 14 Feb 2001 11:44:09 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N ----- Original Message ----- From: "Vaughn Dickson" To: Sent: Wednesday, February 14, 2001 10:59 AM Subject: javac taskdef recompiling up-to-date classes > I'm using the javac taskdef to compile my project source, the target looks like > this: > srcdir="${src.dir}/${app.name}:${build.xmlc_source.dir}" > destdir="${build.classes}" > classpathref="build.classpath" > includes="**/*.java" > /> > This seems to be the typical "YGWYTATDNWYW"-Feature (You get what you tell ant, not what you want) Although you have not told us what the contents of src.dir and app.name are I will try to guess your problem.... If app.name contains the package you are using for your classes you should instead do If you have a sourcefile com.company.mylib.sub1.MyClass.java in "src" and wish to compile to "classes" the following happens if you specify 1. javac-task will find all your sources correctly 2. javac-task will strip basedir and srcdir from the absolute filename of each sourcefile and tries to find a file classes/sub1/MyClass.class. Since there is not and will never be such a file recompilation happens every time you call this. If you specify 1. javac-task will find all your sources correctly 2. javac-task will strip basedir and srcdir from the absolute filename of each sourcefile and tries to find a file classes/com/company/mylib/sub1/MyClass.class. This file exists and may be the same date than your sourcefile. Recompilation will not happen -> You get what you want. Nico