Your SlideShare is downloading. ×
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Maven with Flex
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Maven with Flex

2,836

Published on

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,836
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
76
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1.  
  • 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.
  • 3.
    • Maven essentially is Project Management and comprehension tool allows you to do,
      • Continuous Integration
      • Builds
      • Testing
      • Dependencies
      • Documentation
      • Distribution
      • Reporting etc..
  • 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
  • 5.
    • The basic concept of Maven is a project
    • A ny 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 &quot;.maven/repository&quot; . In Windows, this directory is created in C:Documents And Settings<username>.m2
  • 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 &quot;install&quot; in Maven lingo.
  • 7.  
  • 8.
    • The project.xml is divided into four main parts namely
      • Project Management Section.
      • Project Dependency Section.
      • Project Build Section
      • Project Reports Section.
  • 9.  
  • 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.
  • 11.
    • Describes the location of source, test and resource files
  • 12.
    • The target audience of the reports can vary from other developers in the same project to sponsors, stakeholders or users from other projects
  • 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.
  • 14.
    • Let build a flex project which uses
      • Cairngorm
      • BlazeDS
      • Locale for Internationalization
  • 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
  • 16.
    • mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DgroupId=com.companyname.module -DartifactId=modulename-DpackageName=com.companyname.module -Dversion=1.0
  • 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
  • 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
  • 19.
    • Copy the following
    • <project xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;>
    • <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>
  • 20.
    • <project xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;>
    • <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>
    • </plugins>
    • <defaultGoal>install</defaultGoal>
    • </build>
    • </project>
  • 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
  • 22.
    • Hope you find this information helpful
    • Comment/Contact me on [email_address]
    • Download Maven 2 from
      • http://maven.apache.org/download.html
    • For basics on Maven read
      • http://www.theserverside.com/tt/articles/article.tss?l=MavenMagic

×