Flex
      Continuous
     Quality Builds
Flex & (Ant || Maven)




                                                                  ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
No troll beyond this point




                                 http://www.flickr.com/photos/43454909@N00/2706102/

                                                                                      ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Building


       Ant :
                 FlexAntTasks
                Ant : Antennae

•      Maven :
          •     Flex-mojos (conseillé par la Flex Team)
                            •   Alternatives :
                                   • ServeBox (Projet Français)
                                   • and Israfil




                FlexMojos V3 est un projet sonatype
                Sonatype et Adobe travaillent ensemble pour le support FB dans m2eclipse




                                                                                           ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Flex Mojos : http://flexmojos.sonatype.org




                                                                  ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Managing Dependencies


        Maven || (Ant + Ivy)




                 Demo : http://localhost:9999/hudson/job/cairngormenterprise/site/dependencies.html




                                                                                                      ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Managing Dependencies




                                                                  ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
(Unit)Test within your Build


        FlexUnit within your build




                          Maven




                                                                  ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Automated documentation and reports




                                                                  ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Quality control within your build


        Quality Reports within your build
                 AS3NCSS
                 http://localhost:9999/hudson/job/cairngorm/site/javancss.html




                 FlexPMD
                 http://localhost:9999/hudson/job/cairngorm/12/pmdResult/




                                                                                 ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Detect code anti-patterns : Flex PMD




                                                                  ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Continuous Integration


        CI : Continuous Quality Builds




                 Demo : http://localhost:9999/hudson/




                                                                  ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Demo Maven




                                                                  ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
A typical Java flex remoting web app

       Discover a « mavenized » Flex BlazeDS Spring project, and its modules :




                java_* are plain old maven java projects
                flex_* are flex-mojos project
                blazeds _service_config is a shared resource handled through maven assembly




                                                                                              ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Eclipse / m2eclipse / FlexBuilder

•      Note that once your project
       imported , you may still
          •     Use your favorite servers and eclipse
                plugins wtp facilities
          •     Debug your application
                   •     On the server side
                   •     On the client side
          •     Manage your dependencies and maven
                build through m2eclipse plugin.




                                                                  ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
http://www.flickr.com/photos/zzathras777/2401122079/



                                                                    ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Appendix :
       By the way …

       What is Maven ?




                                                                  ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
What is Maven anyway ? (very short definition)


        A build tool




                                                                                 •
        A dependency management tool                               •   A documentation and quality
                                                                             reporting tool




                                                                                                     ®




 Copyright 2008 Adobe Systems Incorporated. All rights reserved.
What is Maven anyway ? (its architecture)




                                                                                       Plugin
                                                                                         jar


               Projects                                                                 Plugin
                                                            Maven Core
                to build                                                             flex-mojos


                                                                                       Plugin
                                                                                        war


                                     Local machine                       Remote repository or local install



                                                                                                              ®




 Copyright 2008 Adobe Systems Incorporated. All rights reserved.
What is Maven anyway ? (its plug-ins, a few of them…)



 •        Antlr                                             •      Ear                •   Javancss               •   Release
 •        Ant                                               •      Eclipse            •   Jboss                  •   Repository
 •        AntRun                                            •      Ejb                •   Jcoverage Jdepend      •   Resources
 •        AspectJ                                           •      Ejb3               •   Jdiff                  •   Repository
 •        Assembly                                          •      Exec               •   Jelly                  •   Sablecc
 •        Assembly-report                                   •      Flex-mojos         •   Jetty                  •   Site
 •        Cargo                                             •      Flex-annotations   •   Jpox                   •   Slimdog
 •        Castor                                            •      Groovy             •   Jspc                   •   Source
 •        Changelog                                         •      Help               •   Jxr                    •   Surefire
 •        Changes                                           •      Hibernate2         •   MAnt                   •   Surefire-report
 •        Commons-attributes                                •      Idea               •   Native                 •   Taglist
 •        Checkstyle                                        •      Install            •   One                    •   Tomcat
 •        Clean                                             •      Issue              •   Par                    •   Verifier
 •        Clover                                            •      It                 •   Plugin                 •   Xslt
 •        Csharp                                            •      Jalopy             •   Pmd                    •   War
 •        Cobertura                                         •      Jar                •   Project-info-reports   •   Wsdl2java
 •        Compiler                                          •      Javacc             •   Rar                    •   Xdoclet
 •        Deploy                                            •      Javadoc                                       •   Xmlbeans
                                                                                                                 •   XRadar




                                                                                                                                       ®




 Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Flex Mojos : http://flexmojos.sonatype.org




                                                                  ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.
What is Maven anyway ? (a common project format and organization)


        Maven is really a process of applying patterns to a build infrastructure
        in order to provide a coherent view of software projects.
        A Common project metadata format
                 POM = Project Object Model = pom.xml
                 Contains metadata about the project
                          Location of directories, Developers/Contributors, Issue tracking system, Dependencies,
                          Repositories to use, etc




                                                                                                                   ®




 Copyright 2008 Adobe Systems Incorporated. All rights reserved.
What is Maven anyway ? (a common project format and organization)


        A common directory organization
                 Our sample of 6 nested projects :
                                                                   • src/
                                                                      – main/
                                                                            •   java/
                                                                            •   flex/
                                                                            •   resources/
                                                                            •   webapp/
                                                                      – test/
                                                                            • java/
                                                                            • flex/
                                                                            • resources/
                                                                      – site/



                                                                                             ®




 Copyright 2008 Adobe Systems Incorporated. All rights reserved.
What is Maven anyway ? (a common way to build application)


                                                                      generate-
                                                                       sources                  mojo
                                                                       compile
                                                                                                  mojo
                                                                          test
                                                                                                mojo
                                                                       package                                plug-ins
                                                                      integration-
                                                                          test
                             user                                                                      mojo
                                                                        install
                                                                                                 mojo
           e.g. mvn install                                             deploy       bindings


                                                                   Well-known phases

                    The lifecycle depends on the project type (packaging)
                         Defined in pom.xml (pom, jar, ear, war, etc)
                         Ex: <packaging>swc</packaging>

                                                                                                                         ®




 Copyright 2008 Adobe Systems Incorporated. All rights reserved.
What is Maven anyway ? (it’s even much more)


    Artifact repository :
              Used to store all kind of artifacts
                    SWCs, SWFs, JARs, EARs, WARs, EJBs, ZIPs, plugins, …
              All project interactions go through the repository
              No more relative paths!
              Easy to share between teams

    Dependency management                                                      A
        Transitive dependency management
        Snapshot handling                                                  B       C
    Multi-module built
                                                                                   D
    Environment dependent builds based on profile

    Project documentation site and report

    Project templating through archetype



                                                                                       ®




 Copyright 2008 Adobe Systems Incorporated. All rights reserved.
http://farm3.static.flickr.com/2060/2401122079_9d45ae6252_o.jpg



                                                                               ®




Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Flex Continuous Quality Builds Flex & (Ant || Maven)

  • 1.
    Flex Continuous Quality Builds Flex & (Ant || Maven) ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 2.
    No troll beyondthis point http://www.flickr.com/photos/43454909@N00/2706102/ ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 3.
    Building Ant : FlexAntTasks Ant : Antennae • Maven : • Flex-mojos (conseillé par la Flex Team) • Alternatives : • ServeBox (Projet Français) • and Israfil FlexMojos V3 est un projet sonatype Sonatype et Adobe travaillent ensemble pour le support FB dans m2eclipse ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 4.
    Flex Mojos :http://flexmojos.sonatype.org ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 5.
    Managing Dependencies Maven || (Ant + Ivy) Demo : http://localhost:9999/hudson/job/cairngormenterprise/site/dependencies.html ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 6.
    Managing Dependencies ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 7.
    (Unit)Test within yourBuild FlexUnit within your build Maven ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 8.
    Automated documentation andreports ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 9.
    Quality control withinyour build Quality Reports within your build AS3NCSS http://localhost:9999/hudson/job/cairngorm/site/javancss.html FlexPMD http://localhost:9999/hudson/job/cairngorm/12/pmdResult/ ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 10.
    Detect code anti-patterns: Flex PMD ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 11.
    Continuous Integration CI : Continuous Quality Builds Demo : http://localhost:9999/hudson/ ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 12.
    Demo Maven ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 13.
    A typical Javaflex remoting web app Discover a « mavenized » Flex BlazeDS Spring project, and its modules : java_* are plain old maven java projects flex_* are flex-mojos project blazeds _service_config is a shared resource handled through maven assembly ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 14.
    Eclipse / m2eclipse/ FlexBuilder • Note that once your project imported , you may still • Use your favorite servers and eclipse plugins wtp facilities • Debug your application • On the server side • On the client side • Manage your dependencies and maven build through m2eclipse plugin. ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 15.
    http://www.flickr.com/photos/zzathras777/2401122079/ ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 16.
    Appendix : By the way … What is Maven ? ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 17.
    What is Mavenanyway ? (very short definition) A build tool • A dependency management tool • A documentation and quality reporting tool ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 18.
    What is Mavenanyway ? (its architecture) Plugin jar Projects Plugin Maven Core to build flex-mojos Plugin war Local machine Remote repository or local install ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 19.
    What is Mavenanyway ? (its plug-ins, a few of them…) • Antlr • Ear • Javancss • Release • Ant • Eclipse • Jboss • Repository • AntRun • Ejb • Jcoverage Jdepend • Resources • AspectJ • Ejb3 • Jdiff • Repository • Assembly • Exec • Jelly • Sablecc • Assembly-report • Flex-mojos • Jetty • Site • Cargo • Flex-annotations • Jpox • Slimdog • Castor • Groovy • Jspc • Source • Changelog • Help • Jxr • Surefire • Changes • Hibernate2 • MAnt • Surefire-report • Commons-attributes • Idea • Native • Taglist • Checkstyle • Install • One • Tomcat • Clean • Issue • Par • Verifier • Clover • It • Plugin • Xslt • Csharp • Jalopy • Pmd • War • Cobertura • Jar • Project-info-reports • Wsdl2java • Compiler • Javacc • Rar • Xdoclet • Deploy • Javadoc • Xmlbeans • XRadar ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 20.
    Flex Mojos :http://flexmojos.sonatype.org ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 21.
    What is Mavenanyway ? (a common project format and organization) Maven is really a process of applying patterns to a build infrastructure in order to provide a coherent view of software projects. A Common project metadata format POM = Project Object Model = pom.xml Contains metadata about the project Location of directories, Developers/Contributors, Issue tracking system, Dependencies, Repositories to use, etc ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 22.
    What is Mavenanyway ? (a common project format and organization) A common directory organization Our sample of 6 nested projects : • src/ – main/ • java/ • flex/ • resources/ • webapp/ – test/ • java/ • flex/ • resources/ – site/ ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 23.
    What is Mavenanyway ? (a common way to build application) generate- sources mojo compile mojo test mojo package plug-ins integration- test user mojo install mojo e.g. mvn install deploy bindings Well-known phases The lifecycle depends on the project type (packaging) Defined in pom.xml (pom, jar, ear, war, etc) Ex: <packaging>swc</packaging> ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 24.
    What is Mavenanyway ? (it’s even much more) Artifact repository : Used to store all kind of artifacts SWCs, SWFs, JARs, EARs, WARs, EJBs, ZIPs, plugins, … All project interactions go through the repository No more relative paths! Easy to share between teams Dependency management A Transitive dependency management Snapshot handling B C Multi-module built D Environment dependent builds based on profile Project documentation site and report Project templating through archetype ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.
  • 25.
    http://farm3.static.flickr.com/2060/2401122079_9d45ae6252_o.jpg ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.