SlideShare a Scribd company logo
Open Source Tools  in Continuous Integration Environment March 2011 Santa Clara Karim DJAAFAR CO of Jasmine Conseil [email_address]
Who am I ? A JEE Evangelist over 15 years of experience in enterprise and Web technologies Founder and CO of Jasmine Consulting a French and International company focused in JAVA/JEE agile development Author of several books around Eclipse Development Gold Member of Eclipse Foundation, we promote JEE Open Source incubation projects around agile development and JEE Expertise (see JasForge project)
About you  Ant users? Ivy ? Maven users ? Continuous integration ?
Outline Towards a better build process using agile tools Build Managements and repository Continuous Integration, Principles and Tools  Workflow Benefits Jasforge: the unified agile tools Demos
TOWARDS A BETTER BUILD PROCESS USING AGILE TOOLS
What Is a Build? A build is much more than a compile (or its dynamic language variations) A build may consist of the compilation, testing, inspection, and deployment—among other things A build acts as the process for putting source code together and verifying that the software works as a cohesive unit.
Build Tools Automation in a agile scenario CI Build Server Automated testing  Automated code quality Build Tool Agile and collaborative tools
Build Tool Collect input Process inputs Generate final outputs
Build Tool - Inputs Source code Java, SQL Resources Properties, XML Dependencies Libraries, components, frameworks
Build Tool - Processing Compile Run tests Copy files Replace keywords Package Install / deploy
Build Tool - Outputs JAR / WAR / EAR files Zip files Reports
Ant   vs   Maven Ant: Procedural Set path Compile jars Run unit tests Create reports Copy files Assemble WAR Maven: Declarative Define name & version Define as WAR project Specify dependencies Specify unit test plugin
Ant Multi-Project Builds Option 1 – Master build.xml Option 2 – Cascading build.xml's
Maven Project and artifact-based build  platform Uses  repositories to manage  artifacts and third party libraries Customized by modifying the  behavior of the  life-cycle via plugins.
Maven and the Development Build Process Maven the source build management tool for enterprise Java projects Use declarative approche rather then the task-based approach used in Ant or in traditional Make files or shell scripts Promotes the use of standard directory  structures and a well-defined build lifecycle Support quality metric reporting and  documentation generation tool throw the use of plugins
Phases: build life cycle The standard goals for building: compile & test -  compile and test the code package –  build and test the artifact install –  package the artifact and install to local  repository deploy  – package the artifact and copy to the  remote repository (release time) Release management
Common way to build applications MOJO – Maven 2 Plugins Project http://mojo.codehaus.org/ plugins user e.g. mvn install M2 generate- sources compile test install deploy package integration- test Well-known phases mojo mojo mojo mojo mojo bindings
Reports Centralize your project information and documentation for developers and their  managers Integrate project information such as  source code, inspection reports, etc… Reports are used to show the state of the project Can be integrated with little to no configuration on  an existing project Test coverage (eg. Clover), test results, code style (eg Checkstyle, PMD), and many more
Maven main strengh A  Standard way of identifying artifacts Each Maven artifact has a unique identifier, or “coordinates All project interactions go through the repository No more relative paths! Declarative Dependency Management Easy to share between team <repositories> <repository> <id>central</id> <name>Maven Repository Switchboard</name> <layout>default</layout> <url> http://repo1.maven.org/maven2 </url> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories>
Maven in the Eclipse Ecosystem Eclipse IAM ( http://www.eclipse.org/iam/ )  Integration for Apache Maven and direct import of Maven 2 projects continuation of  Q for Eclipse Provide a rich interface over Maven Wizard for creation of new projects using the archetype mechanism of Maven Using m2Eclipse plugin Setting up Maven projects can be done in two ways: using Maven-eclipse-plugin (mvn eclipse:eclipse) or using M2eclipse plugin (see  http://m2eclipse.sonatype.org/ )
Automated web deployment Automating the deployment process using the Cargo Maven plugin Start, stop and install application servers Deploy to different application servers Run a stand-alone instance Or deploy to an existing server Deploy to different  Application server Deploying to an embedded Jetty instance
BUILD MANAGEMENT AND REPOSITORY
Artifact Repository Manager Artifact Search Remote Proxying Cache Artifact Upload Graphical Administration Virtual Repositories RSS Feeds Role-based Security Integrity Reports Maintenance
Archiva Archiva  http://archiva.apache.org   the build artifact repository for use with build tools such as Maven and Ant Proxy and cache Search and repository browser Reporting features User interface Uploading/Deleting artefacts
CONTINUOUS INTEGRATION PRINCIPLES AND TOOLS
What is CI (Continuous Integration) ? “ Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build  (includingtest) to detect integration errors as quickly as possible.” Martin Fowler.
Continuous Integration (CI)  scenario A CI scenario starts with the developer committing source code to the repository.  On a typical project, people in many project roles may commit changes that trigger a CI cycle:  Developers change source code,  database administrators (DBAs) change table definitions, build and deployment teams change configuration files, interface teams change DTD/XSD specifications,  and so on…
Why do we need CI ? Replace big (and long) integration phases with small and frequent ones Ideally instantaneous Think of « incremental compilation » in Eclipse Minimize integration effort Keep the development process running … CI was introduced with XP principles and by Martin Fowler
Workflow Checkout from SCM Code a new feature Run automated build on my machine Repeat 2 and 3 until test pass ! Merge with  latest changes from SCM Fix and rebuild until test pass Commit Run a build on a clean machine Immediately fix bugs and integration issues
Components of a Continuous Integration system CI Repository CI Server Deployment Platform Build Manager Feedback mecanism 1.Checkout:  get all existing source from the repository 1 2 2.Commit:  commit all local modifications in the repository 3 3.Pool:  See if there is a commit in the repository 4 4.Build:  Build construction in the JEE lifecycle. 5 5.Deploy:  Artefact deployment in a target platform 6 6.Feedback:  feedback mecanism like email notification and groupware.
The components of a CI system Commit changes Compile Source Code, Integrate Database, Run Tests, Run Inspections, Deploy Software Feedback Mechanism Generate feedback SCM Server  (Svn, Git, …) CI Server
Version Control Repository Simply put, you must use a version control repository in order to perform  CI Even if you don’t use CI, a version control repository should be standard for your project The purpose of a version control repository is to manage changes to source code and other software assets (such as documentation) using a controlled access repository There are  different types of version control systems you can use too We use  Subversion for most of the examples in this seminar
Continuous Integration not exist without TDD ! A software development practice where members of a team integrate their work frequently usually each person integrates at least daily (Martin Fowler)  CI leads to significantly reduced integration problems and allow a team to develop cohesive software more rapidly and reduce risk To complete this definition Automated, self-testing and fast  builds Make it easy for everyone to get the last executable Automate deployment Everyone can see what’s happening progress, statistics on code coverage tests, etc … Reduced risks
Continuous   Integration Major tools Hudson Writen in java ( https://hudson.dev.java.net/  ) No install required  (put a war in a  web container) Easy to use Powerful Default support for CVS and SVN Great support and active community Cruise Control Continuum Java and Ant/Maven based  Open Source  …
Every commit much triggers a build ! Commit at least daily… As soon as you have completed an independent functionnality A full build on another empty machine Not on your own !  With hudson SCM polling Cron-like scheduller Trigger with http request (from maven or svn commit hook)
Practicing CI or TDD does not make you agile ! Although it is recommended, a CI server isn’t required to perform continuous integration You can write your own custom scripts Moreover, you can manually run an integration build whenever a change is applied to the repository Using a CI server can reduce the number of custom scripts that you would otherwise need to write Many CI servers are freely available and open  source: Cruise Control, Hudson are the most well known  Without active engagement of the customer an organization will NEVER be agile, regardless of the other development techniques used.
THE  INTEGRATED AGILE INFRASTRUCTURE
Managing all the agile tools is a complex process Today, managing and taking control of your software process is a major  challenge for maintaining is capacity to be innovative and competitive Ho can we manage efficiently all these toolls in an unified way ? We must manage the quality of our software development en meet the requirements and delays  in a predictive mode This is the aim of  JasForge©  Project ( http://www.jasforge.com ) :  Taking the control of your development process  using an “agile “ approache
MAVEN AND OSGI:  THE NEW APPLICATION LIFECYCLE MANAGEMENT
The Problem Ant and Maven
Maven to OSGI: the best of the two worlds OSGI specification: A brief recall Define java-based service platform, full dynamic component model Why another specification ? JVM  doesn’t support natively dynamic module system: startting/stoping/updating application on runtime JAR dependencies management missing: no way how to restrict exported packages, enforce imports … Implementation Open Source: Eclipse Equinox/Apache Felix
Maven and OSGI Integration
Version Control Repository Simply put, you must use a version control repository in order to perform  CI Even if you don’t use CI, a version control repository should be standard for your project The purpose of a version control repository is to manage changes to source code and other software assets (such as documentation) using a controlled access repository There are  different types of version control systems you can use too We use  Subversion for most of the examples in this seminar
CI Server A CI server runs an integration build whenever a change is committed to the version control repository Typically, you will configure the CI server to check for changes in a version control repository every few  minutes or so The CI server will retrieve the source files and run a build script or scripts CI servers can also be hard-scheduled to build on a regular frequency, such as every hour (but note that this is not CI).
Some “little” screen casts and demos  Managing your projects Managing users and roles Managing you servers

More Related Content

What's hot (20)

PPTX
Maven ppt
natashasweety7
 
PDF
Automated Deployment with Maven - going the whole nine yards
John Ferguson Smart Limited
 
PPTX
An introduction to Maven
Joao Pereira
 
PPTX
Log management (elk) for spring boot application
Vadym Lotar
 
PDF
Build Automation using Maven
Ankit Gubrani
 
PDF
Continuous integration / deployment with Jenkins
cherryhillco
 
PPSX
Maven Presentation - SureFire vs FailSafe
Holasz Kati
 
PPTX
Introduction to Maven
Onkar Deshpande
 
PPTX
Introduction to maven
Manos Georgopoulos
 
PDF
Continuous Integration With Jenkins
Edureka!
 
PPTX
Docker - A Quick Introduction Guide
Mohammed Fazuluddin
 
PDF
Running Spring Boot Applications as GraalVM Native Images
VMware Tanzu
 
PPTX
Continuous Deployment Pipeline with maven
Alan Parkinson
 
PPTX
Version Management in Maven
Geert Pante
 
PPT
Build And Automation
Rajesh Kumar
 
PDF
Node.js quick intro
Aleksandr Tsertkov
 
PPTX
Build Time Hacking
Mohammed Tanveer
 
PPTX
Jenkins introduction
Gourav Varma
 
Maven ppt
natashasweety7
 
Automated Deployment with Maven - going the whole nine yards
John Ferguson Smart Limited
 
An introduction to Maven
Joao Pereira
 
Log management (elk) for spring boot application
Vadym Lotar
 
Build Automation using Maven
Ankit Gubrani
 
Continuous integration / deployment with Jenkins
cherryhillco
 
Maven Presentation - SureFire vs FailSafe
Holasz Kati
 
Introduction to Maven
Onkar Deshpande
 
Introduction to maven
Manos Georgopoulos
 
Continuous Integration With Jenkins
Edureka!
 
Docker - A Quick Introduction Guide
Mohammed Fazuluddin
 
Running Spring Boot Applications as GraalVM Native Images
VMware Tanzu
 
Continuous Deployment Pipeline with maven
Alan Parkinson
 
Version Management in Maven
Geert Pante
 
Build And Automation
Rajesh Kumar
 
Node.js quick intro
Aleksandr Tsertkov
 
Build Time Hacking
Mohammed Tanveer
 
Jenkins introduction
Gourav Varma
 

Viewers also liked (15)

PPTX
Making software development processes to work for you
Ambientia
 
PPT
Histoire du logigramme Cohabitat Qc
Michel Desgagnés
 
PPTX
Building Social Networks with Open Source Tools
Greg Svitak
 
PDF
Introduction to DevOps and Kanban
Yuval Yeret
 
PDF
Designing OpenStack Architectures
Mirantis
 
PDF
DevOps/Flow workshop for agile india 2015
Yuval Yeret
 
PDF
Deep dive into highly available open stack architecture openstack summit va...
Arthur Berezin
 
PPTX
OpenStack Architecture and Use Cases
Jalal Mostafa
 
PPT
Open Source Tools & Data Science Competitions
odsc
 
PDF
Adobe Presents Internal Service Delivery Platform at Velocity 13 Santa Clara
dev2ops
 
PDF
Support and Initiate a DevOps Transformation
dev2ops
 
ODP
Web 2.0 Technology Building Situational Awareness: Free and Open Source Too...
Connie White
 
PPTX
Delivering IaaS with Open Source Software
Mark Hinkle
 
PDF
OpenStack Architecture
Mirantis
 
PDF
LinkedIn SlideShare: Knowledge, Well-Presented
SlideShare
 
Making software development processes to work for you
Ambientia
 
Histoire du logigramme Cohabitat Qc
Michel Desgagnés
 
Building Social Networks with Open Source Tools
Greg Svitak
 
Introduction to DevOps and Kanban
Yuval Yeret
 
Designing OpenStack Architectures
Mirantis
 
DevOps/Flow workshop for agile india 2015
Yuval Yeret
 
Deep dive into highly available open stack architecture openstack summit va...
Arthur Berezin
 
OpenStack Architecture and Use Cases
Jalal Mostafa
 
Open Source Tools & Data Science Competitions
odsc
 
Adobe Presents Internal Service Delivery Platform at Velocity 13 Santa Clara
dev2ops
 
Support and Initiate a DevOps Transformation
dev2ops
 
Web 2.0 Technology Building Situational Awareness: Free and Open Source Too...
Connie White
 
Delivering IaaS with Open Source Software
Mark Hinkle
 
OpenStack Architecture
Mirantis
 
LinkedIn SlideShare: Knowledge, Well-Presented
SlideShare
 
Ad

Similar to Presentation 1 open source tools in continuous integration environment v1.0 (20)

PDF
TMF2014 CI-CD Workshop Michael Palotas
KJR
 
PPTX
OVerview of Jenkins - A WIP pPT that needs to be refined
removed_7e30d0915f14b559919f338a71e486d1
 
PDF
Agile Bodensee - Testautomation & Continuous Delivery Workshop
Michael Palotas
 
PDF
SE2018_Lec-22_-Continuous-Integration-Tools
Amr E. Mohamed
 
PPT
Continuous Integration (Jenkins/Hudson)
Dennys Hsieh
 
PPT
Continuous Integration: A Case Study
IndicThreads
 
PDF
Jenkins_1679702972.pdf
MahmoudAlnmr1
 
PDF
jenkins.pdf
shahidafrith
 
PDF
Continuous integration and delivery for java based web applications
Sunil Dalal
 
PDF
Continuous integration (eng)
Anatoliy Okhotnikov
 
PDF
Apache Continuum Build, Test, and Release
elliando dias
 
PPTX
Continuous integration using jenkins
Vinay H G
 
PPTX
Continuous Integration
Rahul Sudame
 
PPTX
Jenkins an opensource CICD platform for all
ssuserd7cedc
 
PPTX
Continuous Integration with Jenkins and Java EE
Francesco Marchitelli
 
PPT
Java Build Tools
­Avishek A
 
PPT
Continuous Integration Introduction
Larry Cai
 
PDF
Hands on continouous delivery, I TAKE 2014
Ioan Eugen Stan
 
PDF
Perforce's Java Platform: Continuous Integration For Real
Perforce
 
PDF
Quickstart for continuous integration
Fabricio Epaminondas
 
TMF2014 CI-CD Workshop Michael Palotas
KJR
 
OVerview of Jenkins - A WIP pPT that needs to be refined
removed_7e30d0915f14b559919f338a71e486d1
 
Agile Bodensee - Testautomation & Continuous Delivery Workshop
Michael Palotas
 
SE2018_Lec-22_-Continuous-Integration-Tools
Amr E. Mohamed
 
Continuous Integration (Jenkins/Hudson)
Dennys Hsieh
 
Continuous Integration: A Case Study
IndicThreads
 
Jenkins_1679702972.pdf
MahmoudAlnmr1
 
jenkins.pdf
shahidafrith
 
Continuous integration and delivery for java based web applications
Sunil Dalal
 
Continuous integration (eng)
Anatoliy Okhotnikov
 
Apache Continuum Build, Test, and Release
elliando dias
 
Continuous integration using jenkins
Vinay H G
 
Continuous Integration
Rahul Sudame
 
Jenkins an opensource CICD platform for all
ssuserd7cedc
 
Continuous Integration with Jenkins and Java EE
Francesco Marchitelli
 
Java Build Tools
­Avishek A
 
Continuous Integration Introduction
Larry Cai
 
Hands on continouous delivery, I TAKE 2014
Ioan Eugen Stan
 
Perforce's Java Platform: Continuous Integration For Real
Perforce
 
Quickstart for continuous integration
Fabricio Epaminondas
 
Ad

More from Jasmine Conseil (20)

PDF
JEE 8, A Big Overview
Jasmine Conseil
 
PDF
Meet up paris 13 of jun 2017
Jasmine Conseil
 
PDF
Livraison en continue avec l'outillage devops - Jenkins, Ansible, Docker et ...
Jasmine Conseil
 
PPTX
L'ecosysteme Android, une chance pour le developpement logiciel en Afrique
Jasmine Conseil
 
PPTX
Android Studio, premier contact
Jasmine Conseil
 
PPTX
Android Studio, premier contact
Jasmine Conseil
 
PDF
Ecm 5 13_djaafar_jas_forge
Jasmine Conseil
 
PPT
Part 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
Jasmine Conseil
 
PPT
Part 7 - Managing and fixing bugs with jira using jasforge
Jasmine Conseil
 
PPT
Part6 introducing the jas forge collaborative project
Jasmine Conseil
 
PPT
Part5 - enforcing coding standard and best practices with jas forge v1.0
Jasmine Conseil
 
PPT
Part 4 - Managing your svn repository using jas forge
Jasmine Conseil
 
PPT
Part 3 JasForge the collaborative and agile project v1.0
Jasmine Conseil
 
PPT
JasForge Community project : Future Evolution
Jasmine Conseil
 
PPT
JasForge Community project : Future Evolution
Jasmine Conseil
 
PPT
JasForge : the collaborative agile project
Jasmine Conseil
 
PPT
Jasforgepresentationv1 3
Jasmine Conseil
 
PPT
JasForge: The Agile Collaborative Platform
Jasmine Conseil
 
PPT
Jasforge : The Collaborative Agile Project
Jasmine Conseil
 
PPT
Jasforge Agile Collaborative Platform
Jasmine Conseil
 
JEE 8, A Big Overview
Jasmine Conseil
 
Meet up paris 13 of jun 2017
Jasmine Conseil
 
Livraison en continue avec l'outillage devops - Jenkins, Ansible, Docker et ...
Jasmine Conseil
 
L'ecosysteme Android, une chance pour le developpement logiciel en Afrique
Jasmine Conseil
 
Android Studio, premier contact
Jasmine Conseil
 
Android Studio, premier contact
Jasmine Conseil
 
Ecm 5 13_djaafar_jas_forge
Jasmine Conseil
 
Part 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
Jasmine Conseil
 
Part 7 - Managing and fixing bugs with jira using jasforge
Jasmine Conseil
 
Part6 introducing the jas forge collaborative project
Jasmine Conseil
 
Part5 - enforcing coding standard and best practices with jas forge v1.0
Jasmine Conseil
 
Part 4 - Managing your svn repository using jas forge
Jasmine Conseil
 
Part 3 JasForge the collaborative and agile project v1.0
Jasmine Conseil
 
JasForge Community project : Future Evolution
Jasmine Conseil
 
JasForge Community project : Future Evolution
Jasmine Conseil
 
JasForge : the collaborative agile project
Jasmine Conseil
 
Jasforgepresentationv1 3
Jasmine Conseil
 
JasForge: The Agile Collaborative Platform
Jasmine Conseil
 
Jasforge : The Collaborative Agile Project
Jasmine Conseil
 
Jasforge Agile Collaborative Platform
Jasmine Conseil
 

Recently uploaded (20)

PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 

Presentation 1 open source tools in continuous integration environment v1.0

  • 1. Open Source Tools in Continuous Integration Environment March 2011 Santa Clara Karim DJAAFAR CO of Jasmine Conseil [email_address]
  • 2. Who am I ? A JEE Evangelist over 15 years of experience in enterprise and Web technologies Founder and CO of Jasmine Consulting a French and International company focused in JAVA/JEE agile development Author of several books around Eclipse Development Gold Member of Eclipse Foundation, we promote JEE Open Source incubation projects around agile development and JEE Expertise (see JasForge project)
  • 3. About you Ant users? Ivy ? Maven users ? Continuous integration ?
  • 4. Outline Towards a better build process using agile tools Build Managements and repository Continuous Integration, Principles and Tools Workflow Benefits Jasforge: the unified agile tools Demos
  • 5. TOWARDS A BETTER BUILD PROCESS USING AGILE TOOLS
  • 6. What Is a Build? A build is much more than a compile (or its dynamic language variations) A build may consist of the compilation, testing, inspection, and deployment—among other things A build acts as the process for putting source code together and verifying that the software works as a cohesive unit.
  • 7. Build Tools Automation in a agile scenario CI Build Server Automated testing Automated code quality Build Tool Agile and collaborative tools
  • 8. Build Tool Collect input Process inputs Generate final outputs
  • 9. Build Tool - Inputs Source code Java, SQL Resources Properties, XML Dependencies Libraries, components, frameworks
  • 10. Build Tool - Processing Compile Run tests Copy files Replace keywords Package Install / deploy
  • 11. Build Tool - Outputs JAR / WAR / EAR files Zip files Reports
  • 12. Ant vs Maven Ant: Procedural Set path Compile jars Run unit tests Create reports Copy files Assemble WAR Maven: Declarative Define name & version Define as WAR project Specify dependencies Specify unit test plugin
  • 13. Ant Multi-Project Builds Option 1 – Master build.xml Option 2 – Cascading build.xml's
  • 14. Maven Project and artifact-based build platform Uses repositories to manage artifacts and third party libraries Customized by modifying the behavior of the life-cycle via plugins.
  • 15. Maven and the Development Build Process Maven the source build management tool for enterprise Java projects Use declarative approche rather then the task-based approach used in Ant or in traditional Make files or shell scripts Promotes the use of standard directory structures and a well-defined build lifecycle Support quality metric reporting and documentation generation tool throw the use of plugins
  • 16. Phases: build life cycle The standard goals for building: compile & test - compile and test the code package – build and test the artifact install – package the artifact and install to local repository deploy – package the artifact and copy to the remote repository (release time) Release management
  • 17. Common way to build applications MOJO – Maven 2 Plugins Project http://mojo.codehaus.org/ plugins user e.g. mvn install M2 generate- sources compile test install deploy package integration- test Well-known phases mojo mojo mojo mojo mojo bindings
  • 18. Reports Centralize your project information and documentation for developers and their managers Integrate project information such as source code, inspection reports, etc… Reports are used to show the state of the project Can be integrated with little to no configuration on an existing project Test coverage (eg. Clover), test results, code style (eg Checkstyle, PMD), and many more
  • 19. Maven main strengh A Standard way of identifying artifacts Each Maven artifact has a unique identifier, or “coordinates All project interactions go through the repository No more relative paths! Declarative Dependency Management Easy to share between team <repositories> <repository> <id>central</id> <name>Maven Repository Switchboard</name> <layout>default</layout> <url> http://repo1.maven.org/maven2 </url> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories>
  • 20. Maven in the Eclipse Ecosystem Eclipse IAM ( http://www.eclipse.org/iam/ ) Integration for Apache Maven and direct import of Maven 2 projects continuation of Q for Eclipse Provide a rich interface over Maven Wizard for creation of new projects using the archetype mechanism of Maven Using m2Eclipse plugin Setting up Maven projects can be done in two ways: using Maven-eclipse-plugin (mvn eclipse:eclipse) or using M2eclipse plugin (see http://m2eclipse.sonatype.org/ )
  • 21. Automated web deployment Automating the deployment process using the Cargo Maven plugin Start, stop and install application servers Deploy to different application servers Run a stand-alone instance Or deploy to an existing server Deploy to different Application server Deploying to an embedded Jetty instance
  • 22. BUILD MANAGEMENT AND REPOSITORY
  • 23. Artifact Repository Manager Artifact Search Remote Proxying Cache Artifact Upload Graphical Administration Virtual Repositories RSS Feeds Role-based Security Integrity Reports Maintenance
  • 24. Archiva Archiva http://archiva.apache.org the build artifact repository for use with build tools such as Maven and Ant Proxy and cache Search and repository browser Reporting features User interface Uploading/Deleting artefacts
  • 26. What is CI (Continuous Integration) ? “ Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (includingtest) to detect integration errors as quickly as possible.” Martin Fowler.
  • 27. Continuous Integration (CI) scenario A CI scenario starts with the developer committing source code to the repository. On a typical project, people in many project roles may commit changes that trigger a CI cycle: Developers change source code, database administrators (DBAs) change table definitions, build and deployment teams change configuration files, interface teams change DTD/XSD specifications, and so on…
  • 28. Why do we need CI ? Replace big (and long) integration phases with small and frequent ones Ideally instantaneous Think of « incremental compilation » in Eclipse Minimize integration effort Keep the development process running … CI was introduced with XP principles and by Martin Fowler
  • 29. Workflow Checkout from SCM Code a new feature Run automated build on my machine Repeat 2 and 3 until test pass ! Merge with latest changes from SCM Fix and rebuild until test pass Commit Run a build on a clean machine Immediately fix bugs and integration issues
  • 30. Components of a Continuous Integration system CI Repository CI Server Deployment Platform Build Manager Feedback mecanism 1.Checkout: get all existing source from the repository 1 2 2.Commit: commit all local modifications in the repository 3 3.Pool: See if there is a commit in the repository 4 4.Build: Build construction in the JEE lifecycle. 5 5.Deploy: Artefact deployment in a target platform 6 6.Feedback: feedback mecanism like email notification and groupware.
  • 31. The components of a CI system Commit changes Compile Source Code, Integrate Database, Run Tests, Run Inspections, Deploy Software Feedback Mechanism Generate feedback SCM Server (Svn, Git, …) CI Server
  • 32. Version Control Repository Simply put, you must use a version control repository in order to perform CI Even if you don’t use CI, a version control repository should be standard for your project The purpose of a version control repository is to manage changes to source code and other software assets (such as documentation) using a controlled access repository There are different types of version control systems you can use too We use Subversion for most of the examples in this seminar
  • 33. Continuous Integration not exist without TDD ! A software development practice where members of a team integrate their work frequently usually each person integrates at least daily (Martin Fowler) CI leads to significantly reduced integration problems and allow a team to develop cohesive software more rapidly and reduce risk To complete this definition Automated, self-testing and fast builds Make it easy for everyone to get the last executable Automate deployment Everyone can see what’s happening progress, statistics on code coverage tests, etc … Reduced risks
  • 34. Continuous Integration Major tools Hudson Writen in java ( https://hudson.dev.java.net/ ) No install required (put a war in a web container) Easy to use Powerful Default support for CVS and SVN Great support and active community Cruise Control Continuum Java and Ant/Maven based Open Source …
  • 35. Every commit much triggers a build ! Commit at least daily… As soon as you have completed an independent functionnality A full build on another empty machine Not on your own ! With hudson SCM polling Cron-like scheduller Trigger with http request (from maven or svn commit hook)
  • 36. Practicing CI or TDD does not make you agile ! Although it is recommended, a CI server isn’t required to perform continuous integration You can write your own custom scripts Moreover, you can manually run an integration build whenever a change is applied to the repository Using a CI server can reduce the number of custom scripts that you would otherwise need to write Many CI servers are freely available and open source: Cruise Control, Hudson are the most well known Without active engagement of the customer an organization will NEVER be agile, regardless of the other development techniques used.
  • 37. THE INTEGRATED AGILE INFRASTRUCTURE
  • 38. Managing all the agile tools is a complex process Today, managing and taking control of your software process is a major challenge for maintaining is capacity to be innovative and competitive Ho can we manage efficiently all these toolls in an unified way ? We must manage the quality of our software development en meet the requirements and delays in a predictive mode This is the aim of JasForge© Project ( http://www.jasforge.com ) : Taking the control of your development process using an “agile “ approache
  • 39. MAVEN AND OSGI: THE NEW APPLICATION LIFECYCLE MANAGEMENT
  • 40. The Problem Ant and Maven
  • 41. Maven to OSGI: the best of the two worlds OSGI specification: A brief recall Define java-based service platform, full dynamic component model Why another specification ? JVM doesn’t support natively dynamic module system: startting/stoping/updating application on runtime JAR dependencies management missing: no way how to restrict exported packages, enforce imports … Implementation Open Source: Eclipse Equinox/Apache Felix
  • 42. Maven and OSGI Integration
  • 43. Version Control Repository Simply put, you must use a version control repository in order to perform CI Even if you don’t use CI, a version control repository should be standard for your project The purpose of a version control repository is to manage changes to source code and other software assets (such as documentation) using a controlled access repository There are different types of version control systems you can use too We use Subversion for most of the examples in this seminar
  • 44. CI Server A CI server runs an integration build whenever a change is committed to the version control repository Typically, you will configure the CI server to check for changes in a version control repository every few minutes or so The CI server will retrieve the source files and run a build script or scripts CI servers can also be hard-scheduled to build on a regular frequency, such as every hour (but note that this is not CI).
  • 45. Some “little” screen casts and demos Managing your projects Managing users and roles Managing you servers

Editor's Notes

  • #32: 1. First, a developer commits code to the version control repository. Meanwhile, the CI server on the integration build machine is polling this repository for changes (e.g., every few minutes). 2. Soon after a commit occurs, the CI server detects that changes have occurred in the version control repository, so the CI server retrieves the latest copy of the code from the repository and then executes a build script, which integrates the software. 3. The CI server generates feedback by e-mailing build results to specified project members. 4. The CI server continues to poll for changes in the version control repository.