• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Adding ANT Contrib tasks

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

One of my team member facing the problem in running the ANT contrib tasks...we just tried to use one task in the build file and below are the error thrown...

The code of the build file :-
-----------------------

-----------------------

error thrown as :

------------------
[echo] The first five letters of the alphabet are:

BUILD FAILED
C:\Documents and Settings\sv47906\Desktop\Test\build.xml:6: Problem: failed to create task or type for
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
-------------------------

we are working in eclipse and downloaded the ANT contrib jar file and added to ANT lib......Do i need to add any path in the code ? if it is, please give me an example of how to do it.

Can anyone help me out in executing this build file with contrib task ?

Thanks,
cindy
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You also need to tell your build to recognize the tasks defined in the antcontrib library. To do this (if you placed the antcontrib jar file in ant's lib directory), add the following entry to your build:

 
Cindy Martin
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Peter !!! It worked !!

Cindy
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I still face this issue. Even after placing the task reference. Any help is much appreciated.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Priya, welcome to Java Ranch!

Obviously, you did something wrong. But if you don't tell use what it is that you did, how can we point out your mistake?
http://faq.javaranch.com/java/TellTheDetails
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

priya ramadass wrote:I still face this issue. Even after placing the task reference. Any help is much appreciated.



Use <taskdef resource="net/sf/antcontrib/antlib.xml"/> instead of <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> when using ant >= 1.6
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kristian Klukon wrote:

priya ramadass wrote:I still face this issue. Even after placing the task reference. Any help is much appreciated.



Use <taskdef resource="net/sf/antcontrib/antlib.xml"/> instead of <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> when using ant >= 1.6



Hey Kristian, Thanks a Lot! Your solution worked.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Kristian! I was having the same issue that Priya had. Your reply helped me as well.
 
Tongue wrestling. It's not what you think. And here, take this tiny ad. You'll need it.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic