You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2009/09/04 17:41:52 UTC
DO NOT REPLY [Bug 47787] New: FTP Optional task is not found ONLY
WHEN run using Java libraries (org.apache.tools.ant.Project)
https://issues.apache.org/bugzilla/show_bug.cgi?id=47787
Summary: FTP Optional task is not found ONLY WHEN run using
Java libraries (org.apache.tools.ant.Project)
Product: Ant
Version: 1.6.5
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: regression
Priority: P2
Component: Optional Tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: milindnaik1@yahoo.com
--- Comment #0 from Milind Naik <mi...@yahoo.com> 2009-09-04 08:41:47 PDT ---
Ant FTP tasks succeeds when standalone ANT file is run via commandline
deliverying desired results. However, it fails when same build file is invoked
using org.apache.tools.ant.Project class and run through a java application.
Here are version:
Ant 1.6.5
Java 1.5
commons-net-1.4.1.jar
jakarta-oro-2.0.8.jar
Now Optionl jar Files are copied to ANT\lib directory and build script runs
successfully on commandline. The trouble starts with its invocation through
Java.
ould 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(UnknownElement.java:493)
at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:391)
at
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java: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.executeSortedTargets(Project.java:1216)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
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.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at com.jeppesen.avdocs.util.FireAnt.launchAntScript(FireAnt.java:83)
at
com.jeppesen.avdocs.generator.ContentFileGenerator.runAibstreamJob(ContentFileGenerator.java:334)
at
com.jeppesen.avdocs.generator.AirbusTest.testAibZipGeneration(AirbusTest.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
04-Sep-2009 17:38:25 com.jeppesen.avdocs.generator.ContentFileGenerator
runAibstreamJob
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 47787] FTP Optional task is not found ONLY WHEN
run using Java libraries (org.apache.tools.ant.Project)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47787
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #2 from Stefan Bodewig <bo...@apache.org> 2009-09-14 03:10:02 PDT ---
how are you invoking this through Java?
Have you made sure all the jars you have listed are on the CLASSPATH or the
classloader that loads the project class?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 47787] FTP Optional task is not found ONLY WHEN run using Java
libraries (org.apache.tools.ant.Project)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47787
J.M. (Martijn) Kruithof <jk...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution|--- |INVALID
--- Comment #3 from J.M. (Martijn) Kruithof <jk...@apache.org> ---
indeed, seems like a classpath problem. No information received in almost 3
years, please reopen with the requested information if necessary.
--
You are receiving this mail because:
You are the assignee for the bug.
DO NOT REPLY [Bug 47787] FTP Optional task is not found ONLY WHEN
run using Java libraries (org.apache.tools.ant.Project)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47787
--- Comment #1 from Milind Naik <mi...@yahoo.com> 2009-09-04 08:42:57 PDT ---
Please note, this does NOT fail over commandline. This fails ONLY when invoked
through Java.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.