> 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: [email protected]
> To: [email protected]
> 
> 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" <[email protected]> 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 via email to