Announcement Announcement Module
Collapse
No announcement yet.
Demo - Using Maven to Build Flex Web App Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Demo - Using Maven to Build Flex Web App

    I know I will be scolded for being lazy here

    I'm curious to know if anyone has experience using Maven to build a Flex web app (swf) with Spring ActionScript

    Here's an article on how to build a SWF using flexmojos

    http://www.sonatype.com/books/maven-...al-compile-swf

    What I am curious about is if it makes sense to use flexmojos for development - I'd imagine most Flex programmers tend to use Flex Builder, which is an excellent tool.

    For me, a big downside with using Maven is that I find it hard to configure and maintain pom files - especially now that I am trying to include Spring ActionScript and possibly other libraries as dependecies.

    I'd like to hear people's thoughts on this.

    Would you set up a development process that solely relies on Maven to build, test, and generate documents for your SWF application?

    What's your setup so that you can use an IDE like Flex Builder to work on Maven projects?

  • #2
    Hi,

    we are currently working on a big Java/Flex project that is completely build with Maven. The Maven build files are also used in Hudson, a Continuous Integration server, where it obviously makes perfect sense to use Maven.

    For the client development we use Eclipse and Flash Builder and configure everything in FB. We also use the m2eclipse plugin to run Maven builds from Eclipse.

    So I would say yes, it makes sense to build with Maven especially if you want to have a CI system doing builds for you. I agree though that maintaining pom files can sometimes be a pain...

    regards,
    Christophe

    Comment


    • #3
      Hi Christophe! I'm guessing Hudson is used to build the server-side components. Are you also using it to build and deploy the clients?

      What I am researching is a good way to use Maven to build the client (Flex projects). Some of the challenges are:

      What should the project structure look like? i.e., how are the files and directories organized?

      What happens when a Flex developer wants to include a 3rd party library (e.g., Spring ActionScript and ILOG Elixir)? Does he need to modify the .pom file?

      I would like to setup a development process where the Flex programmers can work in the Flex Builder, but production releases are created by a CI server. Is that something you guys are doing?

      I noticed that the Spring ActionScript framework itself is built using Maven. So I figure I can find some experts on the forum about this idea.

      Perhaps we can look forward to a blog entry on this?
      Last edited by jlcheng; Jul 23rd, 2009, 10:56 AM.

      Comment


      • #4
        I'm guessing Hudson is used to build the server-side components. Are you also using it to build and deploy the clients?
        Yes, both the client and the server code is build with Maven.

        What should the project structure look like? i.e., how are the files and directories organized?
        We have different projects for the client and server code. The code of a client project is using standard maven folder structures (src/main/flex, src/test/flex, etc). See the Flex Mojos plugin for more info.

        What happens when a Flex developer wants to include a 3rd party library (e.g., Spring ActionScript and ILOG Elixir)? Does he need to modify the .pom file?
        You'll need to specify the new dependencies in the pom file and specify the repository the external libs are hosted. If they are not hosted externally, you'll need to deploy/install them locally or use a Maven repository manager like Nexus.

        I would like to setup a development process where the Flex programmers can work in the Flex Builder, but production releases are created by a CI server. Is that something you guys are doing?
        That is exactly what we are doing. We develop all code locally in Flash Builder and commit the code to SVN. Hudson will checkout the new sources and run the Maven build files. You can also run the build files locally via the command line or using the m2eclipse plugin. Flex Mojos also supports generating eclipse project settings.

        I noticed that the Spring ActionScript framework itself is built using Maven. So I figure I can find some experts on the forum about this idea.
        Martino and Damir are handling the Maven files. I'm only a Maven enthousiast (well sometimes ;-))

        Comment


        • #5
          So I am working on creating a simple POM that will include SpringAction script; hopefully others will be able to run with it and use Maven to do their builds.

          One trouble I have is with the dependencies for Spring Spring ActionScript.

          This is my dependency:

          Code:
              <dependency>
                <groupId>org.springextensions.actionscript</groupId>
                <artifactId>spring-actionscript-core</artifactId>
                <version>0.8</version>
                <type>swc</type>
                <scope>provided</scope>
              </dependency>
          I am using http://dev.yoolab.org/maven/content/repositories/releases as the repository URL.

          Maven complains about not being able to find org.as3commons:as3commons-lang:swc:1.0.0-SNAPSHOT, which is a dependency of Spring ActionScript.

          Looking at the POM for 0.8, I see
          Code:
              <dependency>
                <groupId>org.as3commons</groupId>
                <artifactId>as3commons-lang</artifactId>
                <type>swc</type>
                <exclusions>
                   <exclusion>
                     <groupId>com.adobe.flex.framework</groupId>
                     <artifactId>flex-framework</artifactId>
                   </exclusion>
                </exclusions>
              </dependency>
          However, there is no as3commons-lang project; at least not in the dev.yoolab.org repository. Perhaps it needs to reference as3commons-project instead?

          Am I interpreting this issue correctly?

          Comment


          • #6
            My bad. It looks like I posted a little too soon. There is no as3commons-lang release in the "release" repository.

            Like it was pointed out here:
            http://forum.springsource.org/showthread.php?t=75037

            Currently, we'd have to use the as3commons-lang libraries from the snapshot repository.

            Comment

            Working...
            X