Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Maven
From Scratch to Production
              by: Johan Mynhardt |
                Durban JUG Meeting |
                 ...
What this is *not*

•   Ripe ground for flame-war
•   Argumenting that:
    • X is better than Y.
    • Y is better than X...
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
• ...
Maven's Objectives

•   Making the build process easy
•   Providing a uniform build system
•   Providing quality project i...
Setting up the Project: HelloWorld


•   Create the project root by running the following:
     ~/$ cd workspace
      ~/$...
Configuring the Documentation


•   Development
    •   Source Code Management
    •   Collaboration Management
    •   No...
Setting up Continuous Integration


•   Download Apache Continuum
       • http://continuum.apache.org/download.html
    •...
Some Continuum Features


•   Tool support:
    • Maven 1, 2 and 3
    • ANT
    • Shell Scripts
•   Build Types:
    • Ma...
Seeing Continuum in Action


•   Release Stages
    • Prepare for Release
    • Do the Release
•   Build Result
    • Arti...
References

•   Apache
    • Maven:               | http://maven.apache.org/
    • Continuum:           | http://continuum...
End




      Thank you for attending!
About the author

• Junior Java Developer @ Thumbtribe Mobile Solutions
• Passionate about Linux, Java and technology in g...
05/13/11




                                 Maven
             From Scratch to Production
                           by:...
05/13/11




             What this is *not*

         •   Ripe ground for flame-war
         •   Argumenting that:
      ...
05/13/11




             Objectives

         •   Set up a Maven project
         •   Set up the CI environment with Apac...
05/13/11




             Project Technologies

         •   Java EE 6
             • Glassfish Application Server
       ...
05/13/11




    Maven's Objectives

•   Making the build process easy
•   Providing a uniform build system
•   Providing ...
05/13/11




             Setting up the Project: HelloWorld


         •   Create the project root by running the followi...
05/13/11




             Configuring the Documentation


         •   Development
             •   Source Code Management...
05/13/11




             Setting up Continuous Integration


         •   Download Apache Continuum
                • htt...
05/13/11




                Some Continuum Features


            •   Tool support:
                • Maven 1, 2 and 3
  ...
05/13/11




             Seeing Continuum in Action


         •   Release Stages
             • Prepare for Release
    ...
05/13/11




    References

•   Apache
    • Maven:               | http://maven.apache.org/
    • Continuum:           |...
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 te...
Upcoming SlideShare
Loading in …5
×

of

Maven: from Scratch to Production (.pdf) Slide 1 Maven: from Scratch to Production (.pdf) Slide 2 Maven: from Scratch to Production (.pdf) Slide 3 Maven: from Scratch to Production (.pdf) Slide 4 Maven: from Scratch to Production (.pdf) Slide 5 Maven: from Scratch to Production (.pdf) Slide 6 Maven: from Scratch to Production (.pdf) Slide 7 Maven: from Scratch to Production (.pdf) Slide 8 Maven: from Scratch to Production (.pdf) Slide 9 Maven: from Scratch to Production (.pdf) Slide 10 Maven: from Scratch to Production (.pdf) Slide 11 Maven: from Scratch to Production (.pdf) Slide 12 Maven: from Scratch to Production (.pdf) Slide 13 Maven: from Scratch to Production (.pdf) Slide 14 Maven: from Scratch to Production (.pdf) Slide 15 Maven: from Scratch to Production (.pdf) Slide 16 Maven: from Scratch to Production (.pdf) Slide 17 Maven: from Scratch to Production (.pdf) Slide 18 Maven: from Scratch to Production (.pdf) Slide 19 Maven: from Scratch to Production (.pdf) Slide 20 Maven: from Scratch to Production (.pdf) Slide 21 Maven: from Scratch to Production (.pdf) Slide 22 Maven: from Scratch to Production (.pdf) Slide 23 Maven: from Scratch to Production (.pdf) Slide 24 Maven: from Scratch to Production (.pdf) Slide 25 Maven: from Scratch to Production (.pdf) Slide 26
Upcoming SlideShare
презентация1
Next
Download to read offline and view in fullscreen.

0 Likes

Share

Download to read offline

Maven: from Scratch to Production (.pdf)

Download to read offline

My presentation on Maven for the Durban Java User Group meeting, held at Thumbtribe's offices. As I'm not happy with everything as-is, my aim is to improve the presentation with an accompanying project which I need to set up in a proper environment so that it can serve as a fully functional example. To follow progress, keep an eye on the following blog post:
http://johanmynhardt.blogspot.com/2011/05/maven-from-scratch-to-production.html

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

Maven: from Scratch to Production (.pdf)

  1. 1. Maven From Scratch to Production by: Johan Mynhardt | Durban JUG Meeting | 12 May 2011|
  2. 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. 3. Objectives • Set up a Maven project • Set up the CI environment with Apache Continuum • See everything in action!
  4. 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. 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. 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. 7. Configuring the Documentation • Development • Source Code Management • Collaboration Management • Notification Management • Continuous Integration • Distribution Management • Other Information • Developers • Contributors • Reporting • Licenses • Organisation
  8. 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. 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. 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. 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. 12. End Thank you for attending!
  13. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 25. 05/13/11 End Thank you for attending!
  26. 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

My presentation on Maven for the Durban Java User Group meeting, held at Thumbtribe's offices. As I'm not happy with everything as-is, my aim is to improve the presentation with an accompanying project which I need to set up in a proper environment so that it can serve as a fully functional example. To follow progress, keep an eye on the following blog post: http://johanmynhardt.blogspot.com/2011/05/maven-from-scratch-to-production.html

Views

Total views

1,813

On Slideshare

0

From embeds

0

Number of embeds

141

Actions

Downloads

39

Shares

0

Comments

0

Likes

0

×