Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ant-dev] Add ant-contrib to eclipse 3.1


Christoph,

On Eclipse 3.1 I have had no problems using Ant contrib.

I use Window-Preferences-Ant-Runtime-Classpath -> Add External JARs - Global
Entries(pointed to location of ant-contrib.jar on HD)
and using your build file (slightly modified to search for gif files)

<project default="for">
       
        <target name="for">
                <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
                <property name="fla.dir" location="C:\Darins"/>

                <for param="filename">
                                 <fileset dir="${fla.dir}" id="id">
                                                  <include name="*.gif"/>
                                 </fileset>
                                 <sequential>
                                                  <echo>@{filename}</echo>
                                 </sequential>
                </for>
        </target>

</project>

 I get:

Buildfile: c:\darins\workspaces\llo\TestBed\for.xml
for:
     [echo] C:\Darins\Retainer.gif
     [echo] C:\Darins\RetainerEnd.gif
     [echo] C:\Darins\context_launch.gif
BUILD SUCCESSFUL
Total time: 901 milliseconds

I am not sure what is wrong with your setup

Darins

Note: in the future user questions should be asked in the Eclipse newsgroups forum (eclipse.tools.jdt or eclipse.platform)



"christoph atteneder [celumSOLUTIONS]" <christoph.atteneder@xxxxxxxxxxxxxxxxxx>
Sent by: platform-ant-dev-bounces@xxxxxxxxxxx

07/13/2005 03:01 AM

Please respond to
"Eclipse Ant integration developers list."

To
<platform-ant-dev@xxxxxxxxxxx>
cc
Subject
[platform-ant-dev] Add ant-contrib to eclipse 3.1





Hi all,

I want to use ant-contrib in my ant task and tried following ways to
include ant-contrib(1.0b2) to eclipse(3.1) without success:

Window-Preferences-Ant-Runtime-Classpath -> Add External JARs - Ant Home
Entries (pointed to location of ant-contrib.jar on HD)

or

Window-Preferences-Ant-Runtime-Classpath -> Add External JARs - Global
Entries(pointed to location of ant-contrib.jar on HD)

I also inserted ant-contrib.jar to the lib directory
C:\Programme\Eclipse\plugins\org.apache.ant_1.6.5\lib\

in my build.xml:
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<for param="filename">
                <fileset dir="${fla.dir}" id="id">
                                 <include name="*.fla"/>
                </fileset>
                <sequential>
                                 <echo>@{filename}</echo>
                </sequential>
</for>
I got following Error:

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 'for'.
  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.

Any ideas?

All the best,

Christoph
_______________________________________________
platform-ant-dev mailing list
platform-ant-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-ant-dev


Back to the top