aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant/JUnit conditional 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/JUnit conditional" Watch "Ant/JUnit conditional" New topic
Author

Ant/JUnit conditional

Jeff Storey
Ranch Hand

Joined: Oct 09, 2006
Posts: 118
Hi, is there a way I can use a conditional (specifically an IF statement) in ant. I want to send one email subject if the junit failure property has been set, and another email subject if the test has passed.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2495
    
    8

Yes, Ant-Contrib.

Today, there was talk in ant develop mailing list to add conditionals to the <sequential> task.

Regards, Jan


OCUP UML fundamental and ITIL foundation
youtube channel
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Take a look at FAQ I want to execute a particular target only if multiple conditions are true.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2495
    
    8

[Edit: this was a reply to a message that has vanished from the tread.]


It should.

From the doco:
I'll give it a try when I find some time.

Regards, Jan
[ March 08, 2007: Message edited by: Jan Cumps ]
Jeff Storey
Ranch Hand

Joined: Oct 09, 2006
Posts: 118
I got it working. I realized that arg1 is the property I'm checking and arg2 is the value of that property.

I appreciate the help.

Jeff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant/JUnit conditional