call E:\dev\bea\weblogic92\server\bin\ant.bat

  • Sonoerin

    Sonoerin - 2007-09-26

    I am trying to run the following both on the command line and in Eclipse:

    <scp trust="true" file="${archive.dir}/${}" todir="${userName}:${password}@${ip}:/export/home/dev/deployment"/>

    I have the latest ANT downloaded as C:\dev\apache-ant-1.7.0
    In eclipse I have the ANT path set and I can see the ant-jsch.jar in the list
    When I run this from the command line I use:
    C:\&gt;C:\dev\apache-ant-1.7.0\bin\ant -buildfile C:\dev\javadev\R21Web\Ear\build.xml deployToTest

    Both return an error message:
    C:\dev\javadev\R21Web\Ear\build.xml:180: Problem: failed to create task or type scp
    Cause: Could not load a dependent class com/jcraft/jsch/UserInfo
           It is not enough to have Ant's optional JARs
           you need the JAR files that the optional tasks depend upon.
           Ant's optional task dependencies are listed in the manual.
    Action: Determine what extra JAR files are needed, and place them in one of:
            -C:\Documents and Settings\Dev\.ant\lib
            -a directory added on the command line with the -lib argument

    Do not panic, this is a common problem.
    The commonest cause is a missing JAR.

    This is not a bug; it is a configuration problem

    However, if the jar file is in the ANT_PATH and included in the eclipse path, why does it not pick up this particular file?  I do not see a class by the nameof UserInfo. However, if I download the source I see but not a that is referenced in the Ant jar.

    • Sonoerin

      Sonoerin - 2007-09-26

      I think I answered my own question.  I build the src into a jar called jsch.jar and added it to my %ANT_HOME%\lib and then the command line seems to have worked.  From what I had read, I thought everything I needed was in the jar file included with Apache, I guess not.


Log in to post a comment.