Flex-Mojos is a set of Maven plugins that allow you to do command-line builds for Flex projects. The real power comes from being able to leverage the power of Maven to do your entire build (front-end, back-end, unit testing, and integration testing) one fell swoop. It’s also very useful if you have a large complex project, or many developers on your team, where using a continuous integration tool such as Hudson would be useful.

Maven is an Apache open-source project that originated in the Java world at Sonatype. If you develop the back-end for your Flex projects in Java, you may already be familiar with Maven.

Adobe currently supports building from the command-line using Apache Ant. While this approach works for smaller projects, it’s difficult to work with large complex projects. Ant takes a very tactical approach to building a project. You give it lots of XML configuration and tell it virtually everything about your project(s). It will then run through your build script and do exactly what you told it to do.

Maven is FUNDAMENTALLY DIFFERENT!

Maven takes an approach of convention over configuration. If you follow the maven conventions (for example, putting your flex source code directory at /src/main/flex), then the Flex-Mojos plugin will just know where to find your code and what to do with it.

Adobe FlashBuilder does quite a a lot of configuration behind the scenes when building a Flex project. Things like building against framework RSLs instead of merging into code are handled seamlessly in FlashBuilder. Those aren’t really defaults in Flex-Mojos, so let’s take a look at what it takes Flex-Mojos to make a large project do some of the nice things FlashBuilder does for us.

The core of a Maven project is the pom.xml file. The Project Object Model files tweak what Maven does already by convention. If you don’t specify a config option, no big deal… Maven will just use its default.

In the project for 3dvideomap.com, I’m using the following technology stack. MySQL database, Hibernate for ORM to the tables, Spring Framework, GraniteDS for Flex Remoting, and Swiz for my Flex microarchitecture.

Folder structure is an important convention to Maven.

The main parent pom.xml file contains many of my variable properties that I’ll use later. It also tells Maven what child project modules to build.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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.swiftmako.freshchamber</groupId>
    <artifactId>freshchamber-aggregator</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>FreshChamber Aggregator</name>

    <properties>
        <flash.major>10</flash.major>
        <flash.minor>2</flash.minor>
        <flash.revision>0</flash.revision>
        <flex.sdk.version>4.5.0.20967</flex.sdk.version>
        <flex.tlf.version>2.0.0.232</flex.tlf.version>
        <flex.osmf.version>1.0.0.16316</flex.osmf.version>
        <flex.mojos.version>4.0-beta-7</flex.mojos.version>
        <flexunit.version>4.0-rc-1</flexunit.version>
        <springframework.version>3.0.5.RELEASE</springframework.version>
        <graniteds.version>2.2.0.GA</graniteds.version>
        <hibernate.version>3.5.6-Final</hibernate.version>
        <aws.sdk.version>1.0.14</aws.sdk.version>
        <swiz.version>1.1.0</swiz.version>
        <googleanalytics.version>1.0.1.319</googleanalytics.version>
        <googlemap.version>1.20</googlemap.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.6</source>
                        <target>1.6</target>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <modules>
        <module>freshchamber-flex</module>
        <module>freshchamber-coupons</module>
        <module>freshchamber-webapp</module>
        <module>freshchamber-hibernate</module>
        <module>freshchamber-graniteds</module>
    </modules>
</project>

Let’s next take a look at the coupons project. This is a flex app related to the main 3dvideomap app in that it uses the same backend, but it just shows coupons at http://coupons.3dvideomap.com. It isn’t using any Flex Modules or other advanced features. It’s a simple Flex 4.5 app. Let’s take a look at it’s pom.

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <artifactId>freshchamber-aggregator</artifactId>
        <groupId>com.swiftmako.freshchamber</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <groupId>com.swiftmako.freshchamber</groupId>
    <artifactId>freshchamber-coupons</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>swf</packaging>
    <name>freshchamber-coupons</name>
    <build>
        <sourceDirectory>src/main/flex</sourceDirectory>
        <testSourceDirectory>src/test/flex</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>com.savage7.maven.plugins</groupId>
                <artifactId>maven-external-dependency-plugin</artifactId>
                <version>0.5-SONATYPE-r116</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>resolve-external</goal>
                            <goal>install-external</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <createChecksum>true</createChecksum>
                    <skipChecksumVerification>false</skipChecksumVerification>
                    <artifactItems>
                        <artifactItem>
                            <groupId>com.adobe.flex.framework</groupId>
                            <artifactId>framework</artifactId>
                            <version>${flex.sdk.version}</version>
                            <packaging>swz</packaging>
                            <downloadUrl>http://fpdownload.adobe.com/pub/swz/flex/${flex.sdk.version}/{artifactId}_{version}.{packaging}</downloadUrl>
                        </artifactItem>
                        <artifactItem>
                            <groupId>com.adobe.flex.framework</groupId>
                            <artifactId>textLayout</artifactId>
                            <version>${flex.tlf.version}</version>
                            <packaging>swz</packaging>
                            <downloadUrl>http://fpdownload.adobe.com/pub/swz/tlf/${flex.tlf.version}/{artifactId}_{version}.{packaging}</downloadUrl>
                        </artifactItem>
                        <artifactItem>
                            <groupId>com.adobe.flex.framework</groupId>
                            <artifactId>osmf</artifactId>
                            <version>${flex.osmf.version}</version>
                            <packaging>swz</packaging>
                            <downloadUrl>http://fpdownload.adobe.com/pub/swz/flex/${flex.sdk.version}/{artifactId}_{version}.{packaging}</downloadUrl>
                        </artifactItem>
                        <artifactItem>
                            <groupId>com.adobe.flex.framework</groupId>
                            <artifactId>rpc</artifactId>
                            <version>${flex.sdk.version}</version>
                            <packaging>swz</packaging>
                            <downloadUrl>http://fpdownload.adobe.com/pub/swz/flex/${flex.sdk.version}/{artifactId}_{version}.{packaging}</downloadUrl>
                        </artifactItem>
                        <artifactItem>
                            <groupId>com.adobe.flex.framework</groupId>
                            <artifactId>charts</artifactId>
                            <version>${flex.sdk.version}</version>
                            <packaging>swz</packaging>
                            <downloadUrl>http://fpdownload.adobe.com/pub/swz/flex/${flex.sdk.version}/{artifactId}_{version}.{packaging}</downloadUrl>
                        </artifactItem>
                        <artifactItem>
                            <groupId>com.adobe.flex.framework</groupId>
                            <artifactId>mx</artifactId>
                            <version>${flex.sdk.version}</version>
                            <packaging>swz</packaging>
                            <downloadUrl>http://fpdownload.adobe.com/pub/swz/flex/${flex.sdk.version}/{artifactId}_{version}.{packaging}</downloadUrl>
                        </artifactItem>
                        <artifactItem>
                            <groupId>com.adobe.flex.framework</groupId>
                            <artifactId>spark</artifactId>
                            <version>${flex.sdk.version}</version>
                            <packaging>swz</packaging>
                            <downloadUrl>http://fpdownload.adobe.com/pub/swz/flex/${flex.sdk.version}/{artifactId}_{version}.{packaging}</downloadUrl>
                        </artifactItem>
                        <artifactItem>
                            <groupId>com.adobe.flex.framework</groupId>
                            <artifactId>advancedgrids</artifactId>
                            <version>${flex.sdk.version}</version>
                            <packaging>swz</packaging>
                            <downloadUrl>http://fpdownload.adobe.com/pub/swz/flex/${flex.sdk.version}/{artifactId}_{version}.{packaging}</downloadUrl>
                        </artifactItem>
                        <artifactItem>
                            <groupId>com.adobe.flex.framework</groupId>
                            <artifactId>sparkskins</artifactId>
                            <version>${flex.sdk.version}</version>
                            <packaging>swz</packaging>
                            <downloadUrl>http://fpdownload.adobe.com/pub/swz/flex/${flex.sdk.version}/{artifactId}_{version}.{packaging}</downloadUrl>
                        </artifactItem>
                        <artifactItem>
                            <groupId>com.adobe.flex.framework</groupId>
                            <artifactId>spark_dmv</artifactId>
                            <version>${flex.sdk.version}</version>
                            <packaging>swz</packaging>
                            <downloadUrl>http://fpdownload.adobe.com/pub/swz/flex/${flex.sdk.version}/{artifactId}_{version}.{packaging}</downloadUrl>
                        </artifactItem>
                    </artifactItems>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.flexmojos</groupId>
                <artifactId>flexmojos-maven-plugin</artifactId>
                <version>${flex.mojos.version}</version>
                <extensions>true</extensions>
                <dependencies>
                    <dependency>
                        <groupId>com.adobe.flex</groupId>
                        <artifactId>compiler</artifactId>
                        <version>${flex.sdk.version}</version>
                        <type>pom</type>
                    </dependency>
                    <dependency>
                        <groupId>com.adobe.flex.compiler</groupId>
                        <artifactId>adt</artifactId>
                        <version>${flex.sdk.version}</version>
                        <scope>compile</scope>
                    </dependency>
                    <dependency>
                        <groupId>com.adobe.flex</groupId>
                        <artifactId>flex-fontkit</artifactId>
                        <version>${flex.sdk.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.adobe.flex</groupId>
                        <artifactId>rideau</artifactId>
                        <version>${flex.sdk.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.adobe.flex</groupId>
                        <artifactId>afe</artifactId>
                        <version>${flex.sdk.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.adobe.flex</groupId>
                        <artifactId>aglj40</artifactId>
                        <version>${flex.sdk.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>html-wrapper</id>
                        <goals>
                            <goal>wrapper</goal>
                        </goals>
                        <configuration>
                            <templateURI>folder:/html-template</templateURI>
                            <parameters>
                                <swf>${project.build.finalName}</swf>
                                <width>100%</width>
                                <height>100%</height>
                                <version_major>${flash.major}</version_major>
                                <version_minor>${flash.minor}</version_minor>
                                <version_revision>${flash.revision}</version_revision>
                                <bgcolor>#FFFFFF</bgcolor>
                            </parameters>
                            <htmlName>index</htmlName>
                            <targetPlayer>${flash.major}.${flash.minor}.${flash.revision}</targetPlayer>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <configurationReport>true</configurationReport>
                    <sourceFile>index.mxml</sourceFile>
                    <swfVersion>11</swfVersion>
                    <compilerWarnings>
                        <warn-no-constructor>false</warn-no-constructor>
                    </compilerWarnings>
                    <metadata>
                        <title>Map Coupons</title>
                        <creators>
                            <creator>Andrew Westberg</creator>
                        </creators>
                        <publishers>
                            <publisher>Swift Mako Software Inc.</publisher>
                        </publishers>
                        <description>http://swiftmako.com</description>
                        <languages>
                            <language>EN</language>
                        </languages>
                    </metadata>
                    <keepAs3Metadatas>
                        <keepAs3Metadata>Bindable</keepAs3Metadata>
                        <keepAs3Metadata>Events</keepAs3Metadata>
                        <keepAs3Metadata>EventHandler</keepAs3Metadata>
                        <keepAs3Metadata>Inject</keepAs3Metadata>
                        <keepAs3Metadata>Autowire</keepAs3Metadata>
                        <keepAs3Metadata>Mediate</keepAs3Metadata>
                        <keepAs3Metadata>Dispatcher</keepAs3Metadata>
                        <keepAs3Metadata>PostConstruct</keepAs3Metadata>
                        <keepAs3Metadata>PreDestroy</keepAs3Metadata>
                    </keepAs3Metadatas>
                    <fonts>
                        <advancedAntiAliasing>true</advancedAntiAliasing>
                        <maxCachedFonts>20</maxCachedFonts>
                        <maxGlyphsPerFace>1000</maxGlyphsPerFace>
                        <managers>
                            <manager>flash.fonts.JREFontManager</manager>
                            <manager>flash.fonts.BatikFontManager</manager>
                            <manager>flash.fonts.AFEFontManager</manager>
                            <manager>flash.fonts.CFFFontManager</manager>
                        </managers>
                    </fonts>
                    <quality>0.90</quality>
                    <optimize>true</optimize>
                    <debug>false</debug>
                    <defaultBackgroundColor>0xFFFFFF</defaultBackgroundColor>
                    <themes>
                        <theme>${settings.localRepository}/com/adobe/flex/framework/spark/${flex.sdk.version}/spark-${flex.sdk.version}-theme.css</theme>
                    </themes>
                    <removeUnusedRsls>true</removeUnusedRsls>
                    <rslUrls>
                        <url>{artifactId}_{version}.{extension}</url>
                    </rslUrls>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.2</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.adobe.flex.framework</groupId>
                                    <artifactId>framework</artifactId>
                                    <version>${flex.sdk.version}</version>
                                    <type>swz</type>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                    <destFileName>framework_${flex.sdk.version}.swz</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.adobe.flex.framework</groupId>
                                    <artifactId>textLayout</artifactId>
                                    <version>${flex.tlf.version}</version>
                                    <type>swz</type>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                    <destFileName>textLayout_${flex.tlf.version}.swz</destFileName>
                                </artifactItem>
                                <!--
                                <artifactItem>
                                    <groupId>com.adobe.flex.framework</groupId>
                                    <artifactId>osmf</artifactId>
                                    <version>${flex.osmf.version}</version>
                                    <type>swz</type>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                    <destFileName>osmf_${flex.osmf.version}.swz</destFileName>
                                </artifactItem>
                                -->
                                <artifactItem>
                                    <groupId>com.adobe.flex.framework</groupId>
                                    <artifactId>rpc</artifactId>
                                    <version>${flex.sdk.version}</version>
                                    <type>swz</type>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                    <destFileName>rpc_${flex.sdk.version}.swz</destFileName>
                                </artifactItem>
                                <!--
                                <artifactItem>
                                    <groupId>com.adobe.flex.framework</groupId>
                                    <artifactId>charts</artifactId>
                                    <version>${flex.sdk.version}</version>
                                    <type>swz</type>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                    <destFileName>charts_${flex.sdk.version}.swz</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.adobe.flex.framework</groupId>
                                    <artifactId>mx</artifactId>
                                    <version>${flex.sdk.version}</version>
                                    <type>swz</type>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                    <destFileName>mx_${flex.sdk.version}.swz</destFileName>
                                </artifactItem>
                                -->
                                <artifactItem>
                                    <groupId>com.adobe.flex.framework</groupId>
                                    <artifactId>spark</artifactId>
                                    <version>${flex.sdk.version}</version>
                                    <type>swz</type>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                    <destFileName>spark_${flex.sdk.version}.swz</destFileName>
                                </artifactItem>
                                <!--
                                <artifactItem>
                                    <groupId>com.adobe.flex.framework</groupId>
                                    <artifactId>advancedgrids</artifactId>
                                    <version>${flex.sdk.version}</version>
                                    <type>swz</type>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                    <destFileName>advancedgrids_${flex.sdk.version}.swz</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.adobe.flex.framework</groupId>
                                    <artifactId>sparkskins</artifactId>
                                    <version>${flex.sdk.version}</version>
                                    <type>swz</type>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                    <destFileName>sparkskins_${flex.sdk.version}.swz</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.adobe.flex.framework</groupId>
                                    <artifactId>spark_dmv</artifactId>
                                    <version>${flex.sdk.version}</version>
                                    <type>swz</type>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                    <destFileName>spark_dmv_${flex.sdk.version}.swz</destFileName>
                                </artifactItem>
                                -->
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <!-- RSL dependencies -->
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>framework</artifactId>
            <version>${flex.sdk.version}</version>
            <type>swc</type>
            <scope>caching</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>textLayout</artifactId>
            <version>${flex.tlf.version}</version>
            <type>swc</type>
            <scope>caching</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>osmf</artifactId>
            <version>${flex.osmf.version}</version>
            <type>swc</type>
            <scope>caching</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>rpc</artifactId>
            <version>${flex.sdk.version}</version>
            <type>swc</type>
            <scope>caching</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>charts</artifactId>
            <version>${flex.sdk.version}</version>
            <type>swc</type>
            <scope>caching</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>mx</artifactId>
            <version>${flex.sdk.version}</version>
            <type>swc</type>
            <scope>caching</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>spark</artifactId>
            <version>${flex.sdk.version}</version>
            <type>swc</type>
            <scope>caching</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>advancedgrids</artifactId>
            <version>${flex.sdk.version}</version>
            <type>swc</type>
            <scope>caching</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>sparkskins</artifactId>
            <version>${flex.sdk.version}</version>
            <type>swc</type>
            <scope>caching</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>spark_dmv</artifactId>
            <version>${flex.sdk.version}</version>
            <type>swc</type>
            <scope>caching</scope>
        </dependency>

        <!-- standard dependencies -->
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>flex-framework</artifactId>
            <version>${flex.sdk.version}</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>com.adobe.flexunit</groupId>
            <artifactId>flexunit</artifactId>
            <version>${flexunit.version}</version>
            <type>swc</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.graniteds</groupId>
            <artifactId>granite-essentials-swc</artifactId>
            <version>${graniteds.version}</version>
            <type>swc</type>
            <scope>internal</scope>
        </dependency>
        <dependency>
            <groupId>org.swizframework</groupId>
            <artifactId>swiz-framework</artifactId>
            <version>${swiz.version}</version>
            <classifier>sparkonly</classifier>
            <type>swc</type>
            <scope>compile</scope>
        </dependency>
    </dependencies>
</project>

The first thing you’ll notice is that I’m using the maven-external-dependency-plugin to download all of the flex framework .swz files and store them in my local maven repository. They need to be in my local repository so I can copy them to the output folder later on.

I’m then executing the flex-mojos-maven-plugin. You’ll notice that I specify an execution to run the html-wrapper goal. In that goal, I specify a template folder so it will use the html template generated by FlashBuilder instead of the Flex-Mojos default. You’ll may also notice that I’m _NOT_ specifying an execution for the compile-swf goal. That’s because this happens automatically by convention. I only need to specify parameters for what I’m changing from the defaults.

When you run your build using “mvn clean install”, Flex-Mojos will spit out a list of what RSLs are required for your .swf to run. Use this list and comment out any unneeded ones in the maven-dependency-plugin: copy goal. This ensures that you only copy those RSL swz files to the output folder that your swf actually needs.

Let’s next look at a more complex example. The freshchamber-flex project is another Flex app, but this one uses a Flex Module. The Admin Module only shows up in the app when an end user accesses it from mapdashboard.com. When a normal user accesses the map, we don’t want to have the overhead of all of that configuration and editing code, so we put it into a module and only load it on the occasion that an admin or advertiser wants to edit the database.

The only changed section is to our configuration where we tell it to compile a module and optimize it for our main swf. We also have to force certain RSLs to be loaded because they’re _only_ used by the Admin module.

                    <modules>
                        <module>
                            <sourceFile>com/swiftmako/freshchamber/views/AdminViewModule.mxml</sourceFile>
                            <optimize>true</optimize>
                            <finalName>AdminViewModule</finalName>
                            <destinationPath>com/swiftmako/freshchamber/views</destinationPath>
                        </module>
                    </modules>
                    <removeUnusedRsls>true</removeUnusedRsls>
                    <rslUrls>
                        <url>{artifactId}_{version}.{extension}</url>
                    </rslUrls>
                    <forceRsls>
                        <rsl>${settings.localRepository}/com/adobe/flex/framework/mx/${flex.sdk.version}/mx-${flex.sdk.version}.swc</rsl>
                        <rsl>${settings.localRepository}/com/adobe/flex/framework/charts/${flex.sdk.version}/charts-${flex.sdk.version}.swc</rsl>
                        <rsl>${settings.localRepository}/com/adobe/flex/framework/sparkskins/${flex.sdk.version}/sparkskins-${flex.sdk.version}.swc</rsl>
                    </forceRsls>

So, that’s the basics of making flex-mojos behave a bit like FlashBuilder. Below you’ll find an archive of all the various poms in my project. It will cover things like generating AS3 classes from Java classes for use in GraniteDS remoting. Post comments below if you have any questions.

POMs.zip

Post to Twitter

Posted by Andrew, filed under as3, Flex, Flexbuilder, Java, Maven. Date: May 19, 2011, 11:31 am | 5 Comments »

I’ve noticed that at times FlashBuilder and in my case, the FlashBuilder plugin for Eclipse seems to randomly lose its ability to work. In the past, I’ve had to completely rebuild my workspace and re-import all of my projects. I’ve also seen a number of posts about how you should

1.) shutdown flashbuilder
2.) in your workspace/.metadata/.plugins folder, delete the com.adobe.flexbuilder.codemodel folder
3.) restart flashbuilder

Unfortunately, this one didn’t work for me. If it works for you, great. My problem seemed to be some type of conflict with either the subclipse plugin, or the M2Eclipse plugin. The following worked for me. Hopefully this is useful to you.

1.) shutdown flashbuilder
2.) in your workspace/.metadata/.plugins folder, delete any folder containing “subversion”, or “maven” in its name.
3.) restart flashbuilder

Hopefully this helps you out. If not, best of luck rebuilding your workspace.

Post to Twitter

Posted by Andrew, filed under as3, Flex, Flexbuilder. Date: March 23, 2011, 10:48 am | 1 Comment »

I just wanted to blog my initial impressions of FlexBuilder 3 after a day of use.  The IDE seems very much the same as the final beta.  There are some new feature there I know, but I haven’t really gotten into them yet.  It was nice that the AIR app descriptor didn’t change except for the version number between beta 3 and 1.0.  I was able to simply re-compile my AIR apps to get them going.  I did have one minor freakout incident when my Loader code wouldn’t load a swf file.  It gave me an error saying that Loader couldn’t load executable code.  My initial reaction was, “OH NO!  Adobe took away that feature!  #%$&*!!”  After perusing the documentation for awhile, I realized that they had just made the system a bit more secure in that they check to make sure you know what the heck you’re doing before allowing you to execute random code in your app.  The change Adobe made was to the LoaderContext class.  They added the property allowLoadBytesCodeExecution which defaulted to false.  A quick change to my code and all was well with the world again.  Very nice job Adobe.  I’m impressed.

Post to Twitter

Posted by Andrew, filed under Flexbuilder. Date: February 25, 2008, 9:29 pm | No Comments »

I just saw on the flexcoders yahoo group that FlexBuilder 3 went live. I just bought my upgrade and will try to update all my code for the presentation Wednesday.

Post to Twitter

Posted by Andrew, filed under Flexbuilder. Date: February 25, 2008, 8:05 am | No Comments »