Search Flex Components Free

Custom Search

January 5, 2008

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 : create
- DarchetypeArtifactId = maven - archetype - flex
- DarchetypeVersion = 1.0
- DarchetypeGroupId = dk . jacobve . maven . archetypes
- DgroupId = my . group
- DartifactId = my - flex
- DpackageName = Note: it is important that you remember the -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 install Running this command inside your project will build the project and create a swf file in the target directory.

Related Flex Tutorials