Slide 1
Most trusted JOB oriented professional program
DevOps Certified Professional (DCP)

Take your first step into the world of DevOps with this course, which will help you to learn about the methodologies and tools used to develop, deploy, and operate high-quality software.

Slide 2
DevOps to DevSecOps – Learn the evolution
DevSecOps Certified Professional (DSOCP)

Learn to automate security into a fast-paced DevOps environment using various open-source tools and scripts.

Slide 2
Get certified in the new tech skill to rule the industry
Site Reliability Engineering (SRE) Certified Professional

A method of measuring and achieving reliability through engineering and operations work – developed by Google to manage services.

Slide 2
Master the art of DevOps
Master in DevOps Engineering (MDE)

Get enrolled for the most advanced and only course in the WORLD which can make you an expert and proficient Architect in DevOps, DevSecOps and Site Reliability Engineering (SRE) principles together.

Slide 2
Gain expertise and certified yourself
Azure DevOps Solutions Expert

Learn about the DevOps services available on Azure and how you can use them to make your workflow more efficient.

Slide 3
Learn and get certified
AWS Certified DevOps Professional

Learn about the DevOps services offered by AWS and how you can use them to make your workflow more efficient.

previous arrow
next arrow

A sample Ant build script that builds a WAR file – Guide



A sample Ant build script that builds a WAR file

<project name=”MyWebApplication” basedir=”..” default=”install”>

<!– project-specific variables –>
<property name=”” value=”myapp” />
<property name=”” value=”${}.war” />
<property name=”webapp.dir” value=”/Users/al/tomcat-6.0.16/webapps” />

<property environment=”env” />
<property name=”build.dir” value=”build” />
<property file=”${build.dir}/build.${env.HOSTNAME}” />

<property name=”lib.dir” value=”lib” />
<property name=”pages.dir” value=”pages” />
<property name=”src.dir” value=”src” />
<property name=”src.tests.dir” value=”src-tests” />
<property name=”resources.dir” value=”resources” />
<property name=”dest.dir” value=”target” />

<!– put everything in a temp folder with the right structure during the build –>
<property name=”temp.dir” value=”temp” />
<property name=”temp.dir.web-inf” value=”${temp.dir}/WEB-INF” />
<property name=”temp.dir.lib” value=”${temp.dir.web-inf}/lib” />
<property name=”temp.dir.classes” value=”${temp.dir.web-inf}/classes” />
<property name=”temp.dir.meta-inf” value=”${temp.dir}/META-INF” />

<property name=”package.file” value=”${dest.dir}/${}” />

<path id=”build.class.path”>
<fileset dir=”lib”>
<include name=”**/*.jar” />

<target name=”clean”>
<fileset dir=”${dest.dir}” includes=”**/*”/>
<delete dir=”${temp.dir}” />
<delete dir=”${temp.dir.classes}” />
<delete dir=”${temp.dir.meta-inf}” />
<delete dir=”${temp.dir.web-inf}” />

<target name=”prepare” depends=”clean”>
<mkdir dir=”${dest.dir}” />
<mkdir dir=”${temp.dir}” />
<mkdir dir=”${temp.dir.lib}” />
<mkdir dir=”${temp.dir.meta-inf}” />
<mkdir dir=”${temp.dir.web-inf}” />
<mkdir dir=”${temp.dir.classes}” />

<!– COMPILE –>
<target name=”compile” depends=”prepare”>
<echo>=== COMPILE ===</echo>
<echo>Compiling ${src.dir} files …</echo>
<javac debug=”on” srcdir=”${src.dir}” destdir=”${temp.dir.classes}” includes=”**/*”>
<classpath refid=”build.class.path” />

<!– compile files on the src-tests path –>
<echo>Compiling ${src.tests.dir} files …</echo>
<javac debug=”on” srcdir=”${src.tests.dir}” destdir=”${temp.dir.classes}” includes=”com/**”>
<classpath refid=”build.class.path” />

<!– PACKAGE –>
<target name=”package” depends=”compile”>
<echo>=== PACKAGE ===</echo>

<!– copy the config files –>
<copy file=”${resources.dir}/MANIFEST.MF” tofile=”${temp.dir.meta-inf}/MANIFEST.MF” overwrite=”true” />
<copy file=”${resources.dir}/web.xml” tofile=”${temp.dir.web-inf}/web.xml” overwrite=”true” />
<copy file=”${resources.dir}/managed-beans.xml” tofile=”${temp.dir.web-inf}/managed-beans.xml” overwrite=”true” />
<copy file=”${resources.dir}/navigation-rules.xml” tofile=”${temp.dir.web-inf}/navigation-rules.xml” overwrite=”true” />

<copy todir=”${temp.dir.classes}”>
<fileset dir=”${src.dir}”>
<include name=”**/*.xml”/>
<include name=”**/*.xsl”/>

<!– with all resources in place, create the war file –>
<war destfile=”${package.file}” webxml=”${temp.dir.web-inf}/web.xml” basedir=”${temp.dir}”>
<fileset dir=”${pages.dir}”/>
<lib dir=”${lib.dir}” />
<classes dir=”${temp.dir.classes}” />

<target name=”jsps”>
<echo>=== DEPLOY JSP’S ===</echo>
<!– i’m trying to be explicit about what i put out there –>
<copy todir=”${webapp.dir}/${}”>
<fileset dir=”${pages.dir}”>
<include name=”**/*.jsp”/>
<include name=”**/*.html”/>
<include name=”**/*.css”/>
<include name=”**/*.gif”/>
<include name=”**/*.jpg”/>
<include name=”**/*.png”/>
<include name=”**/*.js”/>

<!– INSTALL –>
<target name=”install” depends=”package”>
<echo>=== INSTALL ===</echo>
<copy file=”${package.file}” tofile=”${webapp.dir}/${}” overwrite=”true” />


Rajesh Kumar
Follow me
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x