ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: specifying location of an external library within build.xml
Date Sat, 04 Nov 2006 22:34:36 GMT
On 11/3/06, asgeir <villur@gmail.com> wrote:
> Hello All,
>
> Is there a way to specify the location of an external library for an
> optional task (jsch.jar in my case) from within build.xml, or to change the
> order of classes being loaded?
You can use the classloader task
from:
http://enitsys.sourceforge.net/ant-classloadertask/

Peter

>
> Here's what I'm trying to do:
> build.xml contains <scp> and <sshexec> tasks, so I provide jsch.jar and
> other libraries in the same directory together with build.xml.
> the following works fine with Ant 1.5: build.xml checks for current ant
> version and if it is 1.5 it does <taskdef name="scp"> with custom classpath
> containing ant-jsch.jar (from 1.6), jsch.jar, etc.
>
> Class org.apache.tools.ant.taskdefs.optional.ssh.Scp loaded from ant loader
> Finding class com.jcraft.jsch.UserInfo
> Class com.jcraft.jsch.UserInfo loaded from ant loader
>
> However, the same build fails with Ant 1.6, with or without <taskdef>:
>
> Class org.apache.tools.ant.taskdefs.optional.ssh.Scp loaded from parent
> loader (parentFirst)
> A class needed by class
> org.apache.tools.ant.taskdefs.optional.ssh.Scpcannot be found:
> com/jcraft/jsch/UserInfo
>
> I cannot modify the standard Ant installation (e.g. put jsch.jar in ant lib
> directory, or remove ant-jsch.jar), or add command-line flags, or modify
> system environment variables, etc.: the script has to run with default Ant
> on different systems. Unfortunately, currently it only runs with Ant 1.5 and
> not 1.6.

>
> Thanks in advance!
>
>

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


Mime
View raw message