ant build.xml备份
来源:互联网 发布:论校园网络的设计思路 编辑:程序博客网 时间:2024/05/02 01:29
<?xml version="1.0" encoding="UTF-8"?><project name="test.manager" default="deploy" basedir="./"><property file="build.properties" /><property name="build" value="${basedir}/build/classes"/><property name="dist" value="${basedir}/dist"></property><property name="test-corewebsite" value="${basedir}/dist/test/web"></property><property name="libpath" value="${basedir}/WebContent/WEB-INF/lib"></property><property name="websrc" value="${basedir}/WebContent"></property><target name="clean"><echo message="开始清理构建目录"/><delete dir="${build}"/><delete dir="${dist}"/><delete dir="${testwebsite}"></delete><echo message="结束清理构建目录"/></target><target name="init" depends="clean"><echo message="开始生产临时构建目录"/><mkdir dir="${build}"/><mkdir dir="${dist}"/><mkdir dir="${testwebsite}"/><echo message="结束生产临时构建目录"/></target><path id="project_lib_classpath"><fileset dir="${libpath}"></fileset></path><path id="jboss_lib_classpath"><fileset dir="${jboss_home}/server/default/lib"></fileset></path><target name="compile" depends="init" ><echo message="开始编译java文件"/><javac destdir="${build}" nowarn="false" encoding="utf-8" debug="on" includeantruntime="on" srcdir="${basedir}/src" target="1.6"><classpath refid="project_lib_classpath"></classpath><classpath refid="jboss_lib_classpath"></classpath></javac><echo message="结束编译java文件"/></target><target name="prepare_war" depends="compile"><echo message="开始复制发布文件到临时目录"/><copydir dest="${testwebsite}" src="${websrc}"></copydir><copydir dest="${testwebsite}/WEB-INF" src="${basedir}/build" ><exclude name="**/com/test/*/sample/*.class"/></copydir><copy todir="${testwebsite}/WEB-INF/classes"><fileset dir="${basedir}/src" excludes="**/*.java"/></copy><echo message="结束复制发布文件到临时目录"/></target><target name="war" depends="prepare_war"><echo message="开始打包"/><war destfile="${dist}/${war.name}.war" basedir="${testwebsite}"/><echo message="开始结束打包"/><echo message="开始清楚临时目录"/><delete dir="${dist}/test"></delete><echo message="结束清楚临时目录"/></target><target name="deploy_m1"><echo message="开始发布${host.ip.1}"/><echo message="开始停止服务"/><sshexec host="${host.ip.1}" username="${host.username}" password="${host.password}" command="sh ${host.jboss.cmd} stop" trust="true" /><echo message="删除发布目录原发布包"/><sshexec host="${host.ip.1}" username="${host.username}" password="${host.password}" command="rm -rf ${host.war.path}/${war.name}.war" trust="true" /><echo message="开始拷贝目录"/><scp todir="${host.username}:${host.password}@${host.ip.1}:${host.war.path}" file="${dist}/${war.name}.war" trust="true" /><echo message="开始启动服务"/><sshexec host="${host.ip.1}" username="${host.username}" password="appdeploy" command="sh ${host.jboss.cmd} start" trust="true" /><echo message="结束发布${host.ip.1}"/></target><target name="deploy_m2" ><echo message="开始发布${host.ip.2}"/><echo message="开始停止服务"/><sshexec host="${host.ip.2}" username="${host.username}" password="${host.password}" command="sh ${host.jboss.cmd} stop" trust="true" /><echo message="删除发布目录原发布包"/><sshexec host="${host.ip.2}" username="${host.username}" password="${host.password}" command="rm -rf ${host.war.path}/${war.name}.war" trust="true" /><echo message="开始拷贝目录"/><scp todir="${host.username}:${host.password}@${host.ip.2}:${host.war.path}" file="${dist}/${war.name}.war" trust="true" /><echo message="开始启动服务"/><sshexec host="${host.ip.2}" username="${host.username}" password="appdeploy" command="sh ${host.jboss.cmd} start" trust="true" /><echo message="结束发布${host.ip.2}"/></target><target name="deploy" depends="war,deploy_m1,deploy_m2"/></project>
0 0
- ant build.xml备份
- ant build.properties备份
- ANT Build.xml例子
- Ant build.xml sample
- Apache Ant Build.xml
- ANT-build.xml详解
- ant & build.xml详解
- ant build.xml
- ANT Build.xml例子
- ANT build.xml详解
- Ant build.xml
- ant build.xml study
- Ant 入门 Build.xml
- Ant build.xml 模板
- Ant配置文件build.xml
- ANT-Build.xml
- MyEclipse Ant build.xml
- ant-build.xml说明- -
- 【转载】正则表达式的数字实例
- LINQ to SQL快速上手
- Android 报错记录
- Android中的Handler总结
- 动态查看log
- ant build.xml备份
- 各种数学公式
- PHP判断变量是否存在及函数isset() 、empty()与is_null的区别
- Ueditor1.3.6 setContent的一个bug
- IOS键盘的相关设置(UITextfield)
- centos6.4+hadoop2.2.0 spark伪伪分布式安装
- Exchange2003迁移2010DAG的权限问题
- LPC178X/177X系列Cortex-M3硬件体系结构
- VS2010编译错误:fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x