Slideshare.net (beta)

 

All comments

Add a comment on Slide 1

If you have a SlideShare account, login to comment; else you can comment as a guest


Showing 1-50 of 0 (more)

Maven with Flex

From Priyank, 3 months ago

Automating the build process for a flex application. You swf,ie th more

508 views  |  0 comments  |  0 favorites  |  9 downloads
 
 
 

Groups / Events

 

 
Embed
options

More Info

This slideshow is Public
Total Views: 508
on Slideshare: 508
from embeds: 0

Slideshow transcript

Slide 2:  Maven, a Yiddish word meaning accumulator of knowledge.  Maven is a tool that provides an uniform and easy build process for your projects › you describe your project in one xml file and Maven reads this information to compile and package your project.

Slide 3:  Maven essentially is Project Management and comprehension tool allows you to do, › Continuous Integration › Builds › Testing › Dependencies › Documentation › Distribution › Reporting etc..

Slide 4:  It comes with default templates that are Widely adopted as the best practices  Convention over configuration  Get everything on-demand from their repositories › All the plugins required for your build are taken from a common repository and put into your local repository

Slide 5:  The basic concept of Maven is a project  Any directory that has a project.xml in it is a project.  Another concept in Maven is that of a repository  The repository holds the artifacts (a jar, swf, swc, war, pom etc) on which your project depends. There are two kinds of repository: local and remote  The local repository is created in a special directory called ".maven/repository". In Windows, this directory is created in C:Documents And Settings<username>.m2

Slide 6:  Instead of each project having its own copies of third party libraries, the repository helps developers across projects to share the libraries.  Each project can also in turn generate its artifacts and publish it into the remote repository. The process of publishing a jar into the repository is called "install" in Maven lingo.

Slide 8:  The project.xml is divided into four main parts namely › Project Management Section. › Project Dependency Section. › Project Build Section › Project Reports Section.

Slide 10:  Has general information on the organization, its web site, project web site, location of SCM, deployment and issue tracking site, developer list, mailing lists to name a few.

Slide 11:  Describes the location of source, test and resource files

Slide 12:  The target audience of the reports can vary from other developers in the same project to sponsors, stakeholders or users from other projects

Slide 13:  Key to every project  For eg. If you want your Junit Test cases to run you need a junit “jar” file. For this you need to specify a <dependency> tag, that describes your artifact.

Slide 14:  Let build a flex project which uses › Cairngorm › BlazeDS › Locale for Internationalization

Slide 15:  Install Cairngorm SWC into our local repository (Optional). If it (Maven repository) does not find it in their remote repository  mvn install:install-file – Dfile=Cairngorm.swc –Dpackaging=swc – Dversion=2.2.1 – DgroupId=com.adobe.cairngorm -DartifactId=cairngorm

Slide 16:  mvn archetype:create -DarchetypeGroupId=org .apache.maven.archetypes -DarchetypeArtifactId=maven- archetype-quickstart -DgroupId=com .companyname.module -DartifactId=modulename- DpackageName=com.companyname.m odule -Dversion=1.0

Slide 17:  mvn archetype:create -DarchetypeArtifactId=maven- archetype-flex -DarchetypeVersion=1.0 -DarchetypeGroupId=dk .jacobve.maven.archetypes -DgroupId=com.companyname.module -DartifactId=moduleFlex -DpackageName=com .companyname.module –Dversion=1.0

Slide 18:  This would generate the war and the contents would be copied from the flex application  mvn archetype:create -DarchetypeGroupId=org .apache.maven.archetypes -DarchetypeArtifactId=maven-archetype- webapp -DgroupId=com .companyname.module -DartifactId=moduleWeb -DpackageName=com .companyname.module -Dversion=1.0

Slide 19: Copy the following <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.companyname.module</groupId> <artifactId>module</artifactId> <packaging>pom</packaging> <version>1.0</version> <name>module</name> <url>http://maven.apache.org</url> <modules> <module>../moduleFlex</module> <module>../moduleWeb</module> </module>

Slide 20:  <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">  <modelVersion>4.0.0</modelVersion>  <groupId>com.companyname.module</groupId>  <artifactId>moduleFlex</artifactId>  <packaging>swf</packaging>  <version>1.0-SNAPSHOT</version>  <name>multiModuleProjectArtifactIdFlex Maven Flex</name>  <url>http://maven.apache.org</url>  −  <properties>  −  <flex.home>${env.FLEX_HOME}  </flex.home>  </properties>  −  <build>  <sourceDirectory>src/main/flex</sourceDirectory>  −  <plugins>  −  <plugin>  <groupId>net.israfil.mojo</groupId>  <artifactId>maven-flex2-plugin</artifactId>  <extensions>true</extensions>  −  <configuration>  <flexHome>${flex.home}</flexHome>  <useNetwork>true</useNetwork>  <main>Main.mxml</main>  <!-- For including the locale folder into our application -->  <extraParameters>  <parameter>  <name>compiler.source-path</name>  <values>  <value>${basedir}/locale</value>  </values>  </parameter>  </extraParameters>  </configuration>  </plugin>

Slide 21:  Go to your Parent module project  Open cmd and go to the parent project folder › Mvn install › Should copy the details and you should have your first flex application build with

Slide 22:  Hope you find this information helpful  Comment/Contact me on priyankomnipotent@gmail.com  Download Maven 2 from http://maven.apache.org/download.html  For basics on Maven read › http://www.theserverside.com/tt/articles/article.ts