0

I'm using Ant exec to run a program after my build, the program is a java programm that has a scanner that waits for user input, to choose an option before it does anything, currently ant exec just runs the program, shows the options and continues with other targets

jar:
  [jar] Building jar: /home/me/workspace/app/build/somejar.jar

my.app:
[exec] 
[exec]  Choose one of the following menus 
[exec]  
[exec] 0. Exit 
[exec] 1. do something 
[exec] 2. do something  
[exec] 3. do something amazing 
[exec] 4. do something wonderful 
[exec]  
[exec] 

some.next.target:
1
  • Try to nest your operations in <sequential>yourtasks</sequential> task. I don't know if it will help but you can try.
    – pepuch
    Mar 28, 2013 at 13:48

1 Answer 1

2

Consider using the <input> task to get the choice, then pass that along as an input attribute to the <exec> task or use it as an argument for your <exec> task if your program will accept command line arguments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.