Sagewire Logo

Ant FTP task NoClassDefFoundError

2 Message(s) by 2 Author(s) originally posted in java software tools


From: Karsten Wutzke Date:   Wednesday, April 25, 2007
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 type s recursively (default excludes sub
dirs without includable files) -->

<!-- note: filesets do not 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 doesn'thing 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:

Couldn't create type ftp due to JAVA.lang.NoClassDefFoundError: org/
apache/commons/net/ftp/FTP ClientConfig

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
did not help.

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

TIA
Karsten


From: Rob Seegel Date:   Tuesday, May 15, 2007
wrote in message:

Couldn't 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).



Hello Karsten,

That is not sufficient. ant-commons-net only contains ant-specific code
such as taskdef and other related helper classes that depend on other
external libraries. You still require commons-net 1.4.0 and jakarta-oro
2.0.8 or later in order to use the FTP task. The Task docs link to the
Library Dependencies.

Regards,

Rob



Next Message: To Get Class Information


Blogs related to Ant FTP task NoClassDefFoundError

released ap tests
import relaesed ap tests javax. mail. import javax. swing. import javax. mail. import javax. microedition. lcdui. public class OriginalObj private java. lang. NoClassDefFoundError:. The cause of performance tuning in integration or ...

Eclipse, servicegen and ANT
After this step when I ran I ran into an odd error Buildfile: C:\Work\JSSE-EJB.xml BUILD FAILED: java.lang.NoClassDefFoundError: com/oroinc/net/ftp/FTP Total time: 78 milliseconds I was under the impression that this is a legacy ...

Ant FTP task NoClassDefFoundError
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 ...

Ant FTP task NoClassDefFoundError
Summary: I need to be happy is a deploy task to put a jar on a remote server ... Could not create type ftp due to java.lang.NoClassDefFoundError: ... I checked my Ant installation, I downloaded the latest 1.7 some weeks ...


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional