GAE/JのデプロイをAntで自動化
Eclipseプラグインのデプロイボタンだと設定ファイルを手動で置き換えるのが面倒くさい
GAE標準のAntだとパスワード聞いてくれない(たぶん)&パスワード保存の有効期限切れた時に面倒くさい(たぶん)&てか、保存されるの嫌(俺だけ?)
<target name="update_version_1" depends="compile"> <antcall target="update"> <param name="VERSION" value="1" /> </antcall> </target> <target name="update"> <echo message="${VERSION} updating." /> <copy todir="tmp"> <fileset dir="war"></fileset> </copy> <!-- 設定ファイルの置き換えとかをここでやる --> <copy file="deploy/${VERSION}/appengine-web.xml" tofile="tmp/WEB-INF/appengine-web.xml" overwrite="true" /> <input message="Input password.(${email})" addproperty="userPassword"> <!--<handler classname="org.apache.tools.ant.input.SecureInputHandler" />--> </input> <exec executable="${appengine.sdk.home}/bin/appcfg.cmd" inputstring="${userPassword}"> <arg line="--email=${email} --passin update tmp"/> </exec> </target>