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 <[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>
