• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help to use command Line argument with ant

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

am executing the below wsadmin cmd within ant script

$AdminApp update WC_demo partialapp {-contents C:/testdeploy/testdeploy.zip}

for which I would like to pass the zip file (C:/testdeploy/testdeploy.zip) from the command line (i.e depending on my own purpose I would be passing different zip files). I just saw the examples of command line arguments all the sites have only the tag examples <arg value="...">

Can someone help me out on how to achieve this command line argument reqmnt with sample code?

Regards,
Nandhini.
 
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, your answer is right in the Ant Manual. Look for the <input> task. For your convenience, I'd quoted it here:


Will display the message "All data is going to be deleted from DB continue (y/n)?" and require 'y' to continue build or 'n' to exit build with following message "Build aborted by user.".

<input
message="Please enter db-username:"
addproperty="db.user"
/>

Will display the message "Please enter db-username:" and set the property db.user to the value entered by the user.

<input
message="Please enter db-username:"
addproperty="db.user"
defaultvalue="Scott-Tiger"
/>

Same as above, but will set db.user to the value Scott- Tiger if the user enters no value (simply types <return> .

 
reply
    Bookmark Topic Watch Topic
  • New Topic