• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Conditional Target Ran.

 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi,

I am using Ant version 1.9.4.

I have a build-standard-targets.xml which gets imported into the build.xml for a number of projects - cars, bicycles and buses.

The build-standard-targets.xml has a target "generate-from-wsdl" which gets ran if the
condition of presence of a wsdl directory in "C:/resource" is met.

Below is a snippet of what I have.

This conditional behaviour needs to be changed such that the target "generate-from-wsdl"
is ran if the wsdl is present AND if build.xml is that of the Cars project ONLY.
So we don't need to ran this for the other projects ie bicycles and buses.

Any suggestion as to how I can modify the behaviour to met the new condition behaviour would be veyr much appreciated.

Thank you for your help.

Pete

build-standard-targets.xml


build.xml for Cars project


build.xml for Bicycles project


build.xml for Buses project
 
author & internet detective
Posts: 40913
840
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pete,
Are you allowed to use ant contrib? IT has an if statement so you can easily put anything you want in the condition?

If not, you need to use a <condition tag in Ant to merge the two conditions into one property that you put in the if attribute of your target.>
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! 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
reply
    Bookmark Topic Watch Topic
  • New Topic