Implement automatic deployment Projects on Linux using ANT+SVN __linux

Source: Internet
Author: User

References: https://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/ant/ant.html

Build.xml

<?xml version= "1.0" encoding= "UTF-8"?> <project "basedir=" "default=" main "name=" Yuxi HDFS "> <path id=" P Roject.classpath "> <pathelement location="/root/yuxihdfs/web-inf/lib/hadoop-core-1.0.0.jar "/> < Pathelement location= "/root/yuxihdfs/web-inf/lib/commons-logging-1.1.1.jar"/> </path> <!--<path id= "Svnant.classpath" > <pathelement location= "/usr/local/ant/lib/svnkit.jar"/> <pathelement location= " Usr/local/ant/lib/svnant.jar "/> <pathelement location=/usr/local/ant/lib/svnjavahl.jar"/> < Pathelement location= "/usr/local/ant/lib/svnclientadapter.jar"/> </path> <typedef resource= "Org/tigris /subversion/svnant/svnantlib.xml "classpathref=" Svnant.classpath "/>--> <typedef resource=" org/tigris/ Subversion/svnant/svnantlib.xml "classpath=" Svnant.jar "/> <svnsetting id=" svn.settings "false" javahl= = ' true ' username= ' user1 ' password= ' passwd '/> <target ' svn ' > <echo message= "checkout source code"/> <svn refid= "svn.settings" > <checkout url= "Svn://192.168.11.124/rep"
		Os/yuxihdfs "destpath="/root/yuxihdfs "/> </svn> </target> <target name=" compile "depends=" SVN "> <mkdir dir= "/root/yuxihdfs/build"/> <javac debug= "true" debuglevel= "Source,lines,vars" destdir= "/root/" Yuxihdfs/build "source=" 1.6 "target=" 1.6 "includeantruntime=" on "> <classpath refid=" Project.classpath "/> &L
		T;SRC path= "/root/yuxihdfs/src"/> </javac> </target> <target name= "compress" depends= "compile" > <mkdir dir= "/root/yuxihdfs/dist"/> <jar jarfile= "/root/yuxihdfs/dist/lib/yuxi_hdfs-1.0.0.jar"/ Root/yuxihdfs/build "> <include name=" com/yuxipacific/**/*.class "/> <manifest> <attribute name= "Yuxihdfs-version" value= "1.0"/> </manifest> </jar> <war destfile= "/ROOT/YUXIHDFS/DIST/YUXIHDFS.W Ar "webxml="/root/yuxihdfs/web-inf/web. xml "> <webinf dir="/root/yuxihdfs/web-inf/"includes=" Applicationcontext.xml "/>" <lib dir= "/root/YuxiHD" Fs/web-inf/lib "/> <lib dir="/root/yuxihdfs/dist/lib "/> </war> </target> <target name=" Deplo Y "depends=" compress "> <echo message=" "Stop Tomcat Server/> <exec" executable= own.sh "/> <delete dir=/usr/local/tomcat/webapps/yuxihdfs"/> <copy "file=" Yuxihdfs.war "todir="/usr/local/tomcat/webapps "/> <echo message=" start tomcat server "/> <exec executable= "/usr/local/tomcat/bin/startup.sh"/> </target> <target name= "main" depends= "deploy" > <delete dir= " /root/yuxihdfs "/> </target> </project>


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.