ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <co...@cortexebusiness.com.au>
Subject Re: getting classpath of current task (inside the task)
Date Thu, 26 Feb 2004 01:01:02 GMT
On Thu, 26 Feb 2004 00:50:10 +0000, Steve Loughran <steve_l@iseran.com> 
wrote:

>
> I have this custom task, which is loaded with a classloader that can 
> declare not only the files containing the task, but implementing classes:
>
>      <path id="smartfrog.tasks.classpath">
>        <path refid="smartfrog.classpath"/>
>        <pathelement location="${smartfrog.tasks.jar}"/>
>      </path>
>      <typedef
>        resource="org/smartfrog/tools/ant/tasks.properties"
>        classpathref="smartfrog.tasks.classpath"
>        />
>
>
> Only the task itself spawns a new JVM. How do I pass the classpath of 
> the task itself down to the jvm? I cant use java.class.path as that is 
> the classpath of ant, not the custom task. Do we explicitly or 
> implicitly save the path used to declare a task?
>

If it is loaded through an AntClassLoader, you can ask that loader for 
it's effective classpath.

Conor

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message