Ant FTP task NoClassDefFoundError



Hi all!

I have created a pretty big and working build.xml file. The only thing
I need to be happy is a deploy task to put a jar on a remote server
like:

<target name="deploy" depends="compile-nodebug">
<jar destfile="${deploy.file}" basedir="${bin.dir}">
<manifest>
<attribute name="Main-Class" value="${main.class.name}"/>
<attribute name="Built-By" value="${author.name}"/>
<attribute name="Built-On" value="${datetime.iso}"/>
</manifest>
<!-- include all file types recursively (default excludes sub
dirs without includable files) -->
<!-- note: filesets don't seem to be able to handle property
references! -->
<fileset dir="." includes="images/**/*.gif,images/**/*.jpg,images/
**/*.png" excludes="images/orig/*"/>
<fileset dir="." includes="languages/**/*.properties"/>
<fileset dir="." includes="lib/**/*.jar"/>
</jar>
<ftp server="${remote.server}"
userid="${remote.username}"
password="${remote.password}"
remotedir="${remote.deploy.dir}"
binary="true"
verbose="true">
<fileset dir="." includes="${deploy.file}"/>
</ftp>
</target>

The jar task does nothing special but to create the jar file ($
{deploy.file}) to be uploaded to the remote server. When executing the
<ftp> task the following error appears:

Could not create type ftp due to java.lang.NoClassDefFoundError: org/
apache/commons/net/ftp/FTPClientConfig

I checked my Ant installation, I downloaded the latest 1.7 some weeks
ago (binary zip) and the optional jars all seem to be in the Ant lib
subdir (such as ant-commons-net.jar).

I also set the ANT_HOME env var to point to the Ant root but that
didn't help.

How do I fix this? What's wrong anyway?

TIA
Karsten

.



Relevant Pages

  • Re: Giving an application a window icon in a sensible way
    ... (revenue-generating, no doubt) ... From those who recommended getting Ant, ... I think when you tell Eclipse to make a JAR, ...
    (comp.lang.java.programmer)
  • Re: applet signing library
    ... >Hi i posted a while agoabout signing java applets. ... >with a gui front end that can jar, ... Here is an ant script to compile, jar, and sign an applet. ...
    (comp.lang.java.programmer)
  • Re: configuration management application
    ... The usual mode is to create a new JAR for a new build. ...  That is not an Ant ... Ant /could/ be set up to modify the properties file, ... modification to multiple targets. ...
    (comp.lang.java.programmer)
  • Re: replace files in a jar...
    ... Is there a way to get ant to do ... > inside a jar without recreating the complete jar. ... A search of the Ant archives ... Or maybe someone will come along who has used the update flag in a Jar task ...
    (comp.lang.java.programmer)
  • Re: Build slices in Java and Eclipse
    ... > one project i.e. producing a server jar, a client jar and a general ... > GUI driven, and, one that can deal with building RMI stubs etc. ... Most of that sounds like a job for Ant; I've never used RMI so I'm not sure ... An Ant plugin comes standard with Eclipse. ...
    (comp.lang.java.programmer)