Ant exec task: How can I read input from console stdin?

断了今生、忘了曾经 提交于 2019-11-29 07:43:53

From the documentation of the task:

Note that you cannot interact with the forked program, the only way to send input to it is via the input and inputstring attributes. Also note that since Ant 1.6, any attempt to read input in the forked program will receive an EOF (-1). This is a change from Ant 1.5, where such an attempt would block.

You could try to use the input-task to prompt for input in the ant-buildfile and pass these input with the inputstring-attribute of exec. I can't think of a better option at the moment.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!