Quickstart flex development with this maven archetype
Have you considered starting some flex development, but haven´t found out where to start? Or are you already flex'ing but could use some easy way to quickstart new flex projects in java?
I have created a maven archetype called maven-archetype-flex and distributed it to ibiblio for all to use.
It will quickly get you up and running.
Here is how you do it:
1. Download flex sdk
Download the flex sdk from adobe, if you haven't got it already.
1b. Minor change to flex-config.xml
You have to uncomment the following in your flex-config.xml located in:
${flex.home}/frameworks/flex-config.xml<local-fonts-snapshot>localFonts.ser<local-fonts-snapshot>Otherwise the compiler will complain as Matt mentions in his comment.
2. Create flex project
Running the following maven command will create a flex project called my-flex having groupId my.group. Feel free you change these to what ever you like:
mvn archetype:createNote: it is important that you remember the
-DarchetypeArtifactId=maven-archetype-flex
-DarchetypeVersion=1.0
-DarchetypeGroupId=dk.jacobve.maven.archetypes
-DgroupId=my.group
-DartifactId=my-flex
-DpackageName=
-DpackageName= as the Main.mxml flex file in the archetype is to be kept in the root of your source dir and not in some subpackage.3. Set flex.home property

In the newly created project pom.xml you should change the flex.home property to fit your flex.home path.
4. Build flex project
Now you are ready to build the flex project:
mvn installRunning this command inside your project will build the project and create a swf file in the target directory.
Viola! You have just created a simple flash application ready to use.
Where to go from here
To see the result of the work you can do one of the following things:
- Open the flash file with your favorite browser.
- Download the standalone player for your operating system ().
- Deploy the swf file to a webserver. Maybe you can get inspiration on how to do it from this maven flex template.

