Maven, Flex Mojos and Flash Builder 4 tip

Flash Builder, Maven, tips 'n tricks No Comments »

Here's a quick tip for those of you who are using Flash Builder 4's FlexUnit integration and also build with Maven and Flex Mojos.

When executing the unit tests of your library project or application, Flash Builder creates a FlexUnitApplication.mxml file in the root package of your main class path. This file is the test runner UI that gets compiled when the tests are run. The problem is that when you try to execute a Maven build on your project, the build will fail because the test runner UI will also get compiled.

A solution is to use the maven-clean-plugin in the build phase and configure it to delete the FlexUnitApplication.mxml file.

To use it, place the following xml in the "build/plugins" section of your Maven build file. You might need to change the "directory" setting to match your classpath.

XML:
  1. <plugin>
  2.     <artifactId>maven-clean-plugin</artifactId>
  3.     <configuration>
  4.         <filesets>
  5.             <fileset>
  6.                 <directory>src/main/actionscript</directory>
  7.                 <includes>
  8.                     <include>FlexUnitApplication.mxml</include>
  9.                 </includes>
  10.             </fileset>
  11.         </filesets>
  12.     </configuration>
  13. </plugin>

If you now execute a "mvn clean install" command, the file will be removed and the build should succeed.


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 

Flex Formatter Eclipse Plug-in

ActionScript, Air, Flash Builder, Flex, Flex Builder, eclipse, tips 'n tricks 6 Comments »

If you're using Eclipse and Flash/Flex Builder, you might want to have a look at the Flex Formatter Plug-in. It's a great add-on that allows you to (auto-)format your ActionScript and MXML files, based on the templates you define.

This is a key feature that is still missing in Flash/Flex Builder in my opinion.

More info: http://sourceforge.net/projects/flexformatter/


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 

Spring ActionScript: site and documentation update

ActionScript, Air, Flash, Flex, Inversion of Control, Spring ActionScript 9 Comments »

Some quick news about the status of the project.

The Spring ActionScript project has a new home at http://www.springactionscript.org!

We have been updating the documentation extensively and although this is still a work in progress, this should be a valuable resource to get started with the framework. Please see the "Documentation" section for more info and available doc formats.

There are also some neat new features like advanced autowiring and support for custom XML namespaces (available in SVN) that will be distributed with the new 0.8 release, expected to be released by the end of this week.

As usual, we appreciate any feedback. Join our Google developers group or the forum.

Have fun coding!


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 

Introducing the AS3Commons project

AS3Commons, ActionScript, Air, Flash, Flex 1 Comment »

While working on the Spring ActionScript framework, we wrote a lot of code that could perfectly be used outside of the framework. That's why we decided to start the AS3Commons project, based on idea of the Apache Commons project, and provide a set of core libraries useful to every ActionScript 3.0 developer.

This announcement is also the immediate release of 2 of the libraries included:

  • AS3Commons-Reflect: a reflection library
  • AS3Commons-Logging: an abstraction layer over logging frameworks

Note: we realize there is another as3commons library out there. However this library is no longer being maintained and developed as confirmed by the author. We apologize in advance for the confusion this might cause. We are currently looking into the code and will try to include/replace the functionality in the new project.

AS3Commons-Reflect

This is a reflection library, or a clear API written around describeType(). It allows you to get runtime information about classes and objects running in your application, like the properties and methods available in a class, the metadata associated with a certain property, ... and it also allows you to dynamically instantiate objects and invoke their methods.

We had previously moved this from the Spring ActionScript sources to the AS3Reflect project. However, since we had plans of extracting other part of the framework as well, we decided to bundle everything under the AS3Commons project. The AS3Reflect library is hence no longer available and we advice all users to update to the new release.

For more info, please see http://www.as3commons.org/as3-commons-reflect

AS3Commons-Logging

This is a logging abstraction layer over existing logging frameworks. It is a lightweight library that offers a logger interface and a set of adapters and decorators for existing logging frameworks, like the logging API in the Flex framework.

It is perfectly fit for library and framework developers that want to enable logging information in their distributed libraries without tying their code to a specific logging framework. Logging happens via the logger interfaces provided by AS3Commons-Logging and users are then able to configure the logger with the implementation they prefer.

Here's a small example:

Actionscript:
  1. // configure the LoggerFactory with the Flex logging framework
  2. private static var loggerSetup:* = (LoggerFactory.loggerFactory = new FlexLoggerFactory());
  3.  
  4. // get a logger from the factory, in which all log statements will be handled by the Flex logger
  5. private static var logger:ILogger = LoggerFactory.getLogger("com.domain.MyClass");

We will update the project with new adapters for existing logging frameworks. Let us know if you have any framework that you would like to see supported.

For more info, please see: http://www.as3commons.org/as3-commons-logging

Get Involved

We welcome participation from all that are interested, at all skill levels. Coding, documentation and testing are all critical parts of the software development process. If you are interested in participating in any of these aspects, please join us! You can leave a comment or mail me at christophe.herreman [at] gmail [dot] com.

www.as3commons.org


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 

Streaming AMF not working on Internet Explorer 8

BlazeDS, Flex No Comments »

If you're having trouble connecting to BlazeDS via a streaming AMF channel on IE 8, be warned: this is a known issue currently reported in the Adobe bugbase and a workaround is provided. You need to specify the "max-streaming-clients" in the configuration of the channel (in services-config.xml):

CODE:
  1. <channel-definition id="my-streaming-amf" class="mx.messaging.channels.StreamingAMFChannel">
  2.   <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/streamingamf" class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
  3.   <properties>
  4.     <max-streaming-clients>10</max-streaming-clients>
  5.   </properties>
  6. </channel-definition>

Cheers!


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in