A End to End ant Build xml snippet you could use for reference
<?xml version="1.0" encoding="UTF-8"?>
<project name="End to End Build" default="sendmail" basedir=".">
<target name="init">
<tstamp />
<property file="build.properties" />
<path id="classpath">
<pathelement path="${servlet.jar}" />
<pathelement path="${junit.jar}" />
</path>
<property name="classpath" refid="classpath" />
</target>
<target name="startrecorder">
<record name="${name}-${DSTAMP}-log.txt"
action="start"
append="false" />
</target>
<target name="prepare" depends="init, startrecorder">
<mkdir dir="${build.dir.classes}" />
<mkdir dir="${reports.dir}" />
</target>
<target name="fetch" depends="init">
<!-- <cvs dest="${src.dir}"
cvsRoot="${cvs.root}"
command="update -P -d"
failonerror="true" />
/> -->
</target>
<target name="compile" depends="prepare, fetch">
<javac srcdir="${src.dir}"
destdir="${build.dir.classes}"
classpath="${classpath}"
compiler="${build.compiler}"
debug="on"
includeantruntime="false" />
</target>
<target name="test" depends="compile">
<junit failureproperty="testsFailed" />
<junit printsummary="yes" haltonfailure="yes" showoutput="yes" >
<classpath>
<pathelement path="${classpath}" />
<pathelement path="${build.dir.classes}" />
</classpath>
<formatter type="xml" />
<batchtest fork="yes" todir="${reports.dir}/">
<fileset dir="${src.dir}">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
<junitreport todir="${reports.dir}">
<fileset dir="${reports.dir}" includes="TEST-*.xml"/>
<report format="noframes" todir="${reports.dir}"/>
</junitreport>
</target>
<target name="war" depends="test" unless="testsFailed">
<war destfile="${build.dir}/${war.name}" webxml="${etc.dir}/web.xml">
<fileset dir="html"/>
<fileset dir="jsp"/>
<lib dir="libs"/>
<classes dir="${build.dir.classes}">
<include name="**/*.class" />
<exclude name="**/*Test*.class" />
</classes>
<zipfileset dir="images"
prefix="images"/>
</war>
</target>
<target name="deploy" depends="war" unless="testsFailed">
<ftp server="${server.name}"
remotedir="${remote.dir}"
userid="${user.id}"
password="${password}"
passive="yes"
binary="yes"
verbose="yes">
<fileset dir="${build.dir}">
<include name="${war.name}"/>
</fileset>
</ftp>
</target>
<target name="stoprecorder">
<record name="${name}-${DSTAMP}-log.txt"
action="stop" />
</target>
<target name="sendmail" depends="deploy, stoprecorder">
<zip destfile="${name}-${DSTAMP}-reports.zip"
basedir="${reports.dir}"
excludes="**/*.xml" />
<mail mailhost="${mail.host}"
user="${mail.user}"
password="${mail.pass}"
ssl="true"
mailport="${mail.port}"
subject="Test build - ${DSTAMP}">
<from address="${mail.from.address}"/>
<to address="${mail.to.address}"/>
<message src="${name}-${DSTAMP}-log.txt" />
<attachments>
<fileset dir=".">
<include name="${name}-${DSTAMP}-reports.zip"/>
</fileset>
</attachments>
</mail>
</target>
<target name="clean" depends="init">
<delete dir="${build.dir}" />
<delete dir="${reports.dir}" />
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project name="End to End Build" default="sendmail" basedir=".">
<target name="init">
<tstamp />
<property file="build.properties" />
<path id="classpath">
<pathelement path="${servlet.jar}" />
<pathelement path="${junit.jar}" />
</path>
<property name="classpath" refid="classpath" />
</target>
<target name="startrecorder">
<record name="${name}-${DSTAMP}-log.txt"
action="start"
append="false" />
</target>
<target name="prepare" depends="init, startrecorder">
<mkdir dir="${build.dir.classes}" />
<mkdir dir="${reports.dir}" />
</target>
<target name="fetch" depends="init">
<!-- <cvs dest="${src.dir}"
cvsRoot="${cvs.root}"
command="update -P -d"
failonerror="true" />
/> -->
</target>
<target name="compile" depends="prepare, fetch">
<javac srcdir="${src.dir}"
destdir="${build.dir.classes}"
classpath="${classpath}"
compiler="${build.compiler}"
debug="on"
includeantruntime="false" />
</target>
<target name="test" depends="compile">
<junit failureproperty="testsFailed" />
<junit printsummary="yes" haltonfailure="yes" showoutput="yes" >
<classpath>
<pathelement path="${classpath}" />
<pathelement path="${build.dir.classes}" />
</classpath>
<formatter type="xml" />
<batchtest fork="yes" todir="${reports.dir}/">
<fileset dir="${src.dir}">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
<junitreport todir="${reports.dir}">
<fileset dir="${reports.dir}" includes="TEST-*.xml"/>
<report format="noframes" todir="${reports.dir}"/>
</junitreport>
</target>
<target name="war" depends="test" unless="testsFailed">
<war destfile="${build.dir}/${war.name}" webxml="${etc.dir}/web.xml">
<fileset dir="html"/>
<fileset dir="jsp"/>
<lib dir="libs"/>
<classes dir="${build.dir.classes}">
<include name="**/*.class" />
<exclude name="**/*Test*.class" />
</classes>
<zipfileset dir="images"
prefix="images"/>
</war>
</target>
<target name="deploy" depends="war" unless="testsFailed">
<ftp server="${server.name}"
remotedir="${remote.dir}"
userid="${user.id}"
password="${password}"
passive="yes"
binary="yes"
verbose="yes">
<fileset dir="${build.dir}">
<include name="${war.name}"/>
</fileset>
</ftp>
</target>
<target name="stoprecorder">
<record name="${name}-${DSTAMP}-log.txt"
action="stop" />
</target>
<target name="sendmail" depends="deploy, stoprecorder">
<zip destfile="${name}-${DSTAMP}-reports.zip"
basedir="${reports.dir}"
excludes="**/*.xml" />
<mail mailhost="${mail.host}"
user="${mail.user}"
password="${mail.pass}"
ssl="true"
mailport="${mail.port}"
subject="Test build - ${DSTAMP}">
<from address="${mail.from.address}"/>
<to address="${mail.to.address}"/>
<message src="${name}-${DSTAMP}-log.txt" />
<attachments>
<fileset dir=".">
<include name="${name}-${DSTAMP}-reports.zip"/>
</fileset>
</attachments>
</mail>
</target>
<target name="clean" depends="init">
<delete dir="${build.dir}" />
<delete dir="${reports.dir}" />
</target>
</project>
This comment has been removed by a blog administrator.
ReplyDeletewow really such a nice article here. I think now only i came to know some features or works. So please keep update like this.
ReplyDeleteDigital Marketing For Small Business in Chennai
This blog is having the general information. Got a creative work and this is very different one.We have to develop our creativity mind.This blog helps for this. Thank you for this blog. This is very interesting and useful.
ReplyDeleteBranding Services in Chennai
This technological concepts are really well being and wonderful thus it is very much interesting and very well good too, really i got more information from your knowledge.
ReplyDeleteDigital Marketing services in Chennai
ReplyDeleteI am a regular reader of your blog. the blog is very interesting and will be much useful for us.
Android training in chennai
your java related concepts thus it is really well done to a great job thus it is nice too and i got more information from your blog. i like this article and it is very well good too to practice the concepts.
ReplyDeleteBest Informatica Training institute in chennai
This idea is mind blowing. I think everyone should know such information like you have described on this post. Thank you for sharing this explanation.Your final conclusion was good.
ReplyDeleteInformatica Training in Chennai
Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this. Thanks a lot.
ReplyDeleteBest Dot Net Training Institutes in Chennai
Your technological concept is nice and i came to know about this process it is very well explained and also it is very likable to me. i like this concept.
ReplyDeleteBest Laser Clinic In Chennai
Java : http://www.metaforumtechnologies.com/java-j2ee-training-in-chennai.html
DeleteSelenium : http://www.metaforumtechnologies.com/selenium-testing-training-in-chennai.html
this is really too useful and have more ideas from yours. keep sharing many techniques. eagerly waiting for your new blog and useful information. keep doing more.
ReplyDeletejava training in chennai
Somebody necessarily help to make severely posts I might state. This is the first time I frequented your website page and to this point? I surprised with the research you made to create this particular post extraordinary. Well done admin..
ReplyDeleteBack to original
Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your.
ReplyDeleteseo company in india
It’s amazing in support of me to have a site, which is useful in support of my know-how. thanks admin|, you surely come with remarkable articles. Cheers for sharing your website page.Excellent blog here...
ReplyDeleteTooth Braces In Chennai
Dental Hospital in Chenna
nice post for sharing Java article. its really helpful for me. keep shring on updated tutorials????????????????
ReplyDeleteInteresting blog post.This blog shows that you have a great future as a content writer.waiting for more updates...
ReplyDeleteDigital Marketing Company in India
I’ve been browsing on-line greater than three hours today, but I never discovered any attention-grabbing article like yours. It is beautiful worth
ReplyDeletesufficient for me. Personally, if all webmasters and bloggers made good content material as you did, the net will be a lot more helpful than ever before.
cloud computing training in chennai
wow really superb you had posted one nice information through this. Definitely it will be useful for many people. So please keep update like this.
ReplyDeleteDental Clinic in Chennai
Nobel Implants In Chennai
Best Pediatric Dentist in Chennai
Orthodontic Treatment