ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From √ėyvind Roth <>
Subject no optional.jar in %ANT_HOME%/lib implies regexp doesn't work
Date Mon, 02 Dec 2002 23:32:52 GMT
Remove as many jars as possible from the classpath before calling

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
3) a) Want the batch startup routines calling ant be as clean and simple as
   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

Windows 2000
JDK 1.3.1_02
Ant 1.5.1

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:

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
(*) 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* 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: <>

View raw message