Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / March 2004

Tip: Looking for answers? Try searching our database.

ant scp task

Thread view: 
hugo - 23 Mar 2004 19:54 GMT
I get the following error when I try to use the scp task in ant 1.6.1.
Does anyone have experience using scp in ant? When I check libarary
dependencies in the manual it said jsch.jar was needed for this task.
I have ant-jsch.jar in the usual ant/lib directory.

Thanks

BUILD FAILED
C:\dev\java\projects\build.xml:275: Could not create task or type of
type: scp.

Ant could not find the task or a class this task relies upon.

This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
- You have misspelt 'scp'.
  Fix: check your spelling.
- The task needs an external JAR file to execute
  and this is not found at the right place in the classpath.
  Fix: check the documentation for dependencies.
  Fix: declare the task.
- The task is an Ant optional task and optional.jar is absent
  Fix: look for optional.jar in ANT_HOME/lib, download if needed
- The task was not built into optional.jar as dependent
  libraries were not found at build time.
  Fix: look in the JAR to verify, then rebuild with the needed
  libraries, or download a release version from apache.org
- The build file was written for a later version of Ant
  Fix: upgrade to at least the latest release version of Ant
- The task is not an Ant core or optional task
  and needs to be declared using <taskdef>.

Remember that for JAR files to be visible to Ant tasks implemented
in ANT_HOME/lib, the files must be in the same directory or on the
classpath

Please neither file bug reports on this problem, nor email the
Ant mailing lists, until all of these causes have been explored,
as this is not an Ant bug.
       at org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownElement.java:477)
       at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:385)
       at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:152)
       at org.apache.tools.ant.Task.perform(Task.java:363)
       at org.apache.tools.ant.Target.execute(Target.java:301)
       at org.apache.tools.ant.Target.performTasks(Target.java:328)
       at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
       at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
       at org.apache.tools.ant.Main.runBuild(Main.java:632)
       at org.apache.tools.ant.Main.startAnt(Main.java:183)
       at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
       at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
nobody important - 24 Mar 2004 10:14 GMT
RTFM

" Note: This task depends on external libraries not included in the Ant
distribution. See Library Dependencies for more information. This task has
been tested with jsch-0.1.2 to jsch-0.1.9. "

You need to put the " jsch.jar " in the ant library dir - or a reference to
it. You can get the source for the jar at
http://www.jcraft.com/jsch/index.html - build the source into a jar by
running ant in the directory where you unzip the source and finally move the
jar from the "dist" dir into ant's library dir.

/nobody important

> I get the following error when I try to use the scp task in ant 1.6.1.
> Does anyone have experience using scp in ant? When I check libarary
[quoted text clipped - 39 lines]
:477)
>         at
org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:385)
>         at
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:152)
>         at org.apache.tools.ant.Task.perform(Task.java:363)
>         at org.apache.tools.ant.Target.execute(Target.java:301)
[quoted text clipped - 5 lines]
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
hugo - 27 Mar 2004 18:17 GMT
Thanks for your help. I was confused by the fact that the Ant lib
directory already had a jar called ant-jsch.jar. But your suggestion
worked - get the latest jsch-x.y.z.jar file, rename it jsch.jar and
put it in the Ant install jar directory.

> RTFM
>
[quoted text clipped - 66 lines]
> >         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
> >         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.