SlideShare a Scribd company logo
How to write a simple ANT build files for the Enterprise projects.
1/30/2015 Ravi Reddy (Ravinder Nancherla) 1
ANT Tutorials
 Tutorials How to write a build file for a simple Java project
Create a simple sample project in your eclipse IDE, Below is the screen shot and build script.
1/30/2015 Ravi Reddy (Ravinder Nancherla) 2
ANT Tutorials
 Build.xml
<project name="TestAnt" basedir="." default="run">
<!-- Clean Target -->
<target name="clean">
<delete dir="build"/>
</target>
<!-- Compile Target -->
<target name="compile">
<mkdir dir="build/classes"/>
<javac srcdir="src" destdir="build/classes"/>
</target>
<!-- Make JAR Target -->
<target name="jar">
<mkdir dir="build/jar"/>
<jar destfile="build/jar/TestAnt.jar" basedir="build/classes">
<manifest>
<attribute name="Main-Class" value="com.test.ant.EmployeeTestClient"/>
</manifest>
</jar>
</target>
<!-- Run JAR to execute the main class. -->
<target name="run">
<java jar="build/jar/TestAnt.jar" fork="true"/>
</target>
</project>
1/30/2015 Ravi Reddy (Ravinder Nancherla) 3
ANT Tutorials
 Tutorials How to write a build file for a simple Java Web project
Create a simple sample web project in your eclipse IDE, Below is the screen shot and
build script.
1/30/2015 Ravi Reddy (Ravinder Nancherla) 4
ANT Tutorials
 Build.xml
<?xml version="1.0"?>
<project name="AntTestForWebApp" default="buildWar" basedir=".">
<property name="baseDir" value="${basedir}" />
<property name="src" value="${baseDir}/src" />
<property name="webRoot" value="${baseDir}/WebRoot" />
<property name="warDir" value="${baseDir}/build/war" />
<property name="libDir" value="${warDir}/WEB-INF/lib" />
<path id="libClasspath">
<fileset dir="${webRoot}/WEB-INF/lib" includes="**/*.jar" />
</path>
<!-- ========================= **** Clean Target **** =========================-->
<target name="clean">
<delete dir="${baseDir}/build" />
</target>
<!-- ========================= **** Init Target **** =========================-->
<target name="init">
<!-- Create Web-INF,lib, classes, META-INF directories -->
<mkdir dir="${libDir}" />
<mkdir dir="${warDir}/WEB-INF" />
<mkdir dir="${warDir}/WEB-INF/classes" />
<mkdir dir="${warDir}/META-INF" />
</target>
1/30/2015 Ravi Reddy (Ravinder Nancherla) 5
ANT Tutorials
<!-- =================== **** COMPILE **** =======================================
Compile Java Files and place the following things in
1) *.classes files in WEB-INF/classes
2) *.jar files in WEB-INF/lib
3) web.xml in WEB-INF
4) *.jsp files in parent directory path build/war
================================================================================ -->
<target name="compile" depends="init">
<javac srcdir="${src}" destdir="${warDir}/WEB-INF/classes" debug="true" includes="**/*.java"
optimize="on">
<classpath refid="libClasspath" />
</javac>
<copy todir="${libDir}">
<fileset dir="${webRoot}/WEB-INF/lib" includes="**/*.jar" />
</copy>
<copy todir="${warDir}/WEB-INF">
<fileset dir="${webRoot}/WEB-INF" includes="web.xml" />
</copy>
<copy todir="${warDir}">
<fileset dir="${webRoot}" includes="*.jsp" />
</copy>
</target>
1/30/2015 Ravi Reddy (Ravinder Nancherla) 6
ANT Tutorials
<!-- ========================= **** Create the WAR File **** =========================-->
<target name="buildWar">
<!-- Option 1: Using <jar> create war file and place WAR file in BUILD directory -->
<!--
<jar jarfile="${baseDir}/build/AntTestForWebApp.war" basedir="${warDir}" />
-->
<!-- Option 2: Using <war> create war file and place WAR file in BUILD directory -->
<war destfile="${baseDir}/build/AntTestForWebApp.war" webxml="${warDir}/WEB-INF/web.xml">
<zipfileset dir="${warDir}"/>
</war>
</target>
</project>
1/30/2015 Ravi Reddy (Ravinder Nancherla) 7
ANT Tutorials
 Tutorials How to write a build file for a simple Java Web project
Create a simple sample EAR project in your eclipse IDE, Below is the screen
shot and build script.
1/30/2015 Ravi Reddy (Ravinder Nancherla) 8
ANT Tutorials
1/30/2015 Ravi Reddy (Ravinder Nancherla) 9
<?xml version = "1.0" encoding = "UTF-8"?>
<!-- ==========================================================================-->
<!-- Trying Build file for EAR Application -->
<!-- build.xml, Friday, August 27, 2010 -->
<!-- Author: Ravinder Nancherla -->
<!-- Email: ravinder.nancherla@gmail.com -->
<!-- Copyright(c) 2010 Ravinder Nancherla (Ravi Reddy)., All Rights Reserved. -->
<!-- ========================================================================= -->
<project name="AntEarWarJar" default="buildEar" basedir=".">
<property name="webModule" value="C:/SravanthiPractice/AntEarWarJarWeb"/>
<property name="ejbModule" value="C:/SravanthiPractice/AntEarWarJarEJB"/>
<property name="baseDir" value="${basedir}"/>
<property name="build" value="${baseDir}/build"/>
<property name="jarDir" value="${baseDir}/build/jar"/>
<property name="warDir" value="${baseDir}/build/war"/>
<property name="earDir" value="${baseDir}/build/ear"/>
<property name="webRootDir" value="${webModule}/WebRoot/WEB-INF"/>
<property name="webDir" value="${warDir}/WEB-INF"/>
<path id="libClasspath">
<fileset dir="${webRootDir}/lib" includes="**/*.jar" />
</path>
ANT Tutorials
<!-- Cleaning the build directory -->
<target name="clean">
<delete dir="${build}"/>
</target>
<!-- Initializing/Creating the directories -->
<target name="init" depends="clean">
<mkdir dir="${jarDir}/classes"/>
<mkdir dir="${jarDir}/jar"/>
<mkdir dir="${warDir}/META-INF"/>
<mkdir dir="${webDir}/classes"/>
<mkdir dir="${webDir}/lib"/>
<mkdir dir="${earDir}/META-INF"/>
</target>
<!-- Compiling and copying the files from EjbModule and WebModiule -->
<target name="compile" depends="init">
<javac srcdir="${ejbModule}/src" destdir="${jarDir}/classes" includes="**/*.java"/>
<javac srcdir="${webModule}/src" destdir="${webDir}/classes" includes="**/*.java">
<classpath refid="libClasspath"/>
</javac>
<copy todir="${webDir}/lib">
<fileset dir="${webRootDir}/lib" includes="**/*.jar"/>
</copy>
1/30/2015 Ravi Reddy (Ravinder Nancherla) 10
ANT Tutorials
<copy todir="${webDir}">
<fileset dir="${webRootDir}" includes="web.xml"/>
</copy>
<copy todir="${warDir}">
<fileset dir="${webModule}/WebRoot" includes="**/*.jsp"/>
</copy>
<copy todir="${earDir}/META-INF">
<fileset dir="${baseDir}/META-INF" includes="**/*.*"/>
</copy>
</target>
<!-- Creating Jar File -->
<target name="buildJar" depends="compile">
<jar jarfile="${earDir}/${ant.project.name}.jar" basedir="${jarDir}"/>
<jar jarfile="${jarDir}/jar/${ant.project.name}.jar" basedir="${jarDir}"/>
</target>
<!-- Creating War File -->
<target name="buildWar" depends="compile">
<jar jarfile="${earDir}/${ant.project.name}.war" basedir="${warDir}"/>
</target>
<!-- Creating Ear File -->
<target name="buildEar" depends="buildJar,buildWar">
<jar jarfile="${build}/${ant.project.name}.ear" basedir="${earDir}"/>
</target>
</project>
1/30/2015 Ravi Reddy (Ravinder Nancherla) 11

More Related Content

What's hot (14)

Accessibility Testing using Axe
Accessibility Testing using AxeAccessibility Testing using Axe
Accessibility Testing using Axe
RapidValue
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Jeado Ko
 
Hands on the Gradle
Hands on the GradleHands on the Gradle
Hands on the Gradle
Matthias Käppler
 
Implementing Quality on Java projects
Implementing Quality on Java projectsImplementing Quality on Java projects
Implementing Quality on Java projects
Vincent Massol
 
Gradle - time for another build
Gradle - time for another buildGradle - time for another build
Gradle - time for another build
Igor Khotin
 
うさぎ組 in G* WorkShop -うさみみの日常-
うさぎ組 in G* WorkShop -うさみみの日常-うさぎ組 in G* WorkShop -うさみみの日常-
うさぎ組 in G* WorkShop -うさみみの日常-
kyon mm
 
C fowler azure-dojo
C fowler azure-dojoC fowler azure-dojo
C fowler azure-dojo
sdeconf
 
What the heck went wrong?
What the heck went wrong?What the heck went wrong?
What the heck went wrong?
Andy McKay
 
Tackling Umbraco: Case Study on NFL Ops Website Design
Tackling Umbraco: Case Study on NFL Ops Website DesignTackling Umbraco: Case Study on NFL Ops Website Design
Tackling Umbraco: Case Study on NFL Ops Website Design
mcampolongo
 
Apache Maven basics
Apache Maven basicsApache Maven basics
Apache Maven basics
Volodymyr Ostapiv
 
How to create a skeleton of a Java console application
How to create a skeleton of a Java console applicationHow to create a skeleton of a Java console application
How to create a skeleton of a Java console application
Dmitri Pisarenko
 
Vuex
VuexVuex
Vuex
Asaquzzaman Mishu
 
淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合
Kyle Lin
 
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
Building Performance - ein Frontend-Build-Prozess für Java mit MavenBuilding Performance - ein Frontend-Build-Prozess für Java mit Maven
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
Oliver Ochs
 
Accessibility Testing using Axe
Accessibility Testing using AxeAccessibility Testing using Axe
Accessibility Testing using Axe
RapidValue
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Jeado Ko
 
Implementing Quality on Java projects
Implementing Quality on Java projectsImplementing Quality on Java projects
Implementing Quality on Java projects
Vincent Massol
 
Gradle - time for another build
Gradle - time for another buildGradle - time for another build
Gradle - time for another build
Igor Khotin
 
うさぎ組 in G* WorkShop -うさみみの日常-
うさぎ組 in G* WorkShop -うさみみの日常-うさぎ組 in G* WorkShop -うさみみの日常-
うさぎ組 in G* WorkShop -うさみみの日常-
kyon mm
 
C fowler azure-dojo
C fowler azure-dojoC fowler azure-dojo
C fowler azure-dojo
sdeconf
 
What the heck went wrong?
What the heck went wrong?What the heck went wrong?
What the heck went wrong?
Andy McKay
 
Tackling Umbraco: Case Study on NFL Ops Website Design
Tackling Umbraco: Case Study on NFL Ops Website DesignTackling Umbraco: Case Study on NFL Ops Website Design
Tackling Umbraco: Case Study on NFL Ops Website Design
mcampolongo
 
How to create a skeleton of a Java console application
How to create a skeleton of a Java console applicationHow to create a skeleton of a Java console application
How to create a skeleton of a Java console application
Dmitri Pisarenko
 
淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合
Kyle Lin
 
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
Building Performance - ein Frontend-Build-Prozess für Java mit MavenBuilding Performance - ein Frontend-Build-Prozess für Java mit Maven
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
Oliver Ochs
 

Similar to Tutorial to develop build files using ANT (20)

Ant tutorial
Ant tutorialAnt tutorial
Ant tutorial
Ratnesh Kumar Singh
 
Java ant tutorial
Java ant tutorialJava ant tutorial
Java ant tutorial
Ashoka Vanjare
 
Ant
AntAnt
Ant
Manav Prasad
 
Apache Ant
Apache AntApache Ant
Apache Ant
Rajesh Kumar
 
Intro to-ant
Intro to-antIntro to-ant
Intro to-ant
Manav Prasad
 
Ant_quick_guide
Ant_quick_guideAnt_quick_guide
Ant_quick_guide
ducquoc_vn
 
Using Ant To Build J2 Ee Applications
Using Ant To Build J2 Ee ApplicationsUsing Ant To Build J2 Ee Applications
Using Ant To Build J2 Ee Applications
Rajesh Kumar
 
Apache Ant
Apache AntApache Ant
Apache Ant
Vinod Kumar V H
 
Apache ant
Apache antApache ant
Apache ant
koniik
 
Deploy Flex with Apache Ant
Deploy Flex with Apache AntDeploy Flex with Apache Ant
Deploy Flex with Apache Ant
dctrl — studio for creativ technology
 
Introduction To Ant
Introduction To AntIntroduction To Ant
Introduction To Ant
Rajesh Kumar
 
Ant - Another Neat Tool
Ant - Another Neat ToolAnt - Another Neat Tool
Ant - Another Neat Tool
Kanika2885
 
Ant - Another Neat Tool
Ant - Another Neat ToolAnt - Another Neat Tool
Ant - Another Neat Tool
Kanika2885
 
Apache Ant
Apache AntApache Ant
Apache Ant
Ali Bahu
 
Apache Ant
Apache AntApache Ant
Apache Ant
Ali Bahu
 
Build Scripts
Build ScriptsBuild Scripts
Build Scripts
Ólafur Andri Ragnarsson
 
Apache ant
Apache antApache ant
Apache ant
Yuriy Galavay
 
Ant User Guide
Ant User GuideAnt User Guide
Ant User Guide
Muthuselvam RS
 
Introduction to Apache Ant
Introduction to Apache AntIntroduction to Apache Ant
Introduction to Apache Ant
Shih-Hsiang Lin
 
Ant build tool2
Ant   build tool2Ant   build tool2
Ant build tool2
Rohit Kumar
 

More from ravireddy76 (6)

Groovy in SOAP UI
Groovy in SOAP UIGroovy in SOAP UI
Groovy in SOAP UI
ravireddy76
 
WID (Websphere Integration Development) Guide
WID (Websphere Integration Development) GuideWID (Websphere Integration Development) Guide
WID (Websphere Integration Development) Guide
ravireddy76
 
Maven
MavenMaven
Maven
ravireddy76
 
Flex Proto Type
Flex  Proto  TypeFlex  Proto  Type
Flex Proto Type
ravireddy76
 
Richfaces Proto Type
Richfaces Proto TypeRichfaces Proto Type
Richfaces Proto Type
ravireddy76
 
Icefaces Proto Type
Icefaces Proto TypeIcefaces Proto Type
Icefaces Proto Type
ravireddy76
 
Groovy in SOAP UI
Groovy in SOAP UIGroovy in SOAP UI
Groovy in SOAP UI
ravireddy76
 
WID (Websphere Integration Development) Guide
WID (Websphere Integration Development) GuideWID (Websphere Integration Development) Guide
WID (Websphere Integration Development) Guide
ravireddy76
 
Richfaces Proto Type
Richfaces Proto TypeRichfaces Proto Type
Richfaces Proto Type
ravireddy76
 
Icefaces Proto Type
Icefaces Proto TypeIcefaces Proto Type
Icefaces Proto Type
ravireddy76
 

Recently uploaded (20)

From Legacy to Cloud-Native: A Guide to AWS Modernization.pptx
From Legacy to Cloud-Native: A Guide to AWS Modernization.pptxFrom Legacy to Cloud-Native: A Guide to AWS Modernization.pptx
From Legacy to Cloud-Native: A Guide to AWS Modernization.pptx
Mohammad Jomaa
 
Security Operations and the Defense Analyst - Splunk Certificate
Security Operations and the Defense Analyst - Splunk CertificateSecurity Operations and the Defense Analyst - Splunk Certificate
Security Operations and the Defense Analyst - Splunk Certificate
VICTOR MAESTRE RAMIREZ
 
Build your own NES Emulator... with Kotlin
Build your own NES Emulator... with KotlinBuild your own NES Emulator... with Kotlin
Build your own NES Emulator... with Kotlin
Artur Skowroński
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...
Ivan Ruchkin
 
UiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build PipelinesUiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build Pipelines
UiPathCommunity
 
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 ProfessioMaster tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Kari Kakkonen
 
Agentic AI - The New Era of Intelligence
Agentic AI - The New Era of IntelligenceAgentic AI - The New Era of Intelligence
Agentic AI - The New Era of Intelligence
Muzammil Shah
 
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AISAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
Peter Spielvogel
 
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath InsightsUiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPathCommunity
 
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk TechniciansOffshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
john823664
 
A Comprehensive Guide on Integrating Monoova Payment Gateway
A Comprehensive Guide on Integrating Monoova Payment GatewayA Comprehensive Guide on Integrating Monoova Payment Gateway
A Comprehensive Guide on Integrating Monoova Payment Gateway
danielle hunter
 
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Lorenzo Miniero
 
2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx
2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx
2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx
katalinjordans2
 
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AI Emotional Actors:  “When Machines Learn to Feel and Perform"AI Emotional Actors:  “When Machines Learn to Feel and Perform"
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AkashKumar809858
 
Introducing Ensemble Cloudlet vRouter
Introducing Ensemble  Cloudlet vRouterIntroducing Ensemble  Cloudlet vRouter
Introducing Ensemble Cloudlet vRouter
Adtran
 
With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...
With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...
With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...
SOFTTECHHUB
 
Dev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API WorkflowsDev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API Workflows
UiPathCommunity
 
cloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mitacloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mita
siyaldhande02
 
Fully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and ControlFully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and Control
ShapeBlue
 
Gihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai TechnologyGihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai Technology
zainkhurram1111
 
From Legacy to Cloud-Native: A Guide to AWS Modernization.pptx
From Legacy to Cloud-Native: A Guide to AWS Modernization.pptxFrom Legacy to Cloud-Native: A Guide to AWS Modernization.pptx
From Legacy to Cloud-Native: A Guide to AWS Modernization.pptx
Mohammad Jomaa
 
Security Operations and the Defense Analyst - Splunk Certificate
Security Operations and the Defense Analyst - Splunk CertificateSecurity Operations and the Defense Analyst - Splunk Certificate
Security Operations and the Defense Analyst - Splunk Certificate
VICTOR MAESTRE RAMIREZ
 
Build your own NES Emulator... with Kotlin
Build your own NES Emulator... with KotlinBuild your own NES Emulator... with Kotlin
Build your own NES Emulator... with Kotlin
Artur Skowroński
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...
Ivan Ruchkin
 
UiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build PipelinesUiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build Pipelines
UiPathCommunity
 
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 ProfessioMaster tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Kari Kakkonen
 
Agentic AI - The New Era of Intelligence
Agentic AI - The New Era of IntelligenceAgentic AI - The New Era of Intelligence
Agentic AI - The New Era of Intelligence
Muzammil Shah
 
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AISAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
Peter Spielvogel
 
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath InsightsUiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPathCommunity
 
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk TechniciansOffshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
john823664
 
A Comprehensive Guide on Integrating Monoova Payment Gateway
A Comprehensive Guide on Integrating Monoova Payment GatewayA Comprehensive Guide on Integrating Monoova Payment Gateway
A Comprehensive Guide on Integrating Monoova Payment Gateway
danielle hunter
 
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Lorenzo Miniero
 
2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx
2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx
2025-05-22_Automate__Motivate_Spiff_Meets_Marketing_Cloud.pptx
katalinjordans2
 
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AI Emotional Actors:  “When Machines Learn to Feel and Perform"AI Emotional Actors:  “When Machines Learn to Feel and Perform"
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AkashKumar809858
 
Introducing Ensemble Cloudlet vRouter
Introducing Ensemble  Cloudlet vRouterIntroducing Ensemble  Cloudlet vRouter
Introducing Ensemble Cloudlet vRouter
Adtran
 
With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...
With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...
With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...
SOFTTECHHUB
 
Dev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API WorkflowsDev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API Workflows
UiPathCommunity
 
cloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mitacloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mita
siyaldhande02
 
Fully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and ControlFully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and Control
ShapeBlue
 
Gihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai TechnologyGihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai Technology
zainkhurram1111
 

Tutorial to develop build files using ANT

  • 1. How to write a simple ANT build files for the Enterprise projects. 1/30/2015 Ravi Reddy (Ravinder Nancherla) 1
  • 2. ANT Tutorials  Tutorials How to write a build file for a simple Java project Create a simple sample project in your eclipse IDE, Below is the screen shot and build script. 1/30/2015 Ravi Reddy (Ravinder Nancherla) 2
  • 3. ANT Tutorials  Build.xml <project name="TestAnt" basedir="." default="run"> <!-- Clean Target --> <target name="clean"> <delete dir="build"/> </target> <!-- Compile Target --> <target name="compile"> <mkdir dir="build/classes"/> <javac srcdir="src" destdir="build/classes"/> </target> <!-- Make JAR Target --> <target name="jar"> <mkdir dir="build/jar"/> <jar destfile="build/jar/TestAnt.jar" basedir="build/classes"> <manifest> <attribute name="Main-Class" value="com.test.ant.EmployeeTestClient"/> </manifest> </jar> </target> <!-- Run JAR to execute the main class. --> <target name="run"> <java jar="build/jar/TestAnt.jar" fork="true"/> </target> </project> 1/30/2015 Ravi Reddy (Ravinder Nancherla) 3
  • 4. ANT Tutorials  Tutorials How to write a build file for a simple Java Web project Create a simple sample web project in your eclipse IDE, Below is the screen shot and build script. 1/30/2015 Ravi Reddy (Ravinder Nancherla) 4
  • 5. ANT Tutorials  Build.xml <?xml version="1.0"?> <project name="AntTestForWebApp" default="buildWar" basedir="."> <property name="baseDir" value="${basedir}" /> <property name="src" value="${baseDir}/src" /> <property name="webRoot" value="${baseDir}/WebRoot" /> <property name="warDir" value="${baseDir}/build/war" /> <property name="libDir" value="${warDir}/WEB-INF/lib" /> <path id="libClasspath"> <fileset dir="${webRoot}/WEB-INF/lib" includes="**/*.jar" /> </path> <!-- ========================= **** Clean Target **** =========================--> <target name="clean"> <delete dir="${baseDir}/build" /> </target> <!-- ========================= **** Init Target **** =========================--> <target name="init"> <!-- Create Web-INF,lib, classes, META-INF directories --> <mkdir dir="${libDir}" /> <mkdir dir="${warDir}/WEB-INF" /> <mkdir dir="${warDir}/WEB-INF/classes" /> <mkdir dir="${warDir}/META-INF" /> </target> 1/30/2015 Ravi Reddy (Ravinder Nancherla) 5
  • 6. ANT Tutorials <!-- =================== **** COMPILE **** ======================================= Compile Java Files and place the following things in 1) *.classes files in WEB-INF/classes 2) *.jar files in WEB-INF/lib 3) web.xml in WEB-INF 4) *.jsp files in parent directory path build/war ================================================================================ --> <target name="compile" depends="init"> <javac srcdir="${src}" destdir="${warDir}/WEB-INF/classes" debug="true" includes="**/*.java" optimize="on"> <classpath refid="libClasspath" /> </javac> <copy todir="${libDir}"> <fileset dir="${webRoot}/WEB-INF/lib" includes="**/*.jar" /> </copy> <copy todir="${warDir}/WEB-INF"> <fileset dir="${webRoot}/WEB-INF" includes="web.xml" /> </copy> <copy todir="${warDir}"> <fileset dir="${webRoot}" includes="*.jsp" /> </copy> </target> 1/30/2015 Ravi Reddy (Ravinder Nancherla) 6
  • 7. ANT Tutorials <!-- ========================= **** Create the WAR File **** =========================--> <target name="buildWar"> <!-- Option 1: Using <jar> create war file and place WAR file in BUILD directory --> <!-- <jar jarfile="${baseDir}/build/AntTestForWebApp.war" basedir="${warDir}" /> --> <!-- Option 2: Using <war> create war file and place WAR file in BUILD directory --> <war destfile="${baseDir}/build/AntTestForWebApp.war" webxml="${warDir}/WEB-INF/web.xml"> <zipfileset dir="${warDir}"/> </war> </target> </project> 1/30/2015 Ravi Reddy (Ravinder Nancherla) 7
  • 8. ANT Tutorials  Tutorials How to write a build file for a simple Java Web project Create a simple sample EAR project in your eclipse IDE, Below is the screen shot and build script. 1/30/2015 Ravi Reddy (Ravinder Nancherla) 8
  • 9. ANT Tutorials 1/30/2015 Ravi Reddy (Ravinder Nancherla) 9 <?xml version = "1.0" encoding = "UTF-8"?> <!-- ==========================================================================--> <!-- Trying Build file for EAR Application --> <!-- build.xml, Friday, August 27, 2010 --> <!-- Author: Ravinder Nancherla --> <!-- Email: [email protected] --> <!-- Copyright(c) 2010 Ravinder Nancherla (Ravi Reddy)., All Rights Reserved. --> <!-- ========================================================================= --> <project name="AntEarWarJar" default="buildEar" basedir="."> <property name="webModule" value="C:/SravanthiPractice/AntEarWarJarWeb"/> <property name="ejbModule" value="C:/SravanthiPractice/AntEarWarJarEJB"/> <property name="baseDir" value="${basedir}"/> <property name="build" value="${baseDir}/build"/> <property name="jarDir" value="${baseDir}/build/jar"/> <property name="warDir" value="${baseDir}/build/war"/> <property name="earDir" value="${baseDir}/build/ear"/> <property name="webRootDir" value="${webModule}/WebRoot/WEB-INF"/> <property name="webDir" value="${warDir}/WEB-INF"/> <path id="libClasspath"> <fileset dir="${webRootDir}/lib" includes="**/*.jar" /> </path>
  • 10. ANT Tutorials <!-- Cleaning the build directory --> <target name="clean"> <delete dir="${build}"/> </target> <!-- Initializing/Creating the directories --> <target name="init" depends="clean"> <mkdir dir="${jarDir}/classes"/> <mkdir dir="${jarDir}/jar"/> <mkdir dir="${warDir}/META-INF"/> <mkdir dir="${webDir}/classes"/> <mkdir dir="${webDir}/lib"/> <mkdir dir="${earDir}/META-INF"/> </target> <!-- Compiling and copying the files from EjbModule and WebModiule --> <target name="compile" depends="init"> <javac srcdir="${ejbModule}/src" destdir="${jarDir}/classes" includes="**/*.java"/> <javac srcdir="${webModule}/src" destdir="${webDir}/classes" includes="**/*.java"> <classpath refid="libClasspath"/> </javac> <copy todir="${webDir}/lib"> <fileset dir="${webRootDir}/lib" includes="**/*.jar"/> </copy> 1/30/2015 Ravi Reddy (Ravinder Nancherla) 10
  • 11. ANT Tutorials <copy todir="${webDir}"> <fileset dir="${webRootDir}" includes="web.xml"/> </copy> <copy todir="${warDir}"> <fileset dir="${webModule}/WebRoot" includes="**/*.jsp"/> </copy> <copy todir="${earDir}/META-INF"> <fileset dir="${baseDir}/META-INF" includes="**/*.*"/> </copy> </target> <!-- Creating Jar File --> <target name="buildJar" depends="compile"> <jar jarfile="${earDir}/${ant.project.name}.jar" basedir="${jarDir}"/> <jar jarfile="${jarDir}/jar/${ant.project.name}.jar" basedir="${jarDir}"/> </target> <!-- Creating War File --> <target name="buildWar" depends="compile"> <jar jarfile="${earDir}/${ant.project.name}.war" basedir="${warDir}"/> </target> <!-- Creating Ear File --> <target name="buildEar" depends="buildJar,buildWar"> <jar jarfile="${build}/${ant.project.name}.ear" basedir="${earDir}"/> </target> </project> 1/30/2015 Ravi Reddy (Ravinder Nancherla) 11