Lately i have been compiling and managing my Flex projects with Flash Builder but it didn't sound like something cool. So decided to go for some build tool to help me build my projects from anywhere without any dependency on Flash Builder. Ant works fine on this but is too old to give a shot. So maven is a natural candidate as i have also been using maven to build my Java Projects.
Here is the maven command to create a Flex Project.
Change the archetypeVersion if a newer version is available. Check following maven repo and use the latest stable version
https://repository.sonatype.org/content/groups/public/org/sonatype/flexmojos/flexmojos-archetypes/
Build using following maven command. (skip tests if you are not ready with them.)
For running unit tests read more here.
https://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests
Reference
http://www.sonatype.com/books/mvnref-book/reference/flex-dev-sect-creating-with-archetype.html#ex-flex-dev-app-pom
Here is the maven command to create a Flex Project.
mvn archetype:generate -DarchetypeRepository=http://repository.sonatype.org/content/groups/public -DarchetypeGroupId=org.sonatype.flexmojos -DarchetypeArtifactId=flexmojos-archetypes-library -DarchetypeVersion=3.6.1 -DgroupId=com.bharat.test.projectName -DartifactId=my-flex-application -DinteractiveMode=false
Change the archetypeVersion if a newer version is available. Check following maven repo and use the latest stable version
https://repository.sonatype.org/content/groups/public/org/sonatype/flexmojos/flexmojos-archetypes/
Build using following maven command. (skip tests if you are not ready with them.)
mvn clean install -Dmaven.test.skip=true
For running unit tests read more here.
https://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests
Reference
http://www.sonatype.com/books/mvnref-book/reference/flex-dev-sect-creating-with-archetype.html#ex-flex-dev-app-pom