Bug 8722 - allow setting class path for optional tasks via build file
Summary: allow setting class path for optional tasks via build file
Status: RESOLVED DUPLICATE of bug 28228
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: 1.4.1
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: 1.8.0
Assignee: Ant Notifications List
Depends on:
Reported: 2002-05-02 02:42 UTC by Daniel B.
Modified: 2008-11-14 06:23 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Daniel B. 2002-05-02 02:42:06 UTC
According to the Library Dependencies section of the Installing
Ant page of the Ant User Manual, there are two options for
providing external library Jar files to Ant:

- copying the Jar file to Ant's lib directory

- adding the Jar file's pathname to the system CLASSPATH environment
  variable before running Ant's wrapper script

(Apparently, one can also use $HOME/.antrc to set the CLASSPATH
environment for the wrapper script.)

None of these methods allow the user to define the class paths
for external libraries in or via the Ant build file.

Given that users can use properties to specify where to find Jar
files for libraries used by their applications, and can set
property values to select different versions of those libraries,
users might also want to use properties to specify the location
of libraries needed by optional tasks.

Maybe there should be some kind of task that lets the user
specify a class path that is used to look for classes needed
by optional tasks.
Comment 1 Diane Holt 2002-05-02 19:14:03 UTC
If it's an optional task then, presumably, it's being <taskdef>'d, and 
<taskdef> does allow for classpath to be specified. Is that not sufficient for 
your need?
Comment 2 Larry Shatzer 2003-10-24 16:25:17 UTC
There is also -lib now.

Recommend for closing.
Comment 3 Stefan Bodewig 2008-11-14 06:23:14 UTC

*** This bug has been marked as a duplicate of bug 28228 ***