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

Post on 30-Aug-2014

3.734 views 2 download

description

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

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

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Flex Continuous

Quality Builds

Flex & (Ant || Maven)

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

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

No troll beyond this point

®

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 buildAS3NCSShttp://localhost:9999/hudson/job/cairngorm/site/javancss.html

FlexPMDhttp://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 projectimported , you may still

• Use your favorite servers and eclipseplugins wtp facilities

• Debug your application

• On the server side

• On the client side

• Manage your dependencies and mavenbuild 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)

Pluginjar

Pluginflex-mojos

Pluginwar

Projects to build Maven Core

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• Ant• AntRun• AspectJ• Assembly• Assembly-report• Cargo• Castor• Changelog• Changes• Commons-attributes• Checkstyle• Clean• Clover• Csharp• Cobertura• Compiler• Deploy

• Ear• Eclipse• Ejb• Ejb3• Exec• Flex-mojos• Flex-annotations• Groovy• Help• Hibernate2• Idea• Install• Issue• It• Jalopy• Jar• Javacc• Javadoc

• Javancss• Jboss• Jcoverage Jdepend• Jdiff• Jelly• Jetty• Jpox• Jspc• Jxr• MAnt• Native• One• Par• Plugin• Pmd• Project-info-reports• Rar

• Release• Repository• Resources• Repository• Sablecc• Site• Slimdog• Source• Surefire• Surefire-report• Taglist• Tomcat• Verifier• Xslt• War• Wsdl2java• Xdoclet• 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 formatPOM = 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 organizationOur 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)

plug-ins

user

e.g. mvn install

generate-sources

compile

test

install

deploy

package

integration-test

Well-known phases

mojo

mojo

mojo

mojo

mojobindings

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 repositoryNo more relative paths!Easy to share between teams

Dependency managementTransitive dependency managementSnapshot handling

Multi-module built

Environment dependent builds based on profile

Project documentation site and report

Project templating through archetype

A

B C

D

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

http://farm3.static.flickr.com/2060/2401122079_9d45ae6252_o.jpg