Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Error while building project in eclipse using ANT-compiler attribute

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Thanked 0 Times in 0 Posts

    Default Error while building project in eclipse using ANT-compiler attribute

    BUILD FAILED: 13: Could not create task or type of type: attribute-compiler.

    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 'attribute-compiler'.
    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

  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Thanked 833 Times in 772 Posts
    Blog Entries

    Default Re: Error while building project in eclipse using ANT-compiler attribute

    And what's the problem? You've given us no context to help you out. What is the build file? Do you have the path setup for the tools ant is trying to access? And finally, please be forthright and let us know about crossposts:

    This thread has been cross posted here:


    Although cross posting is allowed, for everyone's benefit, please read:

    Java Programming Forums Cross Posting Rules

    The Problems With Cross Posting

  3. #3
    Junior Member
    Join Date
    Oct 2011
    Thanked 0 Times in 0 Posts

    Default Re: Error while building project in eclipse using ANT-compiler attribute

    The build file is cattributes-build.xml. here is the build file ..

    <?xml version="1.0" encoding="UTF-8"?>
    <project default="compile-attributes" name="XXXX" basedir=".">

    <taskdef resource="org/apache/commons/attributes/anttasks.properties"/>

    <target name="clean" description="Clean up the generated files">
    <fileset dir="${basedir}" includes="*.class,*$*"/>

    <target name="compile-attributes" depends="clean" description="Run the Commons Attributes precompiler">
    <attribute-compiler destdir="${basedir}/../.cattributes">
    <fileset dir="${basedir}/../src" includes="**/*.java"/>


    I have added all the relevant jar files in library. It also has "commons-attribute-compiler.jar" and "commons-attribute-api.jar". when i try to build the project in eclipse, it throws the error message given below.

    I have set the ANT_HOME and JAVA_HOME variables. Also set the class path to add "C:\apache-ant-1.8.2-bin\apache-ant-1.8.2\bin"

    Please let me know where am i going wrong. am i missing any jar to be uploaded. or is there any ANT version issue ?
    Last edited by aparnanagavalli; October 30th, 2011 at 06:42 PM. Reason: providing more information

Similar Threads

  1. Replies: 0
    Last Post: October 14th, 2011, 11:03 AM
  2. Map compiler error
    By kc120us in forum Collections and Generics
    Replies: 4
    Last Post: September 21st, 2011, 10:53 PM
  3. Java 6.0 Compiler Error
    By jilomes in forum What's Wrong With My Code?
    Replies: 2
    Last Post: April 19th, 2011, 04:34 PM
  4. setting the compiler for eclipse mac os x
    By etidd in forum Java IDEs
    Replies: 2
    Last Post: January 29th, 2010, 10:18 AM
  5. How to edit eclipse project builds
    By akhilachuthan@yahoo.co.in in forum Java IDEs
    Replies: 1
    Last Post: June 25th, 2009, 09:36 AM