Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 50103 invoked from network); 2 Aug 2004 09:27:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Aug 2004 09:27:05 -0000 Received: (qmail 13045 invoked by uid 500); 2 Aug 2004 09:26:56 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 13005 invoked by uid 500); 2 Aug 2004 09:26:55 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 12991 invoked by uid 99); 2 Aug 2004 09:26:55 -0000 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=HTML_50_60,HTML_MESSAGE X-Spam-Check-By: apache.org Received: from [83.241.130.35] (HELO hercules.micronic.se) (83.241.130.35) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 02 Aug 2004 02:26:52 -0700 Received: by hercules.micronic.se with Internet Mail Service (5.5.2657.72) id ; Mon, 2 Aug 2004 11:26:38 +0200 Message-ID: From: Klas Eriksson To: 'Ant Users List' Subject: RE: ant/javac prepends destdir to classpath Date: Mon, 2 Aug 2004 11:26:38 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C47872.CFFE4950" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C47872.CFFE4950 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Hi I guess 'exclude' works on source code and doesn't operate on the = classpath. In my real-world example I have a couple of packages that should be stand-alone and re-usable, for example se.micronic.util1 and util2: =20 To rewrite the rule like =20 is a bad idea. Javac is greedy and will automatically accept any = strange dependencies to other code. To combine with 'exclude' is a bad idea too. Then, build.xml would be = very hard to maintain. Each time anyone adds a package, the build.xml would need to = be updated to make sure util1 and util2 don't depend on the new pkg:( The cmd-line msdog>javac -classpath C:\work\3rdpartyjars\castor-xml.jar -sourcepath SRC/se/micronic/util1 SRC/se/micronic/util1/*.java works fine. Seems wrong not to be able to use ant/javac for pure compilation. I could use ant/exec:( /klas -----Original Message----- From: mail.laconiadatasystems.com = [mailto:webmaster@laconiadatasystems.com]=20 Sent: Saturday, July 31, 2004 3:07 PM To: Ant Users List Subject: Re: ant/javac prepends destdir to classpath Klas- Does the same hold true if you use package exclude and package include = ? replik vars=E5god, -martin ----- Original Message ----- From: "Klas Eriksson" To: Sent: Thursday, July 29, 2004 2:25 AM Subject: ant/javac prepends destdir to classpath > Hi > > I have illegal code, A.java, that doesn't compile using 'javac' = manually at > cmd-line. > Fine. > > But when I use ant/javac A.java compiles, and that's wrong since it = refers > to a package it shouldn't be able to access. (This package is = available for > other code in directory X.) > The problem is that ant/javac seems to automatically prepend the > destdir=3D"X" to the classpath when compiling. > Is this a bug or how to I prevent ant/javac to improvise its own classpath? > > When i run "ant -verbose" I clearly see that the directory "X" is prepended > to the classpath by ant. > The problem is both in ant v1.5 and v1.6. > > /klas > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org ------_=_NextPart_001_01C47872.CFFE4950--