Java 显示ant的curl输出
我有一个ant构建脚本,可以将文件上传到服务器。下面是我正在谈论的build.xml中的一段代码:Java 显示ant的curl输出,java,curl,ant,testflight,Java,Curl,Ant,Testflight,我有一个ant构建脚本,可以将文件上传到服务器。下面是我正在谈论的build.xml中的一段代码: <target name="-upload_to_testflight"> <echo>Uploading APP.ipa to TestFlight.com</echo> <exec executable="cat" outputproperty="msg"> <arg value="./build/testf
<target name="-upload_to_testflight">
<echo>Uploading APP.ipa to TestFlight.com</echo>
<exec executable="cat" outputproperty="msg">
<arg value="./build/testflight.txt"/>
</exec>
<exec executable="curl" failonerror="true" dir="${basedir}">
<arg value="http://testflightapp.com/api/builds.json"/>
<arg value="-F file=@out-build/APP.ipa"/>
<arg value="-F api_token=${testflight.api.token}"/>
<arg value="-F team_token=${testflight.team.token}"/>
<arg value="-F notes=${msg}"/>
<arg value="-F notify=True"/>
<arg value="-F distribution_lists=APP"/>
</exec>
</target>
如果不需要收集curl输出,则尝试使用spawn=true属性。它将蚂蚁和卷曲解耦。也许值得一试。
$script -q /dev/null curl --progress-bar http://releases.ubuntu.com/14.04.1/ubuntu-14.04.1-server-amd64.iso -o ubuntu-14.04.1-server-amd64.iso | tr $'\r' $'\n' | tr -d ' ' > /dev/tty