Bug 4066 - Ant task and classpath
Summary: Ant task and classpath
Status: RESOLVED WONTFIX
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.4
Hardware: Other All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on: 8895
Blocks:
  Show dependency tree
 
Reported: 2001-10-10 03:45 UTC by nicolas.mailhot
Modified: 2008-02-22 12:18 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nicolas.mailhot 2001-10-10 03:45:37 UTC
Hi,

I'd like to specify the classpath an <ant> task will use.
As far as I can see in the documentation, that's not possible.
Unfortunately some other ant tasks rely on the system classpath and won't run if
it's incomplete.

Shouldn't a nested <classpath> element be created ?
Comment 1 Jacob Kjome 2002-09-13 06:11:25 UTC
You are supposed to be able to create your own path elements such as 
<path id="build.classpath"> ... </path> and then pass that through using 
inheritRefs="true" or using a nested <reference id="build.classpath">.  
However, that doesn't seem to work.  However, stuff in $ANT_HOME/lib is 
available by default, so there is no particular reason to add the classpath 
attribute, but there is reason to make the existing constructs work properly.

Jake
Comment 2 Matt Benson 2004-04-21 15:19:30 UTC
This is not practical due to the fact that the <ant> task runs in the same VM 
as the invoking Ant process.  You should be able to achieve this behavior using 
a <java fork="true">.
Comment 3 Nicolas Mailhot 2004-04-21 15:29:20 UTC
Then why not create a classpath element that is an implicit fork ?
Comment 4 Matt Benson 2004-04-21 15:50:08 UTC
Other than the overhead/maintenance involved in creating and keeping up-to-date 
the code needed to launch Ant, and the fact that an alternative exists, none.
Comment 5 Jan Mat 2006-07-11 09:14:33 UTC
No arguments for over two years ...