SlideShare a Scribd company logo
1 of 14
Download to read offline
Build Scripts 
Reading: Ant article
Why Build Scripts? 
§ For large enterprise systems using the IDE is 
not sufficient for building 
§ Complicated Builds 
§ Automatic Nightly Builds 
§ Special Build Machines 
§ Important to be able to separate build and 
development
What is Ant? 
§ ANT is a tool to build programs 
§ “make” tool 
§ Uses XML file to describe the solution 
§ Default file is build.xml 
§ Uses Java classes to run tasks 
§ Built-in tasks 
§ Jakarta project 
§ http://ant.apache.org 
§ Current version 1.8.2 
§ Installation guidelines are on the course web
Ant in use 
Command Prompt 
Verkefni> 
Verkefni 
build.xml 
src/ 
ant 
Buildfile: build.xml 
... 
Project 
classes/ 
dist/ 
ANT file 
Source 
Class files 
JAR file 
Project>ant 
BUILD SUCCESSFUL 
Total time: 4 seconds
Running Ant 
§ Usage 
ant [options] [target [target2 [target3] ...]] 
§ Target can be selected 
§ Default is used if target is not specifed 
§ Examples 
>ant -buildfile test.xml 
>ant -buildfile test.xml dist 
>ant -buildfile test.xml -Dbuild=build/classes dist
Using Ant 
§ Each build file is one project (one output) 
§ Build file is XML file (for example build.xml) 
§ Project has 
§ Name 
§ Default target 
§ Basedir 
§ One or more target 
§ Target 
<project name="MyProject" 
</project> 
§ Target is a collection of tasks 
§ Task depend on 
other tasks 
default="dist" 
basedir="."> 
... 
<target name="A"/> 
<target name="B" depends="A"/> 
<target name="C" depends="B"/> 
<target name="D" depends="C,B,A"/>
Using Ant 
§ Properties 
§ Have names and values 
<property name="dist" value="dist"/> 
§ Referenced with ${property} 
§ Example: 
<target name="dist" depends="compile"> 
<mkdir dir="${dist}/lib"/> 
<jar jarfile="${dist}/lib/MyProject.jar" basedir="${build}"/> </ 
target>
Example build.xml file 
Import Contents Process
Structure 
§ Work space 
§ build.xml 
§ src/java – contains the Java files 
§ src/msg – contains resource bundles 
§ lib/ - contains libraries (jar files) 
§ Ant made directories 
§ classes/ - compiled Java files – class files 
§ dist/ - distributable - jar files 
§ JAR file 
§ dist/ImportContentProcess.jar
build.xml 
<project name="ImportContentProcess" default="jar" basedir="."> 
<property name="src.java" value="src/java"/> 
<property name="src.msg" value="src/msg"/> 
<property name="output.dir" value="classes"/> 
<property name="dist.dir" value="dist"/> 
<property name="lib.dir" value="lib"/> 
<property name="jar.file" value="ImportContentProcess.jar"/> 
<property name="classpath" 
value="${lib.dir}/rome-0.8.jar:${lib.dir}/jdom.jar:$ 
{lib.dir}/spring.jar:${lib.dir}/commons-logging.jar:${lib.dir}/ 
ruframework.jar"/> 
<target name="init" 
description="Prepare by creating output directories"> 
<mkdir dir="${output.dir}"/> 
<mkdir dir="${dist.dir}"/> 
</target>
build.xml 
<target name="compile" depends="init" 
description="Compilation of all source files"> 
<javac srcdir="${src.java}" 
destdir="${output.dir}" 
classpath="${classpath}"/> 
</target> 
<target name="jar" depends="compile" 
description="Create the JAR"> 
<jar jarfile="${dist.dir}/${jar.file}" 
basedir="${output.dir}"> 
<fileset dir="${src.msg}"/> 
</jar> 
</target> 
<target name="clean" description="Delete all generated files"> 
<delete dir="${output.dir}"/> 
<delete dir="${dist.dir}"/> 
</target> 
</project>
Building 
C:hrHonn>ant 
Buildfile: build.xml 
init: 
[mkdir] Created dir: C:hrHonnclasses 
compile: 
[javac] Compiling 11 source files to C:hrHonnclasses 
jar: 
[jar] Building jar: C:hrHonndistImportContentProcess.jar 
BUILD SUCCESSFUL 
Total time: 2 seconds 
C:hrHonn>java -cp libcommons-logging.jar;libjdom.jar;librome-0.8.jar;libruf 
ramework.jar;libspring.jar;distImportContentProcess.jar 
is.ruframework.process.RuProcessRunner
Using Ant with IntelliJ 
§ Most IDEs support ANT 
§ Must use the same 
folders 
§ IntelliJ has ANT support 
§ Easy to use 
§ Ant is powerful when 
using IntelliJ to develop 
container-based 
programs 
§ For example EJBs, Web 
Apps

More Related Content

What's hot

Frontend Application Architecture, Patterns, and Workflows
Frontend Application Architecture, Patterns, and WorkflowsFrontend Application Architecture, Patterns, and Workflows
Frontend Application Architecture, Patterns, and WorkflowsTreasure Data, Inc.
 
Adobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - IntroductionAdobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - IntroductionTekno Point
 
Content-centric architectures - case study : Apache Sling
Content-centric architectures - case study : Apache SlingContent-centric architectures - case study : Apache Sling
Content-centric architectures - case study : Apache SlingFabrice Hong
 
CQ5 Development Setup, Maven Build and Deployment
CQ5 Development Setup, Maven Build and DeploymentCQ5 Development Setup, Maven Build and Deployment
CQ5 Development Setup, Maven Build and Deploymentklcodanr
 
Cloud browser testing with Gradle and Geb
Cloud browser testing with Gradle and GebCloud browser testing with Gradle and Geb
Cloud browser testing with Gradle and GebDavid Carr
 
Packing for the Web with Webpack
Packing for the Web with WebpackPacking for the Web with Webpack
Packing for the Web with WebpackThiago Temple
 
BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesAlfresco Software
 
Django Multi-DB in Anger
Django Multi-DB in AngerDjango Multi-DB in Anger
Django Multi-DB in AngerLoren Davie
 
Using Play Framework 2 in production
Using Play Framework 2 in productionUsing Play Framework 2 in production
Using Play Framework 2 in productionChristian Papauschek
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpackNodeXperts
 
Bundle your modules with Webpack
Bundle your modules with WebpackBundle your modules with Webpack
Bundle your modules with WebpackJake Peyser
 
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...Sencha
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack IntroductionAnjali Chawla
 
Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012alexismidon
 
Test Automation using Ruby
Test Automation using Ruby Test Automation using Ruby
Test Automation using Ruby Sla Va
 

What's hot (19)

Frontend Application Architecture, Patterns, and Workflows
Frontend Application Architecture, Patterns, and WorkflowsFrontend Application Architecture, Patterns, and Workflows
Frontend Application Architecture, Patterns, and Workflows
 
Adobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - IntroductionAdobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - Introduction
 
Content-centric architectures - case study : Apache Sling
Content-centric architectures - case study : Apache SlingContent-centric architectures - case study : Apache Sling
Content-centric architectures - case study : Apache Sling
 
CQ5 Development Setup, Maven Build and Deployment
CQ5 Development Setup, Maven Build and DeploymentCQ5 Development Setup, Maven Build and Deployment
CQ5 Development Setup, Maven Build and Deployment
 
Cloud browser testing with Gradle and Geb
Cloud browser testing with Gradle and GebCloud browser testing with Gradle and Geb
Cloud browser testing with Gradle and Geb
 
CQ5 and Sling overview
CQ5 and Sling overviewCQ5 and Sling overview
CQ5 and Sling overview
 
Packing for the Web with Webpack
Packing for the Web with WebpackPacking for the Web with Webpack
Packing for the Web with Webpack
 
BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best Practices
 
RequireJS
RequireJSRequireJS
RequireJS
 
Django Multi-DB in Anger
Django Multi-DB in AngerDjango Multi-DB in Anger
Django Multi-DB in Anger
 
Using Play Framework 2 in production
Using Play Framework 2 in productionUsing Play Framework 2 in production
Using Play Framework 2 in production
 
Bower power
Bower powerBower power
Bower power
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
 
Bundle your modules with Webpack
Bundle your modules with WebpackBundle your modules with Webpack
Bundle your modules with Webpack
 
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack Introduction
 
Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012
 
Test Automation using Ruby
Test Automation using Ruby Test Automation using Ruby
Test Automation using Ruby
 
Maven in Mule
Maven in MuleMaven in Mule
Maven in Mule
 

Viewers also liked (16)

Living in the Future
Living in the FutureLiving in the Future
Living in the Future
 
L11 Process Design
L11 Process DesignL11 Process Design
L11 Process Design
 
L20 New Business Models
L20 New Business ModelsL20 New Business Models
L20 New Business Models
 
L20 Agile Principles
L20 Agile PrinciplesL20 Agile Principles
L20 Agile Principles
 
New Technology 2012 Lecture 01 - introduction
New Technology 2012 Lecture 01 - introductionNew Technology 2012 Lecture 01 - introduction
New Technology 2012 Lecture 01 - introduction
 
Processing XML
Processing XMLProcessing XML
Processing XML
 
Hönn2014 L01 Enterprise Applications
Hönn2014 L01 Enterprise ApplicationsHönn2014 L01 Enterprise Applications
Hönn2014 L01 Enterprise Applications
 
L13 Oranizing Domain Logic
L13 Oranizing Domain LogicL13 Oranizing Domain Logic
L13 Oranizing Domain Logic
 
New Technology Lecture L10 Looking for Opportunities
New Technology Lecture L10 Looking for OpportunitiesNew Technology Lecture L10 Looking for Opportunities
New Technology Lecture L10 Looking for Opportunities
 
L01 new technology course description
L01 new technology course descriptionL01 new technology course description
L01 new technology course description
 
Technology And Products
Technology And ProductsTechnology And Products
Technology And Products
 
L05 Design Patterns
L05 Design PatternsL05 Design Patterns
L05 Design Patterns
 
New Technology Lecture L17 The Mobile Revolution
New Technology Lecture L17 The Mobile RevolutionNew Technology Lecture L17 The Mobile Revolution
New Technology Lecture L17 The Mobile Revolution
 
L17 Presentation Layer Design
L17 Presentation Layer DesignL17 Presentation Layer Design
L17 Presentation Layer Design
 
L12 Concurrent Programming
L12 Concurrent ProgrammingL12 Concurrent Programming
L12 Concurrent Programming
 
L02 Software Design
L02 Software DesignL02 Software Design
L02 Software Design
 

Similar to Build Scripts (20)

Ant_quick_guide
Ant_quick_guideAnt_quick_guide
Ant_quick_guide
 
Introduction To Ant
Introduction To AntIntroduction To Ant
Introduction To Ant
 
Apache ant
Apache antApache ant
Apache ant
 
Ant
AntAnt
Ant
 
Intro to-ant
Intro to-antIntro to-ant
Intro to-ant
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with Maven
 
Apache ant
Apache antApache ant
Apache ant
 
Apache ant
Apache antApache ant
Apache ant
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Maven
MavenMaven
Maven
 
GradleFX
GradleFXGradleFX
GradleFX
 
Phing
PhingPhing
Phing
 
Maven
MavenMaven
Maven
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
Java Builds with Maven and Ant
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and Ant
 

More from Ólafur Andri Ragnarsson

New Technology Summer 2020 Course Introduction
New Technology Summer 2020 Course IntroductionNew Technology Summer 2020 Course Introduction
New Technology Summer 2020 Course IntroductionÓlafur Andri Ragnarsson
 
New Technology 2019 L13 Rise of the Machine
New Technology 2019 L13 Rise of the Machine New Technology 2019 L13 Rise of the Machine
New Technology 2019 L13 Rise of the Machine Ólafur Andri Ragnarsson
 

More from Ólafur Andri Ragnarsson (20)

Nýsköpun - Leiðin til framfara
Nýsköpun - Leiðin til framfaraNýsköpun - Leiðin til framfara
Nýsköpun - Leiðin til framfara
 
Nýjast tækni og framtíðin
Nýjast tækni og framtíðinNýjast tækni og framtíðin
Nýjast tækni og framtíðin
 
New Technology Summer 2020 Course Introduction
New Technology Summer 2020 Course IntroductionNew Technology Summer 2020 Course Introduction
New Technology Summer 2020 Course Introduction
 
L01 Introduction
L01 IntroductionL01 Introduction
L01 Introduction
 
L23 Robotics and Drones
L23 Robotics and Drones L23 Robotics and Drones
L23 Robotics and Drones
 
L22 Augmented and Virtual Reality
L22 Augmented and Virtual RealityL22 Augmented and Virtual Reality
L22 Augmented and Virtual Reality
 
L20 Personalised World
L20 Personalised WorldL20 Personalised World
L20 Personalised World
 
L19 Network Platforms
L19 Network PlatformsL19 Network Platforms
L19 Network Platforms
 
L18 Big Data and Analytics
L18 Big Data and AnalyticsL18 Big Data and Analytics
L18 Big Data and Analytics
 
L17 Algorithms and AI
L17 Algorithms and AIL17 Algorithms and AI
L17 Algorithms and AI
 
L16 Internet of Things
L16 Internet of ThingsL16 Internet of Things
L16 Internet of Things
 
L14 From the Internet to Blockchain
L14 From the Internet to BlockchainL14 From the Internet to Blockchain
L14 From the Internet to Blockchain
 
L14 The Mobile Revolution
L14 The Mobile RevolutionL14 The Mobile Revolution
L14 The Mobile Revolution
 
New Technology 2019 L13 Rise of the Machine
New Technology 2019 L13 Rise of the Machine New Technology 2019 L13 Rise of the Machine
New Technology 2019 L13 Rise of the Machine
 
L12 digital transformation
L12 digital transformationL12 digital transformation
L12 digital transformation
 
L10 The Innovator's Dilemma
L10 The Innovator's DilemmaL10 The Innovator's Dilemma
L10 The Innovator's Dilemma
 
L09 Disruptive Technology
L09 Disruptive TechnologyL09 Disruptive Technology
L09 Disruptive Technology
 
L09 Technological Revolutions
L09 Technological RevolutionsL09 Technological Revolutions
L09 Technological Revolutions
 
L07 Becoming Invisible
L07 Becoming InvisibleL07 Becoming Invisible
L07 Becoming Invisible
 
L06 Diffusion of Innovation
L06 Diffusion of InnovationL06 Diffusion of Innovation
L06 Diffusion of Innovation
 

Recently uploaded

Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 

Recently uploaded (20)

Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 

Build Scripts

  • 2. Why Build Scripts? § For large enterprise systems using the IDE is not sufficient for building § Complicated Builds § Automatic Nightly Builds § Special Build Machines § Important to be able to separate build and development
  • 3.
  • 4. What is Ant? § ANT is a tool to build programs § “make” tool § Uses XML file to describe the solution § Default file is build.xml § Uses Java classes to run tasks § Built-in tasks § Jakarta project § http://ant.apache.org § Current version 1.8.2 § Installation guidelines are on the course web
  • 5. Ant in use Command Prompt Verkefni> Verkefni build.xml src/ ant Buildfile: build.xml ... Project classes/ dist/ ANT file Source Class files JAR file Project>ant BUILD SUCCESSFUL Total time: 4 seconds
  • 6. Running Ant § Usage ant [options] [target [target2 [target3] ...]] § Target can be selected § Default is used if target is not specifed § Examples >ant -buildfile test.xml >ant -buildfile test.xml dist >ant -buildfile test.xml -Dbuild=build/classes dist
  • 7. Using Ant § Each build file is one project (one output) § Build file is XML file (for example build.xml) § Project has § Name § Default target § Basedir § One or more target § Target <project name="MyProject" </project> § Target is a collection of tasks § Task depend on other tasks default="dist" basedir="."> ... <target name="A"/> <target name="B" depends="A"/> <target name="C" depends="B"/> <target name="D" depends="C,B,A"/>
  • 8. Using Ant § Properties § Have names and values <property name="dist" value="dist"/> § Referenced with ${property} § Example: <target name="dist" depends="compile"> <mkdir dir="${dist}/lib"/> <jar jarfile="${dist}/lib/MyProject.jar" basedir="${build}"/> </ target>
  • 9. Example build.xml file Import Contents Process
  • 10. Structure § Work space § build.xml § src/java – contains the Java files § src/msg – contains resource bundles § lib/ - contains libraries (jar files) § Ant made directories § classes/ - compiled Java files – class files § dist/ - distributable - jar files § JAR file § dist/ImportContentProcess.jar
  • 11. build.xml <project name="ImportContentProcess" default="jar" basedir="."> <property name="src.java" value="src/java"/> <property name="src.msg" value="src/msg"/> <property name="output.dir" value="classes"/> <property name="dist.dir" value="dist"/> <property name="lib.dir" value="lib"/> <property name="jar.file" value="ImportContentProcess.jar"/> <property name="classpath" value="${lib.dir}/rome-0.8.jar:${lib.dir}/jdom.jar:$ {lib.dir}/spring.jar:${lib.dir}/commons-logging.jar:${lib.dir}/ ruframework.jar"/> <target name="init" description="Prepare by creating output directories"> <mkdir dir="${output.dir}"/> <mkdir dir="${dist.dir}"/> </target>
  • 12. build.xml <target name="compile" depends="init" description="Compilation of all source files"> <javac srcdir="${src.java}" destdir="${output.dir}" classpath="${classpath}"/> </target> <target name="jar" depends="compile" description="Create the JAR"> <jar jarfile="${dist.dir}/${jar.file}" basedir="${output.dir}"> <fileset dir="${src.msg}"/> </jar> </target> <target name="clean" description="Delete all generated files"> <delete dir="${output.dir}"/> <delete dir="${dist.dir}"/> </target> </project>
  • 13. Building C:hrHonn>ant Buildfile: build.xml init: [mkdir] Created dir: C:hrHonnclasses compile: [javac] Compiling 11 source files to C:hrHonnclasses jar: [jar] Building jar: C:hrHonndistImportContentProcess.jar BUILD SUCCESSFUL Total time: 2 seconds C:hrHonn>java -cp libcommons-logging.jar;libjdom.jar;librome-0.8.jar;libruf ramework.jar;libspring.jar;distImportContentProcess.jar is.ruframework.process.RuProcessRunner
  • 14. Using Ant with IntelliJ § Most IDEs support ANT § Must use the same folders § IntelliJ has ANT support § Easy to use § Ant is powerful when using IntelliJ to develop container-based programs § For example EJBs, Web Apps