aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant Build inside Eclipse Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant Build inside Eclipse Problem" Watch "Ant Build inside Eclipse Problem" New topic
Author

Ant Build inside Eclipse Problem

Jenny Kim
Greenhorn

Joined: May 28, 2008
Posts: 6
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

Joined: May 28, 2008
Posts: 6
Arg..Sorry guys I've posted this in the wrong topic .
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19760
    
  20

No problem. I'll move this to the Ant forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

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?


JBoss In Action
Jenny Kim
Greenhorn

Joined: May 28, 2008
Posts: 6
Thank you Peter, I added ant-contrib.jar to the classpath and it worked .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant Build inside Eclipse Problem