• 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

Ant: How to execute ant command line arguments from another ant script

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

How to excute ant commandline arguments from a ant script file?
i.e. ant -inputhandler com.sun.MyInputHandler.

If a am executing the above, it is executing properly. However i need to do that from a script file.
In ant 1.7, we can have a nested tag <classname> to give custom inputhandler inside <input> tag. However this is too not working.

Is there any way to do that using ant 1.6 ?

Thanks in advance!!!

Thanks,
Rabindra
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure 100% of what you are trying to achieve here (why do you need to call ANT from ANT?), have you taken a look at the antcall?
 
RabindraBlr Sahoo
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Martijn for valuable inputs.

Actually my requirement is to mask the password on ant console. For this i created a custom input handler class(com.xyz.MyInputHandler) which extends org.apache.tools.ant.input.DefaultInputHandler and is masking correctly using the followng command on command prompt/console.

ant -inputhandler com.xyz.MyInputHandler

But i also have some other fileds which doesn't require masking in the ant script, only for password it should mask using MyInputHandler.
So, How can i execute the above command using an ant script file.

Thanks in Advance!!!

Thanks,
Rabindra
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm, what you're trying to do is rapidly moving past my expertise , have you taken a look at the 'exec' task in ANT?
 
RabindraBlr Sahoo
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Martijn

I resolved the issue by calling the script from a batch file as:
ant -inputhandler com.xyz.CustomInputHandler

Thanks
Rabindra
 
reply
    Bookmark Topic Watch Topic
  • New Topic