Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Ant Build inside Eclipse Problem

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I'm just getting back into Ant again at my new work place (I used work with Maven2 in my previous work). And I'm not off to such a good start, I'm trying to run a build.xml script inside eclipse (Ganymede) and I'm getting the following error:

BUILD FAILED
C:\projects\BRANCH\build.common\scripts\init_base.xml:63: Problem: failed to create task or type if
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.

The part in the script it fails on is:


I'm thinking that I need to add an extra library to the "Ant Home Entries" configuration in Eclipse but I'm not sure as to which one.

Any help on this would be greatly appreciated.

Jenny
 
Jenny Kim
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arg..Sorry guys I've posted this in the wrong topic .
 
Sheriff
Posts: 21999
107
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No problem. I'll move this to the Ant forum.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The 'if' task is not a standard ant task - it is found in the antcontrib library. Have you installed that library, and is it being properly referenced in your build script?
 
Jenny Kim
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Peter, I added ant-contrib.jar to the classpath and it worked .
 
Here. Have a potato. I grew it in my armpit. And from my other armpit, this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic