You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Kevin Jackson <fo...@gmail.com> on 2007/01/16 10:13:52 UTC
& jsch & classpath loader issues
Hi,
I'm working with jsch and ant and I think that the description in the
FAQ for ant 1.7 is wrong.
<quote>
As of Ant 1.7 <junit> no longer requires you to have junit.jar in
Ant's startup classpath even if ant-junit.jar is present there.
</quote>
I'm essentially doing the same thing with the scp task and if I have
ant-jsch.jar in the startup classpath for ant, then it cannot locate
the main jsch-0.1.2x.jar in the nested <classpath> element
eg
<path id="jsch.path">
<pathelement location="${src.tools.dir}/jsch/ant-jsch.jar" />
<pathelement location="${src.tools.dir}/jsch/jsch-0.1.24.jar" />
</path>
<taskdef name="scp"
classname="org.apache.tools.ant.taskdefs.optional.ssh.Scp"
classpathref="jsch.path"/>
this gives me a ClassNotFoundException for
com/jcraft/jsch/UserInfo.class, however if I delete the ant-jsch.jar
from my dist/lib (ANT_HOME/lib), then the taskdef works as expected.
This seems to be the behaviour described for ant 1.6 in the FAQ, but
I'm running svn trunk compiled today.
Is the FAQ correct in that <junit> & <style> work exactly as described
for 1.7, but all other optional tasks still work in a 1.6 style, or am
I correct in assuming that if <junit> works as described in the FAQ,
then <scp> should behave in an identical way?
Kev
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: & jsch & classpath loader issues
Posted by Kevin Jackson <fo...@gmail.com>.
> Built in tasks needs to be explicitly written to use reflection to pick
> up libraries this way; so far only junit has been done. As for style;
> that is compiled against the xsl interfaces, and uses the standard
> factory process to pick up an implementation.
>
Thanks for the explanation - I was being dumb as usual
Kev
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: & jsch & classpath loader issues
Posted by Peter Reilly <pe...@gmail.com>.
On 1/16/07, Steve Loughran <st...@apache.org> wrote:
> Kevin Jackson wrote:
>
> >
> > Is the FAQ correct in that <junit> & <style> work exactly as described
> > for 1.7, but all other optional tasks still work in a 1.6 style,
>
> yes
>
> > or am
> > I correct in assuming that if <junit> works as described in the FAQ,
> > then <scp> should behave in an identical way?
> >
>
> Built in tasks needs to be explicitly written to use reflection to pick
> up libraries this way; so far only junit has been done.
In Ant 1.7.1, <script> also works the same way as <junit>
Peter
> As for style;
> that is compiled against the xsl interfaces, and uses the standard
> factory process to pick up an implementation.
>
> -steve
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: & jsch & classpath loader issues
Posted by Steve Loughran <st...@apache.org>.
Kevin Jackson wrote:
>
> Is the FAQ correct in that <junit> & <style> work exactly as described
> for 1.7, but all other optional tasks still work in a 1.6 style,
yes
> or am
> I correct in assuming that if <junit> works as described in the FAQ,
> then <scp> should behave in an identical way?
>
Built in tasks needs to be explicitly written to use reflection to pick
up libraries this way; so far only junit has been done. As for style;
that is compiled against the xsl interfaces, and uses the standard
factory process to pick up an implementation.
-steve
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org