I made a change in the blogger configuration to ease the later work when blogging. It is possible that older entries are not correctly formatted.

Thursday, 22 April 2010

Flex - generating Flex on Java Project

I collected the following from The Flex On Java Book.

$workspace > mvn archetype:create -DarchetypeGroupId=org.foj -DarchetypeArtifactId=flex-mojos-archetype -DarchetypeVersion=1.0-SNAPSHOT -DgroupId=org.foj -DartifactId=flex-bugs-ria -DremoteRepositories=http://flexonjava.googlecode.com/svn/repository

However, I still need to solve some dependency problems. In particular I needed to install the following packages:

  • com.adobe.flex.compiler:asdoc:zip:template:3.2.0.3958
  • org.graniteds:granite-generator:jar:1.1.0
  • com.adobe.flex:compiler:pom:4.0.0.7219

But this is solved by using the correct repository by adding
<repositories>
   ...
    <repository>
       <id>flexcompiler-repo</id>
       <url>http://repository.sonatype.org/content/groups/flexgroup/</url>
    </repository>
</repositories>

However, after running:

$flex-bugs-ria >mvn package
it runs quite a while with an error. It seems it just could not start the flash player. So it may be all good ;-).

It returns successful and the generated swf can be displayed in the browser

$flex-bugs-ria >mvn package-Dmaven.test.skip=true

Next step: do a more complex flex example.