SlideShare a Scribd company logo
1 of 26
Download to read offline
Maven
From Scratch to Production
              by: Johan Mynhardt |
                Durban JUG Meeting |
                       12 May 2011|
What this is *not*

•   Ripe ground for flame-war
•   Argumenting that:
    • X is better than Y.
    • Y is better than X.
    • I can do this with X by making use of Z.
•   A session to convince you
Objectives

•   Set up a Maven project
•   Set up the CI environment with Apache Continuum
•   See everything in action!
Project Technologies

•   Java EE 6
    • Glassfish Application Server
    • EJB 3.1
    • JSF 2.0
        • PrimeFaces
•   Continuous Integration and Project Management (from
    development perspective)
    • Apache Continuum
    • Apache Maven
Maven's Objectives

•   Making the build process easy
•   Providing a uniform build system
•   Providing quality project information
•   Providing guidelines for best practices development




                                http://maven.apache.org/what-is-maven.html
Setting up the Project: HelloWorld


•   Create the project root by running the following:
     ~/$ cd workspace
      ~/$ cd workspace
     ~/workspace$ mvn archetype:generate 
      ~/workspace$ mvn archetype:generate
     -Dversion=1.0-SNAPSHOT 
      -Dversion=1.0-SNAPSHOT
     -DgroupId=za.co.thumbtribe.djug 
      -DgroupId=za.co.thumbtribe.djug
     -DartifactId=HelloWorld
      -DartifactId=HelloWorld

•   Select the number for the line matching (in this case 110):
     110: remote -> maven-archetype-quickstart (An archetype which
      110: remote -> maven-archetype-quickstart (An archetype which
     contains aasample Maven project.)
      contains   sample Maven project.)

•   This will be the root of the project, containing the web, service and assemble
    sub-modules (multi-module project)
    • You now have the chance to add project-specific documentation and parameters
       to the pom.xml which you can later on, share with you developers. The
       convenience is that you don't need to keep track of every aspect of the project in
       external documentation, as everything needed is already available.
Configuring the Documentation


•   Development
    •   Source Code Management
    •   Collaboration Management
    •   Notification Management
    •   Continuous Integration
    •   Distribution Management
•   Other Information
    •   Developers
    •   Contributors
    •   Reporting
    •   Licenses
    •   Organisation
Setting up Continuous Integration


•   Download Apache Continuum
       • http://continuum.apache.org/download.html
    • Standalone bundled with Apache Tomcat
    • WAR for deployment on an Application Server
•   Unzip to destination
       tar zxvf apache-continuum-1.3.7-bin.tar.gz
        tar zxvf apache-continuum-1.3.7-bin.tar.gz

•   Start up Continuum
       ./continuum start
        ./continuum start

•   Set up project in Continuum
    • make the root pom.xml available via web
        • file protocol supported, but needs configuration
Some Continuum Features


•   Tool support:
    • Maven 1, 2 and 3
    • ANT
    • Shell Scripts
•   Build Types:
    • Manual
    • Scheduled
    • Push with xmlrpc
•   Distributed Builds
•   Parallel Builds
Seeing Continuum in Action


•   Release Stages
    • Prepare for Release
    • Do the Release
•   Build Result
    • Artifacts deployed to the repository
        • If it's public, users will have access to the POMs and the resources
          the POM files describe.
    • Site with:
        • Generated Test Results and Project JavaDoc,
        • Project information,
        • Dependency Information and many more...
    • Resources deployed to staging and/or production environment
        • (dependend on setup)
References

•   Apache
    • Maven:               | http://maven.apache.org/
    • Continuum:           | http://continuum.apache.org/
•   Glassfish
    • Application Server   | http://glassfish.java.net/
•   Prime Teknoloji
    • PrimeFaces:          | http://www.primefaces.org/
End




      Thank you for attending!
About the author

• Junior Java Developer @ Thumbtribe Mobile Solutions
• Passionate about Linux, Java and technology in general
• Description in less than 3 lines:
   • technology++ cats++ coffee++ java++ linux++ intellij++
   • eclipse-- dogs-- tea-- M$--

  Follow on Twitter:
   • @johanmynhardt
05/13/11




                                 Maven
             From Scratch to Production
                           by: Johan Mynhardt |
                             Durban JUG Meeting |
                                    12 May 2011|



Welcome note
Introduce yourself
Why maven as a topic?
05/13/11




             What this is *not*

         •   Ripe ground for flame-war
         •   Argumenting that:
             • X is better than Y.
             • Y is better than X.
             • I can do this with X by making use of Z.
         •   A session to convince you




Avoid conflict and flame-wars :P
05/13/11




             Objectives

         •   Set up a Maven project
         •   Set up the CI environment with Apache Continuum
         •   See everything in action!




Quick overview of the entire presentation's objective
05/13/11




             Project Technologies

         •   Java EE 6
             • Glassfish Application Server
             • EJB 3.1
             • JSF 2.0
                 • PrimeFaces
         •   Continuous Integration and Project Management (from
             development perspective)
             • Apache Continuum
             • Apache Maven




Quick word on technologies used in the skeleton project
which took some time to set up
05/13/11




    Maven's Objectives

•   Making the build process easy
•   Providing a uniform build system
•   Providing quality project information
•   Providing guidelines for best practices development




                                http://maven.apache.org/what-is-maven.html
05/13/11




             Setting up the Project: HelloWorld


         •   Create the project root by running the following:
              ~/$ cd workspace
               ~/$ cd workspace
              ~/workspace$ mvn archetype:generate 
               ~/workspace$ mvn archetype:generate
              -Dversion=1.0-SNAPSHOT 
               -Dversion=1.0-SNAPSHOT
              -DgroupId=za.co.thumbtribe.djug 
               -DgroupId=za.co.thumbtribe.djug
              -DartifactId=HelloWorld
               -DartifactId=HelloWorld

         •   Select the number for the line matching (in this case 110):
              110: remote -> maven-archetype-quickstart (An archetype which
               110: remote -> maven-archetype-quickstart (An archetype which
              contains aasample Maven project.)
               contains   sample Maven project.)

         •   This will be the root of the project, containing the web, service and assemble
             sub-modules (multi-module project)
             • You now have the chance to add project-specific documentation and parameters
                to the pom.xml which you can later on, share with you developers. The
                convenience is that you don't need to keep track of every aspect of the project in
                external documentation, as everything needed is already available.




The first steps in creating a maven project.


Creating the child Modules are excluded.
Child modules can be created using different project templates, war,
ejb, ear, portlet etc.


Steps excluded from setup:
      version control (subversion)
      ssh keys
      web config for project documentation
05/13/11




             Configuring the Documentation


         •   Development
             •   Source Code Management
             •   Collaboration Management
             •   Notification Management
             •   Continuous Integration
             •   Distribution Management
         •   Other Information
             •   Developers
             •   Contributors
             •   Reporting
             •   Licenses
             •   Organisation




Just covering the most parts needed for enabling the project to a
production environment
05/13/11




             Setting up Continuous Integration


         •   Download Apache Continuum
                • http://continuum.apache.org/download.html
             • Standalone bundled with Apache Tomcat
             • WAR for deployment on an Application Server
         •   Unzip to destination
                tar zxvf apache-continuum-1.3.7-bin.tar.gz
                 tar zxvf apache-continuum-1.3.7-bin.tar.gz

         •   Start up Continuum
                ./continuum start
                 ./continuum start

         •   Set up project in Continuum
             • make the root pom.xml available via web
                 • file protocol supported, but needs configuration




The standalone option is the easiest


Setup in Glassfish requires JNDI resources being set up
      mail
      database
      logging config (working though)


Depending on the project the default build flow is sufficient (for using
the root POM and produce artifacts)
05/13/11




                Some Continuum Features


            •   Tool support:
                • Maven 1, 2 and 3
                • ANT
                • Shell Scripts
            •   Build Types:
                • Manual
                • Scheduled
                • Push with xmlrpc
            •   Distributed Builds
            •   Parallel Builds




SCM support :
CVS,
Subversion,
Clearcase,
Perforce,
Starteam,
Visual Source Safe,
CM Synergy,
Bazaar,
Mercurial
05/13/11




             Seeing Continuum in Action


         •   Release Stages
             • Prepare for Release
             • Do the Release
         •   Build Result
             • Artifacts deployed to the repository
                 • If it's public, users will have access to the POMs and the resources
                   the POM files describe.
             • Site with:
                 • Generated Test Results and Project JavaDoc,
                 • Project information,
                 • Dependency Information and many more...
             • Resources deployed to staging and/or production environment
                 • (dependend on setup)




Release preparation sees to it that most of the build issues are sorted
out before a release. (issues not discovered in a normal build)


Once preparation succeeds the build is ready for release.


After the release build all the documentation and relevant information
will be available in a web format which can be published, using the site
plugin.


The site plugin enhances the developer experience in that for example,
a new developer joins the team, he/she can be pointed to the project
site which has all the required documentation.
05/13/11




    References

•   Apache
    • Maven:               | http://maven.apache.org/
    • Continuum:           | http://continuum.apache.org/
•   Glassfish
    • Application Server   | http://glassfish.java.net/
•   Prime Teknoloji
    • PrimeFaces:          | http://www.primefaces.org/
05/13/11




End




      Thank you for attending!
05/13/11




About the author

• Junior Java Developer @ Thumbtribe Mobile Solutions
• Passionate about Linux, Java and technology in general
• Description in less than 3 lines:
   • technology++ cats++ coffee++ java++ linux++ intellij++
   • eclipse-- dogs-- tea-- M$--

  Follow on Twitter:
   • @johanmynhardt

More Related Content

What's hot

ZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small TeamsZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small TeamsJoe Ferguson
 
ToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promisesToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
BordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promisesBordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
YaJUG-Maven 3.x, will it lives up to its promises
YaJUG-Maven 3.x, will it lives up to its promisesYaJUG-Maven 3.x, will it lives up to its promises
YaJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
Large scale automation with jenkins
Large scale automation with jenkinsLarge scale automation with jenkins
Large scale automation with jenkinsKohsuke Kawaguchi
 
Learning Maven by Example
Learning Maven by ExampleLearning Maven by Example
Learning Maven by ExampleHsi-Kai Wang
 
maven
mavenmaven
mavenakd11
 
Java Builds with Maven and Ant
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and AntDavid Noble
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - ExplainedSmita Prasad
 
Continuous Integration & Drupal
Continuous Integration & DrupalContinuous Integration & Drupal
Continuous Integration & DrupalLimoenGroen
 
Java build tools
Java build toolsJava build tools
Java build toolsSujit Kumar
 
perlbrew yapcasia 2010
perlbrew yapcasia 2010perlbrew yapcasia 2010
perlbrew yapcasia 2010Kang-min Liu
 

What's hot (20)

ZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small TeamsZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small Teams
 
Maven
MavenMaven
Maven
 
ToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promisesToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promises
 
BordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promisesBordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promises
 
YaJUG-Maven 3.x, will it lives up to its promises
YaJUG-Maven 3.x, will it lives up to its promisesYaJUG-Maven 3.x, will it lives up to its promises
YaJUG-Maven 3.x, will it lives up to its promises
 
Large scale automation with jenkins
Large scale automation with jenkinsLarge scale automation with jenkins
Large scale automation with jenkins
 
Learning Maven by Example
Learning Maven by ExampleLearning Maven by Example
Learning Maven by Example
 
maven
mavenmaven
maven
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Apache maven 2 overview
Apache maven 2 overviewApache maven 2 overview
Apache maven 2 overview
 
Maven tutorial
Maven tutorialMaven tutorial
Maven tutorial
 
Java Builds with Maven and Ant
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and Ant
 
Maven
MavenMaven
Maven
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
 
Continuous Integration & Drupal
Continuous Integration & DrupalContinuous Integration & Drupal
Continuous Integration & Drupal
 
Maven tutorial
Maven tutorialMaven tutorial
Maven tutorial
 
Maven
MavenMaven
Maven
 
Java build tools
Java build toolsJava build tools
Java build tools
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 
perlbrew yapcasia 2010
perlbrew yapcasia 2010perlbrew yapcasia 2010
perlbrew yapcasia 2010
 

Viewers also liked

презентация1
презентация1презентация1
презентация1m_nadya54
 
Stance of women around the world.
Stance of women around the world.Stance of women around the world.
Stance of women around the world.Bayan201
 
Natures Best Ltd Presentation
Natures Best Ltd PresentationNatures Best Ltd Presentation
Natures Best Ltd PresentationPhotopaddy
 
Maven from Scratch to Production (.odp)
Maven from Scratch to Production (.odp)Maven from Scratch to Production (.odp)
Maven from Scratch to Production (.odp)Johan Mynhardt
 
Ywse project
Ywse projectYwse project
Ywse projectBayan201
 
Nature's Best Ltd Company Presentation
Nature's Best Ltd Company PresentationNature's Best Ltd Company Presentation
Nature's Best Ltd Company PresentationPhotopaddy
 
презентация1
презентация1презентация1
презентация1m_nadya54
 

Viewers also liked (7)

презентация1
презентация1презентация1
презентация1
 
Stance of women around the world.
Stance of women around the world.Stance of women around the world.
Stance of women around the world.
 
Natures Best Ltd Presentation
Natures Best Ltd PresentationNatures Best Ltd Presentation
Natures Best Ltd Presentation
 
Maven from Scratch to Production (.odp)
Maven from Scratch to Production (.odp)Maven from Scratch to Production (.odp)
Maven from Scratch to Production (.odp)
 
Ywse project
Ywse projectYwse project
Ywse project
 
Nature's Best Ltd Company Presentation
Nature's Best Ltd Company PresentationNature's Best Ltd Company Presentation
Nature's Best Ltd Company Presentation
 
презентация1
презентация1презентация1
презентация1
 

Similar to Maven: from Scratch to Production (.pdf)

DCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityDCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityGeoff Harcourt
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topicGourav Varma
 
Vagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVaidik Kapoor
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsPablo Godel
 
Automating Web Application Deployment
Automating Web Application DeploymentAutomating Web Application Deployment
Automating Web Application DeploymentMathew Byrne
 
Midwest PHP - Scaling Magento
Midwest PHP - Scaling MagentoMidwest PHP - Scaling Magento
Midwest PHP - Scaling MagentoMathew Beane
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Michael Lihs
 
Undine: Turnkey Drupal Development Environments
Undine: Turnkey Drupal Development EnvironmentsUndine: Turnkey Drupal Development Environments
Undine: Turnkey Drupal Development EnvironmentsDavid Watson
 
Ankit Chohan - Java
Ankit Chohan - JavaAnkit Chohan - Java
Ankit Chohan - JavaAnkit Chohan
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svnAnkur Goyal
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
 
Extending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsExtending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsPetr Jiricka
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsMichael Lihs
 

Similar to Maven: from Scratch to Production (.pdf) (20)

DCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityDCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production Parity
 
Devops
DevopsDevops
Devops
 
Mavennotes.pdf
Mavennotes.pdfMavennotes.pdf
Mavennotes.pdf
 
Build tool
Build toolBuild tool
Build tool
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
Deploying PHP apps on the cloud
Deploying PHP apps on the cloudDeploying PHP apps on the cloud
Deploying PHP apps on the cloud
 
Vagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps Culture
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
 
Automating Web Application Deployment
Automating Web Application DeploymentAutomating Web Application Deployment
Automating Web Application Deployment
 
Midwest PHP - Scaling Magento
Midwest PHP - Scaling MagentoMidwest PHP - Scaling Magento
Midwest PHP - Scaling Magento
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
Undine: Turnkey Drupal Development Environments
Undine: Turnkey Drupal Development EnvironmentsUndine: Turnkey Drupal Development Environments
Undine: Turnkey Drupal Development Environments
 
ONAP on Vagrant
ONAP on VagrantONAP on Vagrant
ONAP on Vagrant
 
Ankit Chohan - Java
Ankit Chohan - JavaAnkit Chohan - Java
Ankit Chohan - Java
 
DevOps tools for winning agility
DevOps tools for winning agilityDevOps tools for winning agility
DevOps tools for winning agility
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svn
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
What is maven
What is mavenWhat is maven
What is maven
 
Extending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsExtending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.js
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
 

Recently uploaded

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Recently uploaded (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

Maven: from Scratch to Production (.pdf)

  • 1. Maven From Scratch to Production by: Johan Mynhardt | Durban JUG Meeting | 12 May 2011|
  • 2. What this is *not* • Ripe ground for flame-war • Argumenting that: • X is better than Y. • Y is better than X. • I can do this with X by making use of Z. • A session to convince you
  • 3. Objectives • Set up a Maven project • Set up the CI environment with Apache Continuum • See everything in action!
  • 4. Project Technologies • Java EE 6 • Glassfish Application Server • EJB 3.1 • JSF 2.0 • PrimeFaces • Continuous Integration and Project Management (from development perspective) • Apache Continuum • Apache Maven
  • 5. Maven's Objectives • Making the build process easy • Providing a uniform build system • Providing quality project information • Providing guidelines for best practices development http://maven.apache.org/what-is-maven.html
  • 6. Setting up the Project: HelloWorld • Create the project root by running the following: ~/$ cd workspace ~/$ cd workspace ~/workspace$ mvn archetype:generate ~/workspace$ mvn archetype:generate -Dversion=1.0-SNAPSHOT -Dversion=1.0-SNAPSHOT -DgroupId=za.co.thumbtribe.djug -DgroupId=za.co.thumbtribe.djug -DartifactId=HelloWorld -DartifactId=HelloWorld • Select the number for the line matching (in this case 110): 110: remote -> maven-archetype-quickstart (An archetype which 110: remote -> maven-archetype-quickstart (An archetype which contains aasample Maven project.) contains sample Maven project.) • This will be the root of the project, containing the web, service and assemble sub-modules (multi-module project) • You now have the chance to add project-specific documentation and parameters to the pom.xml which you can later on, share with you developers. The convenience is that you don't need to keep track of every aspect of the project in external documentation, as everything needed is already available.
  • 7. Configuring the Documentation • Development • Source Code Management • Collaboration Management • Notification Management • Continuous Integration • Distribution Management • Other Information • Developers • Contributors • Reporting • Licenses • Organisation
  • 8. Setting up Continuous Integration • Download Apache Continuum • http://continuum.apache.org/download.html • Standalone bundled with Apache Tomcat • WAR for deployment on an Application Server • Unzip to destination tar zxvf apache-continuum-1.3.7-bin.tar.gz tar zxvf apache-continuum-1.3.7-bin.tar.gz • Start up Continuum ./continuum start ./continuum start • Set up project in Continuum • make the root pom.xml available via web • file protocol supported, but needs configuration
  • 9. Some Continuum Features • Tool support: • Maven 1, 2 and 3 • ANT • Shell Scripts • Build Types: • Manual • Scheduled • Push with xmlrpc • Distributed Builds • Parallel Builds
  • 10. Seeing Continuum in Action • Release Stages • Prepare for Release • Do the Release • Build Result • Artifacts deployed to the repository • If it's public, users will have access to the POMs and the resources the POM files describe. • Site with: • Generated Test Results and Project JavaDoc, • Project information, • Dependency Information and many more... • Resources deployed to staging and/or production environment • (dependend on setup)
  • 11. References • Apache • Maven: | http://maven.apache.org/ • Continuum: | http://continuum.apache.org/ • Glassfish • Application Server | http://glassfish.java.net/ • Prime Teknoloji • PrimeFaces: | http://www.primefaces.org/
  • 12. End Thank you for attending!
  • 13. About the author • Junior Java Developer @ Thumbtribe Mobile Solutions • Passionate about Linux, Java and technology in general • Description in less than 3 lines: • technology++ cats++ coffee++ java++ linux++ intellij++ • eclipse-- dogs-- tea-- M$-- Follow on Twitter: • @johanmynhardt
  • 14. 05/13/11 Maven From Scratch to Production by: Johan Mynhardt | Durban JUG Meeting | 12 May 2011| Welcome note Introduce yourself Why maven as a topic?
  • 15. 05/13/11 What this is *not* • Ripe ground for flame-war • Argumenting that: • X is better than Y. • Y is better than X. • I can do this with X by making use of Z. • A session to convince you Avoid conflict and flame-wars :P
  • 16. 05/13/11 Objectives • Set up a Maven project • Set up the CI environment with Apache Continuum • See everything in action! Quick overview of the entire presentation's objective
  • 17. 05/13/11 Project Technologies • Java EE 6 • Glassfish Application Server • EJB 3.1 • JSF 2.0 • PrimeFaces • Continuous Integration and Project Management (from development perspective) • Apache Continuum • Apache Maven Quick word on technologies used in the skeleton project which took some time to set up
  • 18. 05/13/11 Maven's Objectives • Making the build process easy • Providing a uniform build system • Providing quality project information • Providing guidelines for best practices development http://maven.apache.org/what-is-maven.html
  • 19. 05/13/11 Setting up the Project: HelloWorld • Create the project root by running the following: ~/$ cd workspace ~/$ cd workspace ~/workspace$ mvn archetype:generate ~/workspace$ mvn archetype:generate -Dversion=1.0-SNAPSHOT -Dversion=1.0-SNAPSHOT -DgroupId=za.co.thumbtribe.djug -DgroupId=za.co.thumbtribe.djug -DartifactId=HelloWorld -DartifactId=HelloWorld • Select the number for the line matching (in this case 110): 110: remote -> maven-archetype-quickstart (An archetype which 110: remote -> maven-archetype-quickstart (An archetype which contains aasample Maven project.) contains sample Maven project.) • This will be the root of the project, containing the web, service and assemble sub-modules (multi-module project) • You now have the chance to add project-specific documentation and parameters to the pom.xml which you can later on, share with you developers. The convenience is that you don't need to keep track of every aspect of the project in external documentation, as everything needed is already available. The first steps in creating a maven project. Creating the child Modules are excluded. Child modules can be created using different project templates, war, ejb, ear, portlet etc. Steps excluded from setup: version control (subversion) ssh keys web config for project documentation
  • 20. 05/13/11 Configuring the Documentation • Development • Source Code Management • Collaboration Management • Notification Management • Continuous Integration • Distribution Management • Other Information • Developers • Contributors • Reporting • Licenses • Organisation Just covering the most parts needed for enabling the project to a production environment
  • 21. 05/13/11 Setting up Continuous Integration • Download Apache Continuum • http://continuum.apache.org/download.html • Standalone bundled with Apache Tomcat • WAR for deployment on an Application Server • Unzip to destination tar zxvf apache-continuum-1.3.7-bin.tar.gz tar zxvf apache-continuum-1.3.7-bin.tar.gz • Start up Continuum ./continuum start ./continuum start • Set up project in Continuum • make the root pom.xml available via web • file protocol supported, but needs configuration The standalone option is the easiest Setup in Glassfish requires JNDI resources being set up mail database logging config (working though) Depending on the project the default build flow is sufficient (for using the root POM and produce artifacts)
  • 22. 05/13/11 Some Continuum Features • Tool support: • Maven 1, 2 and 3 • ANT • Shell Scripts • Build Types: • Manual • Scheduled • Push with xmlrpc • Distributed Builds • Parallel Builds SCM support : CVS, Subversion, Clearcase, Perforce, Starteam, Visual Source Safe, CM Synergy, Bazaar, Mercurial
  • 23. 05/13/11 Seeing Continuum in Action • Release Stages • Prepare for Release • Do the Release • Build Result • Artifacts deployed to the repository • If it's public, users will have access to the POMs and the resources the POM files describe. • Site with: • Generated Test Results and Project JavaDoc, • Project information, • Dependency Information and many more... • Resources deployed to staging and/or production environment • (dependend on setup) Release preparation sees to it that most of the build issues are sorted out before a release. (issues not discovered in a normal build) Once preparation succeeds the build is ready for release. After the release build all the documentation and relevant information will be available in a web format which can be published, using the site plugin. The site plugin enhances the developer experience in that for example, a new developer joins the team, he/she can be pointed to the project site which has all the required documentation.
  • 24. 05/13/11 References • Apache • Maven: | http://maven.apache.org/ • Continuum: | http://continuum.apache.org/ • Glassfish • Application Server | http://glassfish.java.net/ • Prime Teknoloji • PrimeFaces: | http://www.primefaces.org/
  • 25. 05/13/11 End Thank you for attending!
  • 26. 05/13/11 About the author • Junior Java Developer @ Thumbtribe Mobile Solutions • Passionate about Linux, Java and technology in general • Description in less than 3 lines: • technology++ cats++ coffee++ java++ linux++ intellij++ • eclipse-- dogs-- tea-- M$-- Follow on Twitter: • @johanmynhardt