Posts Tagged maven

Great Ant Build Series for Flex

Many people have asked if we use Maven or Ant for Flex builds…while we like Maven for Java, we don’t like Maven for Flex. It’s not that we don’t like Maven in general (obviously since we’re cool with it for Java), we just found it’s almost too much trouble with Flex. It never fails to make us want to pull our hair out and say “Why bother?” — Yes, we have usedĀ FlexMojos and we’re still notĀ convinced. So we use Ant for Flex builds.

Instead of writing our own Ant build tutorial series for Flex, we’d like to push you to Jon Campos’s tutorials:

January 7th, 2010 - Using ANT to build an Application
January 14th, 2010 - Building a Library with ANT
January 19th, 2010 - Building the HTML Wrapper with ANT
January 20th, 2010 - Building a Custom HTML Wrapper with ANT
January 21st, 2010 - Including Assets Files with ANT
January 26th, 2010 - Building a Library and Application with ANT
January 28th, 2010 - Building ASDocs with ANT
February 2nd, 2010 - Run Flex Unit Tests from ANT
February 4th, 2010 - Run FlexMonkey Tests from ANT
February 9th, 2010 - The Master Flex ANT File

Thanks for an awesome series Jon.

As a side note, if someone can convince me that mvn + flex is better/easier than ant by all means ping me. brianr@webappsolution.com

Post to Twitter Tweet This Post

, ,

1 Comment

Some Helpful Settings For Maven Builds

When running Maven builds, there are typically a few settings that are useful to have in your ~/.bash_profile (for Mac or similar, depending on your shell) to help get things off on the right foot.

Set memory usage to 1024M minimum.
export MAVEN_OPTS=-Xmx1024m

Set the path to the appropriate SDK for Flash Builder
FLASH4_SDK=’/Applications/Adobe Flash Builder 4 Plug-in/sdks/3.5.0′

Set the path for ADL if building AIR applications
ADL_PATH=${FLASH4_SDK}/bin

Set the path to the Flash Player for launching FlexUnit tests
FLASH_PLAYER_PATH=’/Applications/Adobe Flash Builder 4 Plug-in/Player/mac/Flash Player.app/Contents/MacOS’

Append these to the current path
export PATH=${PATH}:${ADL_PATH}
export PATH=${PATH}:${FLASH_PLAYER_PATH}

Post to Twitter Tweet This Post

, ,

No Comments

Maven2 Install Error: java.lang.OutOfMemoryError: Java heap space

If you ever run the maven command “maven install” and you run into the following error:

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Java heap space
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.OutOfMemoryError: Java heap space

Try setting the MAVEN_OPTS memory to a larger max; eg:

Last login: Wed Jul  1 12:33:56 on ttys000
brian-rileys-macbook-pro:~ brianmriley$ export MAVEN_OPTS=-Xmx1024m
brian-rileys-macbook-pro:~ brianmriley$ cd /Users/brianmriley/projects/spring-hibernate/workspaces/emp-mgmt-console/SpringActionscript/trunk/core
brian-rileys-macbook-pro:core brianmriley$ mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Spring ActionScript
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
...
[INFO] Installing /Users/brianmriley/projects/spring-hibernate/workspaces/emp-mgmt-console/SpringActionscript/trunk/core/target/spring-actionscript-0.8-SNAPSHOT.swc to /Users/brianmriley/.m2/repository/org/springextensions/spring-actionscript/0.8-SNAPSHOT/spring-actionscript-0.8-SNAPSHOT.swc
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33 seconds
[INFO] Finished at: Wed Jul 01 14:58:34 EDT 2009
[INFO] Final Memory: 26M/115M
[INFO] ------------------------------------------------------------------------

Just keep in mind this is a one time dealio and you’ll have to set this each time you run a maven install.

Post to Twitter Tweet This Post

, , , , , ,

1 Comment