<property name="user" value="rnd" />\r
<property name="passphrase" value="" />\r
\r
+ <!-- add ant contrib -->\r
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties">\r
+ <classpath>\r
+ <pathelement location="../build/lib/ant-contrib-1.0b3.jar"/>\r
+ </classpath>\r
+ </taskdef>\r
+ \r
<!-- Upload war to deploy to ssh host -->\r
<target name="upload-demo">\r
- <scp file="${demo.war}" todir="${user}@${sshHost}:servers/demo.war" keyfile="${sshkey.file}" passphrase="${passphrase}" />\r
+ <scp file="${demo.war}" todir="${user}@${sshHost}:demo.war" keyfile="${sshkey.file}" passphrase="${passphrase}" />\r
</target>\r
\r
<!-- Run sampler deployment test -->\r
</target>\r
\r
<!-- Upload demo, clean error screenshots and test deployment on all servers -->\r
- <target name="all" depends="upload-demo,tomcat4,tomcat5,tomcat6,jetty5,jetty6,jetty7,jboss3,jboss4,jboss5,glassfish,liferay,weblogic9,weblogic10,GAE,clean" />\r
- \r
+ <target name="all">\r
+ <echo>Getting lock</echo>\r
+ <antcall target="get-lock" />\r
+ <echo>Got lock</echo>\r
+ <trycatch property="tried">\r
+ <try>\r
+ <antcall target="upload-demo" />\r
+ <antcall target="tomcat4" />\r
+ <antcall target="tomcat5" />\r
+ <antcall target="tomcat6" />\r
+ <antcall target="jetty5" />\r
+ <antcall target="jetty6" />\r
+ <antcall target="jetty7" />\r
+ <antcall target="jboss3" />\r
+ <antcall target="jboss4" />\r
+ <antcall target="jboss5" />\r
+ <antcall target="glassfish" />\r
+ <antcall target="liferay" />\r
+ <antcall target="weblogic9" />\r
+ <antcall target="weblogic10" />\r
+ <antcall target="GAE" />\r
+ </try>\r
+ <catch>\r
+ <echo>${tried}</echo>\r
+ <echo>Running targets: clean and release-lock</echo>\r
+ </catch>\r
+ <finally>\r
+ <antcall target="clean" />\r
+ <antcall target="release-lock" />\r
+ </finally>\r
+ </trycatch>\r
+ </target>\r
+ \r
+ <target name="get-lock">\r
+ <sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} get-lock" />\r
+ </target>\r
+ \r
+ <target name="release-lock">\r
+ <sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} release-lock" />\r
+ </target>\r
+ \r
<!-- Remove demo.war -->\r
<target name="clean">\r
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} clean" />\r