ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@gmx.de>
Subject Re: Modifying Ant classpath inside build.xml
Date Thu, 05 May 2005 13:01:16 GMT
Hello Nicolas,

you can do this by adding a <taskdef/> invocation in your build file for the
ssh task.

It is possible (I am not sure) that you will have to also move away the
ant-jsch.jar file from $ANT_HOME/lib to achieve what you want.

So assuming you are removing ant-jsch.jar from $ANT_HOME/lib and putting it
in the directory of your buildfile; and assuming that the directory of your
buildfile is the base directory of your project, this could work :

<taskdef name="sshexec"
classname="org.apache.tools.ant.taskdefs.optional.ssh.SSHExec"
classpath="jsch.jar;ant-jsch.jar"/>

Cheers,

Antoine


> Hi,
> 
> In my build.xml, I am using the <scp> task which requires jsch.jar in 
> the classpath.
> I have put jsch.jar in the same directory as build.xml.
> I would like Ant to add it to its classpath inside build.xml, is it 
> possible ?
> 
> I don't want to use the classic solutions to add a .jar in Ant 
> classpath :
> - put the jar in Ant lib directory
> - add a -lib flag on the command line
> - modify the CLASSPATH environment variable
> - create a system dependent script to run Ant
> 
> I ask this because the files are stored under CVS, and I would like 
> that everyone checking them out could run the build without having to 
> configure something else.
> 
> Thanks in advance,
> Nicolas

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


Mime
View raw message