Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 9005 invoked from network); 2 Dec 2002 23:33:09 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 2 Dec 2002 23:33:09 -0000 Received: (qmail 24725 invoked by uid 97); 2 Dec 2002 23:34:09 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 24608 invoked by uid 97); 2 Dec 2002 23:34:08 -0000 Mailing-List: contact ant-user-help@jakarta.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 ant-user@jakarta.apache.org Received: (qmail 24514 invoked by uid 98); 2 Dec 2002 23:34:08 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) From: =?iso-8859-1?Q?=D8yvind_Roth?= To: "Mailing List Ant User" Subject: no optional.jar in %ANT_HOME%/lib implies regexp doesn't work Date: Tue, 3 Dec 2002 00:32:52 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Goal: ----- Remove as many jars as possible from the classpath before calling %ANT_HOME%\bin\ant.bat Reasons: -------- 1) The command input line becomes too long (java has a limit of about 2KB). 2) Loosing control over what actual targets through the build process really need. 3) a) Want the batch startup routines calling ant be as clean and simple as possible b) Want the batch startup routines to call ant from a tabula rasa as far as possible b) Want to do as much as possible within the ant build scripts themselves Context: -------- Windows 2000 JDK 1.3.1_02 Ant 1.5.1 Done: ----- Removed optional.jar from %ANT_HOME%/lib. Taskdef'ed the tasked needed from optional.jar explicitly. Put optional.jar in another directory referred to within the taskdef tasks. All this is done according to FAQ: http://jakarta.apache.org/ant/faq.html#delegating-classloader Experiencing: ------------- JUnit, which for most people is the problem when trying to reach for the same goal, works fine!! (Still according to FAQ) Coming to regular expressions, things won't work (move-mapper-regexp). Discussion and questions: ------------------------- When scrutinizing the optional.jar, I see that the regexp wrapping things (org.apache.tools.ant.util.regexp.*) are packed here. According to my understanding of the classloader hierarchy this would imply that the same classloader that has ant.jar in its classpath must also have the optional.jar in its classpath (as the move task is among the core ones) 1) Have I understoood correctly? 2) Which again implies that the saltos made to remove optional.jar and taskdef'ing JUnit are invane as the optional.jar must be put back in place? 3) The problem is unsolvable? 4) The problem could be solved by removing from optional.jar the org.apache.tools.ant.util.regexp.* classes and put them in my_optional.jar and put my_optional.jar in the initial classpath? (I haven't tried out this one, as this is not a way I want to work with thirdparty tools) 5) Is there an elegant solution? On beforehand, thanks to you experts out there... -- To unsubscribe, e-mail: For additional commands, e-mail: