Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found

classic Classic list List threaded Threaded
5 messages Options
K R
Reply | Threaded
Open this post in threaded view
|

Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found

K R
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>
Reply | Threaded
Open this post in threaded view
|

Re: Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found

Siegfried Goeschl-3
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 <[hidden email]> 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>

Reply | Threaded
Open this post in threaded view
|

Re: Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found

Wayne Fay
In reply to this post by K R
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" <[hidden email]> 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>
>
Reply | Threaded
Open this post in threaded view
|

RE: Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found

mgainty



> 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: [hidden email]
> To: [hidden email]
>
> 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" <[hidden email]> 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>
> >
     
K R
Reply | Threaded
Open this post in threaded view
|

RE: Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found

K R
In reply to this post by Siegfried Goeschl-3
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:[hidden email]]
Sent: Monday, October 12, 2015 1:50 PM
To: Maven Users List <[hidden email]>
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 <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]