ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Z <mpc8...@gmail.com>
Subject FTP Task doesn't work with ANT with all JARs included
Date Thu, 27 Sep 2007 01:32:36 GMT
Hi

Platform - windows XP
Env Variables - 
name - ANT_HOME          Value - C:\apache-ant-1.6.2 
name - JAVA_HOME        Value - C:\Program Files\Java\jdk1.5.0_12 
name - PATH                   Value -  C:\Program
Files\Java\jdk1.5.0_12\lib;%ANT_HOME%\bin 


I've downloaded and dropped the following jar files and copied them 
into C:\apache-ant-1.6.2\lib folder. 
I didn't do any command line compilation. I read elsewhere that I 
don't have to do that. 


jakarta-ant-1.4.1-optional.jar 
common-net-1.4.1.jar 
jakarta-oro-2.0.8.jar 
NetComponents.jar 


I've followed all internet instructions to solve this problem, yet it 
still doesn't work. 
What do I do wrong ? I need step by step at this point from the gurus 
here as I don't have much time 
to debug. 
Any help is appreciated. 



$ ant -debug
Apache Ant version 1.6.2 compiled on July 16 2004
Buildfile: build.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.5 in: c:\Program Files\Java\jdk1.5.0_12\jre
Detected OS: Windows XP
Adding reference: ant.ComponentHelper
Setting ro project property: ant.version -> Apache Ant version 1.6.2
compiled on
 July 16 2004
Setting ro project property: ant.file -> c:\Documents and
Settings\ABC\Desktop\imdm5\build.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile C:\Documents and Settings\ABC\Desktop\imdm5\build.xml with
URI =
file:///C:/Documents%20and%20Settings/ABC/Desktop/imdm5/build.xml

Setting ro project property: ant.project.name -> Example Application
Build
Adding reference: Example Application Build
Setting ro project property: ant.file.Example Application Build ->
C:\Documents
and
Settings\ABC\Desktop\imdm5\build.xml
Project base dir set to: C:\Documents and
Settings\ABC\Desktop\imdm5
 +Target:
 +Target: testftp
Build sequence for target `testftp' is [testftp]
Complete build sequence is [testftp, ]

testftp:
Setting project property: linpac1 -> 192.168.100.191
Setting project property: linpac2 -> 192.168.100.192
Setting project property: ap1 -> sunmdm6
Setting project property: ap2 -> sunmdm10
Setting project property: db1 -> linpac4
Setting project property: username -> su-mdm
Setting project property: password -> find .
Setting project property: username_db -> su-rds
Setting project property: password_db -> doongo411
Setting project property: oracle_username -> oracle
Setting project property: oracle_password -> innopath
Could not load a dependent class (org/apache/tools/ant/util/Retryable)
for type
ftp

BUILD FAILED
C:\Documents and Settings\ABC\Desktop\imdm5\build.xml:20: Could not create
task or type of type: ftp.

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 'ftp'.
   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 the JAR file and/or libraries
     implementing the functionality were not found at the time you
     yourself built your installation of Ant from the Ant sources.
   Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
     task and make sure it contains more than merely a
META-INF/MANIFEST.MF.
     If all it contains is the manifest, then rebuild Ant with the
needed
     libraries present in ${ant.home}/lib/optional/ , or alternatively,
     download a pre-built 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>.
 - You are attempting to use a task defined using
    <presetdef> or <macrodef> but have spelt wrong or not
   defined it at the point of use

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(UnknownEleme
nt.java:488)
        at
org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:39
1)
        at
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.jav
a:158)
        at org.apache.tools.ant.Task.perform(Task.java:363)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at org.apache.tools.ant.Main.runBuild(Main.java:673)
        at org.apache.tools.ant.Main.startAnt(Main.java:188)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

Total time: 0 seconds

$

Build.xml file
===============
<project name="Example Application Build" default="testftp" basedir=".">
	<!-- Compile the stand-alone application -->
	<target name="testftp">
		<property name="linpac1" value="192.168.100.191"/>
		<property name="linpac2" value="192.168.100.192"/>
		<property name="ap1" value="sunmdm6" />
		<property name="ap2" value="sunmdm10" />
		<property name="db1" value="linpac4" />
		<property name="username" value="su-mdm"/>
		<property name="password" value="xxx"/>
		<property name="username_db" value="su-rds"/>
		<property name="password_db" value="xxx"/>
		<property name="oracle_username" value="oracle"/>
		<property name="oracle_password" value="xxx"/>
		<ftp action="get"
			server="sunmdm6"
			remotedir="."
			userid="${username}"
			password="${password}"
			skipFailedTransfers="true">
			<fileset dir=".">
				<include name="*.txt"/>
			</fileset>
		</ftp>


		<echo message="ftp done"/>
	</target>
</project>





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message