SlideShare a Scribd company logo
AN INTRODUCTION TO
  MAVEN AND FLEX




           @justinjmoses
WHAT IS MAVEN?

Automated build & dependency management

Convention over configuration

Repositories - both local and remote - maintain dependencies

Uses a pom.xml file to detail build instructions

Hierarchical tree structures - each artifact can have a parent and N
children.

Runs a series of phases in the project lifecycle, including compile, test,
package and install
THE BUILD LIFECYCLE

Builds are made up of phases. Default lifecycle:

   Compile

   Test 
    
   (build test classes and run)

   Package
      (package as single artifact)

   Install 
 
   (install artifact locally)

   Deploy 

     (upload artifact to remote repository)
WHAT IS FLEXMOJOS?



A Maven plugin that manages the compilation, optimisation and testing
of flex applications, modules and libraries.

Open Source: github.com/Flexmojos/flexmojos

Written and maintained by @velobr
REPOSITORIES



Local repository is ~/.m2 (or under Users[You].m2 in Win7)

Settings.xml file depicts machine-level settings - such as remote
repository locations.
NEXUS


Nexus is a repository manager

Organisations using Maven typically have their own internal Nexus
instance

Nexus can proxy to other Nexus repositories

Two types of repositories - Snapshot and Release
A SIMPLE FLEX
           APPLICATION


Minimum requirements:

  pom.xml to describe the build

  one or more source files
LOOKING AT THE POM
<project>
	    <modelVersion>4.0.0</modelVersion>
	    <groupId>org.justinjmoses.maven</groupId>
	    <artifactId>flexmojos-simplist</artifactId>
	    <name>Simplist Flexmojos</name>
	    <version>0.1-SNAPSHOT</version>
	    <packaging>swf</packaging>

	    <build>
        <sourceDirectory>src</sourceDirectory>
        <plugins>
                <!-- Details on the Flexmojos plugin -->
	    	     	    <plugin>
	    	     	    	     <groupId>org.sonatype.flexmojos</groupId>
	    	     	    	     <artifactId>flexmojos-maven-plugin</artifactId>
	    	     	    	     <version>4.0-RC1</version>
	    	     	    	     <configuration>
	    	     	    	     	     <sourceFile>./Main.swf</sourceFile>
	    	     	    	     	     <swfVersion>12</swfVersion>
                      </configuration>
	    	     	    	     <dependencies>
	    	     	    	     	     <dependency>
	    	     	    	     	     	    <groupId>com.adobe.flex</groupId>
	    	     	    	     	     	    <artifactId>compiler</artifactId>
	    	     	    	     	     	    <version>4.5.1.21328</version>
	    	     	    	     	     	    <type>pom</type>
	    	     	    	     	     </dependency>
	    	     	    	     </dependencies>
	    	     	    </plugin>
	    	     </plugins>
	    </build>
	
	    <dependencies> ... list of dependencies for building/testing ... </dependencies>
</project>
VERSIONING


Where to find dependencies and versions?

  Flexmojos

  Flex framework

  Others?
AUTOMATED
               UNIT TESTING
Requirements

  Standalone Flash Player

  Add test folders and tests (Test*.as default)

  Add test source location to your pom
  <testSourceDirectory>src/test</testSourceDirectory>


  Add Flexunit dependency to your pom
  <dependency>
      <groupId>com.adobe.flexunit</groupId>
      <artifactId>flexunit</artifactId>
  	   <version>4.0-rc-1</version>
      <type>swc</type>
      <scope>test</scope>
  </dependency>
ADDING DEPENDENCIES



Not all dependencies are hosted remotely.



Some have to be installed manually via install:install-file goal.
> mvn install:install-file
    -Dfile=[file]
    -DgroupId=[groupId]
    -DartifactId=[artifactId]
    -Dversion=[version]
    -Dpackaging=swc
FROM SOURCE TO IDE


Flexmojos has a goal to create Flashbuilder projects from Maven builds

Create a basic pom and source/test structure, then run the goal
> mvn org.sonatype.flexmojos:flexmojos-maven-plugin:3.9:flashbuilder




Note: when using Maven, you do not check in your .project, .settings or libs to source control. The
Flashbuilder goal will create these settings for you.

Why? Because your pom should be the definitive definition of the build - your project settings are only local to
your machine & environment.
ARCHETYPES
Maven supports beginning projects using archetypes (templates)

Flexmojos provides three main archetypes: library, application, modular application
> mvn archetype:generate
-DarchetypeRepository=http://repository.sonatype.com/content/groups/flexgroup
-DarchetypeGroupId=org.sonatype.flexmojos
-DarchetypeArtifactId=flexmojos-archetypes-application
-DarchetypeVersion=4.0-RC1




Typical prescription is the following folder structure
 `-- src
     |--   main
     |     |-- flex
     |     `-- resources
     `--   test
           |-- flex
           `-- resources




Archetypes themselves are projects. You can create your own as templates for new
projects.
APPLICATIONS WITH
                LIBRARIES
        We can add a top-level pom with “pom” packaging

        Then each artifact becomes a maven module, each with its own pom

        Each Maven modules’ pom references the parent - dependencies and config will be
        inherited
        <parent>
    	   	   <groupId>org.justinjmoses.flexmojos-introduction</groupId>
    	   	   <artifactId>flexmojos-libraries</artifactId>
    	   	   <version>0.1-SNAPSHOT</version>
    	   </parent>




        One Maven module can depend on another - Maven will work out build order
        <dependency>
	   	   	   <groupId>org.justinjmoses.flexmojos-introduction</groupId>
	   	   	   <artifactId>flexmojos-libraries-library</artifactId>
	   	   	   <version>${project.version}</version>
	   	   	   <type>swc</type>
	   	   </dependency>
GOTCHAS

Always go back to first-principles - remove redundant code.

Keep your build script thin.

Try to reproduce outside your project - create an empty project
structure with the bare minimum to reproduce.

Check Flexmojos Google Groups.

Found a bug? It’s open source. Hone your Java skills and contribute to a
great plugin.
WHAT ELSE CAN IT DO?

Produce and optimise modular applications

Create RSLs from artifacts

Generate code coverage reports

Output asdoc documentation

Customise the build based on different settings / build environments /
sdks

Deploy as bundled WAR with HTML wrapper
RESOURCES


Code samples from today: github.com/justinjmoses

Flexmojos docs: docs.sonatype.org/display/FLEXMOJOS

Flexmojos goals and config: bitly.com/FM-4RC1-site

Flexmojos Google Groups: groups.google.com/forum/#!forum/flex-
mojos




                                                      @justinjmoses
Ad

More Related Content

What's hot (20)

Maven 3 New Features
Maven 3 New FeaturesMaven 3 New Features
Maven 3 New Features
Stefan Scheidt
 
Maven
MavenMaven
Maven
Марія Русин
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with Maven
Sid Anand
 
Apache Maven In 10 Slides
Apache Maven In 10 SlidesApache Maven In 10 Slides
Apache Maven In 10 Slides
Robert Burrell Donkin
 
ICEfaces EE - Enterprise-ready JSF Ajax Framework
ICEfaces EE - Enterprise-ready JSF Ajax FrameworkICEfaces EE - Enterprise-ready JSF Ajax Framework
ICEfaces EE - Enterprise-ready JSF Ajax Framework
ICEsoftTech
 
Apache Maven
Apache MavenApache Maven
Apache Maven
Rahul Tanwani
 
An introduction to Maven
An introduction to MavenAn introduction to Maven
An introduction to Maven
Joao Pereira
 
Maven for Dummies
Maven for DummiesMaven for Dummies
Maven for Dummies
Tomer Gabel
 
(Re)-Introduction to Maven
(Re)-Introduction to Maven(Re)-Introduction to Maven
(Re)-Introduction to Maven
Eric Wyles
 
Apache Maven for SoftServe IT Academy
Apache Maven for SoftServe IT AcademyApache Maven for SoftServe IT Academy
Apache Maven for SoftServe IT Academy
Volodymyr Ostapiv
 
An Introduction to Maven Part 1
An Introduction to Maven Part 1An Introduction to Maven Part 1
An Introduction to Maven Part 1
MD Sayem Ahmed
 
Maven tutorial
Maven tutorialMaven tutorial
Maven tutorial
James Cellini
 
Build Automation using Maven
Build Automation using Maven Build Automation using Maven
Build Automation using Maven
Ankit Gubrani
 
Maven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafeMaven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafe
Holasz Kati
 
Automated testing with Drupal
Automated testing with DrupalAutomated testing with Drupal
Automated testing with Drupal
Promet Source
 
Version Management in Maven
Version Management in MavenVersion Management in Maven
Version Management in Maven
Geert Pante
 
Maven basics
Maven basicsMaven basics
Maven basics
Vijay Krishnan Ramaswamy
 
Apache Maven basics
Apache Maven basicsApache Maven basics
Apache Maven basics
Volodymyr Ostapiv
 
Features & Installation Profiles
Features & Installation ProfilesFeatures & Installation Profiles
Features & Installation Profiles
David Watson
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
Vadym Lotar
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with Maven
Sid Anand
 
ICEfaces EE - Enterprise-ready JSF Ajax Framework
ICEfaces EE - Enterprise-ready JSF Ajax FrameworkICEfaces EE - Enterprise-ready JSF Ajax Framework
ICEfaces EE - Enterprise-ready JSF Ajax Framework
ICEsoftTech
 
An introduction to Maven
An introduction to MavenAn introduction to Maven
An introduction to Maven
Joao Pereira
 
Maven for Dummies
Maven for DummiesMaven for Dummies
Maven for Dummies
Tomer Gabel
 
(Re)-Introduction to Maven
(Re)-Introduction to Maven(Re)-Introduction to Maven
(Re)-Introduction to Maven
Eric Wyles
 
Apache Maven for SoftServe IT Academy
Apache Maven for SoftServe IT AcademyApache Maven for SoftServe IT Academy
Apache Maven for SoftServe IT Academy
Volodymyr Ostapiv
 
An Introduction to Maven Part 1
An Introduction to Maven Part 1An Introduction to Maven Part 1
An Introduction to Maven Part 1
MD Sayem Ahmed
 
Build Automation using Maven
Build Automation using Maven Build Automation using Maven
Build Automation using Maven
Ankit Gubrani
 
Maven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafeMaven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafe
Holasz Kati
 
Automated testing with Drupal
Automated testing with DrupalAutomated testing with Drupal
Automated testing with Drupal
Promet Source
 
Version Management in Maven
Version Management in MavenVersion Management in Maven
Version Management in Maven
Geert Pante
 
Features & Installation Profiles
Features & Installation ProfilesFeatures & Installation Profiles
Features & Installation Profiles
David Watson
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
Vadym Lotar
 

Similar to An Introduction to Maven and Flex (20)

Wonderful World of Maven
Wonderful World of MavenWonderful World of Maven
Wonderful World of Maven
Justin J. Moses
 
Apache maven, a software project management tool
Apache maven, a software project management toolApache maven, a software project management tool
Apache maven, a software project management tool
Renato Primavera
 
Exploring Maven SVN GIT
Exploring Maven SVN GITExploring Maven SVN GIT
Exploring Maven SVN GIT
People Strategists
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
Mert Çalışkan
 
Introduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldIntroduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS world
Dmitry Bakaleinik
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld Presentation
Dan Hinojosa
 
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
Paul Withers
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension tool
elliando dias
 
Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster
Andres Almiray
 
BMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenBMO - Intelligent Projects with Maven
BMO - Intelligent Projects with Maven
Mert Çalışkan
 
Maven with Flex
Maven with FlexMaven with Flex
Maven with Flex
Priyank
 
Maven with Flex
Maven with FlexMaven with Flex
Maven with Flex
Priyank
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorial
Raghavan Mohan
 
Maven
MavenMaven
Maven
Harshit Choudhary
 
intellimeet
intellimeetintellimeet
intellimeet
Ankur Chauhan
 
SVN Usage & Best Practices
SVN Usage & Best PracticesSVN Usage & Best Practices
SVN Usage & Best Practices
Ashraf Fouad
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
Fwdays
 
Maven
MavenMaven
Maven
javeed_mhd
 
Maven
MavenMaven
Maven
AbdulImrankhan7
 
Maven in Mule
Maven in MuleMaven in Mule
Maven in Mule
Anand kalla
 
Wonderful World of Maven
Wonderful World of MavenWonderful World of Maven
Wonderful World of Maven
Justin J. Moses
 
Apache maven, a software project management tool
Apache maven, a software project management toolApache maven, a software project management tool
Apache maven, a software project management tool
Renato Primavera
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
Mert Çalışkan
 
Introduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldIntroduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS world
Dmitry Bakaleinik
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld Presentation
Dan Hinojosa
 
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
Paul Withers
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension tool
elliando dias
 
Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster
Andres Almiray
 
BMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenBMO - Intelligent Projects with Maven
BMO - Intelligent Projects with Maven
Mert Çalışkan
 
Maven with Flex
Maven with FlexMaven with Flex
Maven with Flex
Priyank
 
Maven with Flex
Maven with FlexMaven with Flex
Maven with Flex
Priyank
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorial
Raghavan Mohan
 
SVN Usage & Best Practices
SVN Usage & Best PracticesSVN Usage & Best Practices
SVN Usage & Best Practices
Ashraf Fouad
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
Fwdays
 
Ad

Recently uploaded (20)

Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Ad

An Introduction to Maven and Flex

  • 1. AN INTRODUCTION TO MAVEN AND FLEX @justinjmoses
  • 2. WHAT IS MAVEN? Automated build & dependency management Convention over configuration Repositories - both local and remote - maintain dependencies Uses a pom.xml file to detail build instructions Hierarchical tree structures - each artifact can have a parent and N children. Runs a series of phases in the project lifecycle, including compile, test, package and install
  • 3. THE BUILD LIFECYCLE Builds are made up of phases. Default lifecycle: Compile Test (build test classes and run) Package (package as single artifact) Install (install artifact locally) Deploy (upload artifact to remote repository)
  • 4. WHAT IS FLEXMOJOS? A Maven plugin that manages the compilation, optimisation and testing of flex applications, modules and libraries. Open Source: github.com/Flexmojos/flexmojos Written and maintained by @velobr
  • 5. REPOSITORIES Local repository is ~/.m2 (or under Users[You].m2 in Win7) Settings.xml file depicts machine-level settings - such as remote repository locations.
  • 6. NEXUS Nexus is a repository manager Organisations using Maven typically have their own internal Nexus instance Nexus can proxy to other Nexus repositories Two types of repositories - Snapshot and Release
  • 7. A SIMPLE FLEX APPLICATION Minimum requirements: pom.xml to describe the build one or more source files
  • 8. LOOKING AT THE POM <project> <modelVersion>4.0.0</modelVersion> <groupId>org.justinjmoses.maven</groupId> <artifactId>flexmojos-simplist</artifactId> <name>Simplist Flexmojos</name> <version>0.1-SNAPSHOT</version> <packaging>swf</packaging> <build> <sourceDirectory>src</sourceDirectory> <plugins> <!-- Details on the Flexmojos plugin --> <plugin> <groupId>org.sonatype.flexmojos</groupId> <artifactId>flexmojos-maven-plugin</artifactId> <version>4.0-RC1</version> <configuration> <sourceFile>./Main.swf</sourceFile> <swfVersion>12</swfVersion> </configuration> <dependencies> <dependency> <groupId>com.adobe.flex</groupId> <artifactId>compiler</artifactId> <version>4.5.1.21328</version> <type>pom</type> </dependency> </dependencies> </plugin> </plugins> </build> <dependencies> ... list of dependencies for building/testing ... </dependencies> </project>
  • 9. VERSIONING Where to find dependencies and versions? Flexmojos Flex framework Others?
  • 10. AUTOMATED UNIT TESTING Requirements Standalone Flash Player Add test folders and tests (Test*.as default) Add test source location to your pom <testSourceDirectory>src/test</testSourceDirectory> Add Flexunit dependency to your pom <dependency> <groupId>com.adobe.flexunit</groupId> <artifactId>flexunit</artifactId> <version>4.0-rc-1</version> <type>swc</type> <scope>test</scope> </dependency>
  • 11. ADDING DEPENDENCIES Not all dependencies are hosted remotely. Some have to be installed manually via install:install-file goal. > mvn install:install-file -Dfile=[file] -DgroupId=[groupId] -DartifactId=[artifactId] -Dversion=[version] -Dpackaging=swc
  • 12. FROM SOURCE TO IDE Flexmojos has a goal to create Flashbuilder projects from Maven builds Create a basic pom and source/test structure, then run the goal > mvn org.sonatype.flexmojos:flexmojos-maven-plugin:3.9:flashbuilder Note: when using Maven, you do not check in your .project, .settings or libs to source control. The Flashbuilder goal will create these settings for you. Why? Because your pom should be the definitive definition of the build - your project settings are only local to your machine & environment.
  • 13. ARCHETYPES Maven supports beginning projects using archetypes (templates) Flexmojos provides three main archetypes: library, application, modular application > mvn archetype:generate -DarchetypeRepository=http://repository.sonatype.com/content/groups/flexgroup -DarchetypeGroupId=org.sonatype.flexmojos -DarchetypeArtifactId=flexmojos-archetypes-application -DarchetypeVersion=4.0-RC1 Typical prescription is the following folder structure `-- src |-- main | |-- flex | `-- resources `-- test |-- flex `-- resources Archetypes themselves are projects. You can create your own as templates for new projects.
  • 14. APPLICATIONS WITH LIBRARIES We can add a top-level pom with “pom” packaging Then each artifact becomes a maven module, each with its own pom Each Maven modules’ pom references the parent - dependencies and config will be inherited <parent> <groupId>org.justinjmoses.flexmojos-introduction</groupId> <artifactId>flexmojos-libraries</artifactId> <version>0.1-SNAPSHOT</version> </parent> One Maven module can depend on another - Maven will work out build order <dependency> <groupId>org.justinjmoses.flexmojos-introduction</groupId> <artifactId>flexmojos-libraries-library</artifactId> <version>${project.version}</version> <type>swc</type> </dependency>
  • 15. GOTCHAS Always go back to first-principles - remove redundant code. Keep your build script thin. Try to reproduce outside your project - create an empty project structure with the bare minimum to reproduce. Check Flexmojos Google Groups. Found a bug? It’s open source. Hone your Java skills and contribute to a great plugin.
  • 16. WHAT ELSE CAN IT DO? Produce and optimise modular applications Create RSLs from artifacts Generate code coverage reports Output asdoc documentation Customise the build based on different settings / build environments / sdks Deploy as bundled WAR with HTML wrapper
  • 17. RESOURCES Code samples from today: github.com/justinjmoses Flexmojos docs: docs.sonatype.org/display/FLEXMOJOS Flexmojos goals and config: bitly.com/FM-4RC1-site Flexmojos Google Groups: groups.google.com/forum/#!forum/flex- mojos @justinjmoses

Editor's Notes