You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by K R <kr...@gmail.com> on 2015/10/12 22:04:59 UTC
Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was
not found
What do I need to do to make this work see error below?
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-antrun-plugin:1.8:run (compile) on project
YT-100_ATU_Controller: An Ant BuildException has occured: Problem: failed
to create task or type scp
[ERROR] Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was
not found.
[ERROR] This looks like one of Ant's optional components.
[ERROR] Action: Check that the appropriate optional JAR exists in
[ERROR] -ANT_HOME\lib
[ERROR] -the IDE Ant configuration dialogs
[ERROR]
[ERROR] Do not panic, this is a common problem.
[ERROR] The commonest cause is a missing JAR.
[ERROR]
[ERROR] This is not a bug; it is a configuration problem
I have the dependency
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.53</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-jsch</artifactId>
<version>1.6.5</version>
</dependency>
<execution>
<id>compile</id>
<phase>package</phase>
<configuration>
<target>
<scp file="${project.artifactId}"
todir="${ftp-userid}@${ftp-server}:${deployment.dir}"
trust="true"
port="${ftp-port}"
password="${ftp-password}"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
RE: Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found
Posted by KRR001 <kr...@gmail.com>.
Thanks * are you sure that those two dependencies are declared within the plugin section of "maven-antrun-plugin” and not dependencies of your project - see https://maven.apache.org/plugins/maven-antrun-plugin/examples/customTasks.html
Fixed the problem.
-----Original Message-----
From: Siegfried Goeschl [mailto:siegfried.goeschl@it20one.com]
Sent: Monday, October 12, 2015 1:50 PM
To: Maven Users List <us...@maven.apache.org>
Subject: Re: Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found
Hi,
some thoughts along the line
* are you sure that those two dependencies are declared within the plugin section of "maven-antrun-plugin” and not dependencies of your project - see https://maven.apache.org/plugins/maven-antrun-plugin/examples/customTasks.html <https://maven.apache.org/plugins/maven-antrun-plugin/examples/customTasks.html>
* does the ant task work when being executed from ANT
* what I usually do is to use a dedicated stand-alone Ant script triggered by Maven
Cheers,
Siegfried Goeschl
> On 12 Oct 2015, at 22:04, K R <kr...@gmail.com> wrote:
>
> What do I need to do to make this work see error below?
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-antrun-plugin:1.8:run (compile) on
> project
> YT-100_ATU_Controller: An Ant BuildException has occured: Problem:
> failed to create task or type scp [ERROR] Cause: the class
> org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found.
> [ERROR] This looks like one of Ant's optional components.
> [ERROR] Action: Check that the appropriate optional JAR exists in
> [ERROR] -ANT_HOME\lib [ERROR] -the IDE Ant configuration dialogs
> [ERROR] [ERROR] Do not panic, this is a common problem.
> [ERROR] The commonest cause is a missing JAR.
> [ERROR]
> [ERROR] This is not a bug; it is a configuration problem
>
> I have the dependency
>
> <dependency>
> <groupId>com.jcraft</groupId>
> <artifactId>jsch</artifactId>
> <version>0.1.53</version>
> </dependency>
>
> <dependency>
> <groupId>ant</groupId>
> <artifactId>ant-jsch</artifactId>
> <version>1.6.5</version>
> </dependency>
>
>
> <execution>
> <id>compile</id>
> <phase>package</phase>
> <configuration>
> <target>
> <scp file="${project.artifactId}"
> todir="${ftp-userid}@${ftp-server}:${deployment.dir}"
> trust="true"
> port="${ftp-port}"
> password="${ftp-password}"/>
> </target>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found
Posted by Siegfried Goeschl <si...@it20one.com>.
Hi,
some thoughts along the line
* are you sure that those two dependencies are declared within the plugin section of "maven-antrun-plugin” and not dependencies of your project - see https://maven.apache.org/plugins/maven-antrun-plugin/examples/customTasks.html <https://maven.apache.org/plugins/maven-antrun-plugin/examples/customTasks.html>
* does the ant task work when being executed from ANT
* what I usually do is to use a dedicated stand-alone Ant script triggered by Maven
Cheers,
Siegfried Goeschl
> On 12 Oct 2015, at 22:04, K R <kr...@gmail.com> wrote:
>
> What do I need to do to make this work see error below?
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-antrun-plugin:1.8:run (compile) on project
> YT-100_ATU_Controller: An Ant BuildException has occured: Problem: failed
> to create task or type scp
> [ERROR] Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was
> not found.
> [ERROR] This looks like one of Ant's optional components.
> [ERROR] Action: Check that the appropriate optional JAR exists in
> [ERROR] -ANT_HOME\lib
> [ERROR] -the IDE Ant configuration dialogs
> [ERROR]
> [ERROR] Do not panic, this is a common problem.
> [ERROR] The commonest cause is a missing JAR.
> [ERROR]
> [ERROR] This is not a bug; it is a configuration problem
>
> I have the dependency
>
> <dependency>
> <groupId>com.jcraft</groupId>
> <artifactId>jsch</artifactId>
> <version>0.1.53</version>
> </dependency>
>
> <dependency>
> <groupId>ant</groupId>
> <artifactId>ant-jsch</artifactId>
> <version>1.6.5</version>
> </dependency>
>
>
> <execution>
> <id>compile</id>
> <phase>package</phase>
> <configuration>
> <target>
> <scp file="${project.artifactId}"
> todir="${ftp-userid}@${ftp-server}:${deployment.dir}"
> trust="true"
> port="${ftp-port}"
> password="${ftp-password}"/>
> </target>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
RE: Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp
was not found
Posted by Martin Gainty <mg...@hotmail.com>.
> Date: Mon, 12 Oct 2015 16:39:01 -0500
> Subject: Re: Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found
> From: waynefay@gmail.com
> To: users@maven.apache.org
>
> Maybe use org.apache.ant:ant-nodeps artifact instead (or in addition) to
> what you already listed (?).
>
> Version 1.8.1 seems to be the latest.
MG>check out this classloader load scenario from ant faq
put all external libraries you need in
CLASSPATH as well this is not what you want,
otherwise you wouldn't have found this FAQ entry. example located at https://ant.apache.org/manual/using.html
put all external libraries you need in
ANT_HOME/lib or .ant/lib. This
probably still isn't what you want, but you might reconsider
the .ant/lib option.Always start Ant with the -lib command line
switch and point to your external libraries (or the
directories holding them).remove the class that loads *your* external library from
the coreloader (if you already have containing jar declared in classpath)
ANT CLASSPATH IS NOW DEVOID OF $ANT_HOME/lib:
The wrapper script of Ant 1.6.x no longer adds the contents
of ANT_HOME/lib to CLASSPATH,
Classloader loading for CORELOADER Classloader:
instead Ant will create a classloader on TOP of the BOOTSTRAP
classloader -
let's call it the CORELOADER for the rest of
this answer - which holds the contents of
ANT_HOME/lib.
Ant's core and its tasks will be
loaded through CORELOADER classloader and not the bootstrap
classloader
https://ant.apache.org/faq.html
MG>clear?
>
> Wayne
> On Oct 12, 2015 1:05 PM, "K R" <kr...@gmail.com> wrote:
>
> > What do I need to do to make this work see error below?
> >
> > [ERROR] Failed to execute goal
> > org.apache.maven.plugins:maven-antrun-plugin:1.8:run (compile) on project
> > YT-100_ATU_Controller: An Ant BuildException has occured: Problem: failed
> > to create task or type scp
> > [ERROR] Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was
> > not found.
> > [ERROR] This looks like one of Ant's optional components.
> > [ERROR] Action: Check that the appropriate optional JAR exists in
> > [ERROR] -ANT_HOME\lib
> > [ERROR] -the IDE Ant configuration dialogs
> > [ERROR]
> > [ERROR] Do not panic, this is a common problem.
> > [ERROR] The commonest cause is a missing JAR.
> > [ERROR]
> > [ERROR] This is not a bug; it is a configuration problem
> >
> > I have the dependency
> >
> > <dependency>
> > <groupId>com.jcraft</groupId>
> > <artifactId>jsch</artifactId>
> > <version>0.1.53</version>
> > </dependency>
> >
> > <dependency>
> > <groupId>ant</groupId>
> > <artifactId>ant-jsch</artifactId>
> > <version>1.6.5</version>
> > </dependency>
> >
> >
> > <execution>
> > <id>compile</id>
> > <phase>package</phase>
> > <configuration>
> > <target>
> > <scp file="${project.artifactId}"
> > todir="${ftp-userid}@${ftp-server}:${deployment.dir}"
> > trust="true"
> > port="${ftp-port}"
> > password="${ftp-password}"/>
> > </target>
> > </configuration>
> > <goals>
> > <goal>run</goal>
> > </goals>
> > </execution>
> >
Re: Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp
was not found
Posted by Wayne Fay <wa...@gmail.com>.
Maybe use org.apache.ant:ant-nodeps artifact instead (or in addition) to
what you already listed (?).
Version 1.8.1 seems to be the latest.
Wayne
On Oct 12, 2015 1:05 PM, "K R" <kr...@gmail.com> wrote:
> What do I need to do to make this work see error below?
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-antrun-plugin:1.8:run (compile) on project
> YT-100_ATU_Controller: An Ant BuildException has occured: Problem: failed
> to create task or type scp
> [ERROR] Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was
> not found.
> [ERROR] This looks like one of Ant's optional components.
> [ERROR] Action: Check that the appropriate optional JAR exists in
> [ERROR] -ANT_HOME\lib
> [ERROR] -the IDE Ant configuration dialogs
> [ERROR]
> [ERROR] Do not panic, this is a common problem.
> [ERROR] The commonest cause is a missing JAR.
> [ERROR]
> [ERROR] This is not a bug; it is a configuration problem
>
> I have the dependency
>
> <dependency>
> <groupId>com.jcraft</groupId>
> <artifactId>jsch</artifactId>
> <version>0.1.53</version>
> </dependency>
>
> <dependency>
> <groupId>ant</groupId>
> <artifactId>ant-jsch</artifactId>
> <version>1.6.5</version>
> </dependency>
>
>
> <execution>
> <id>compile</id>
> <phase>package</phase>
> <configuration>
> <target>
> <scp file="${project.artifactId}"
> todir="${ftp-userid}@${ftp-server}:${deployment.dir}"
> trust="true"
> port="${ftp-port}"
> password="${ftp-password}"/>
> </target>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
>