aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Problems with attempting use (Hide Ant Task)/(if condition) 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 "Problems with attempting use (Hide Ant Task)/(if condition)" Watch "Problems with attempting use (Hide Ant Task)/(if condition)" New topic
Author

Problems with attempting use (Hide Ant Task)/(if condition)

Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 237
Hi All,
currently trying to hide an ant task, so that it is not visable for selection to the user.
I currently use ant 1.7.0.

I have used the following :-

<target name="-copyFiles">

</target>

<target name="compile" depends=-copyFiles">

</target>


I have also attempted to use the <if> condition within my ant script and got the following error message:-

Problem: fialed 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.

Any ideas?

Mat

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

What do you mean by:

so that it is not visable for selection to the user.


Do you mean that you do not want the user to see the target when the user enters:



If so, then add descriptions to the targets you want the user to see - then Ant prints only those targets that have descriptions:



And to run it:


JBoss In Action
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problems with attempting use (Hide Ant Task)/(if condition)