How to compile Starling with Maven

Introduction

Unfortunately, we don't have a maintainer for the Maven build system any more. Thus, I had to remove the “maven” build files from the repository — rendering the tutorial below rather useless.

If you want to see Maven return, any help is welcome!

Maven is a powerful build system, like Ant, but it's more universal, with strict workflow and build phases. Furthermore, it supports dependency management out-the-box. Flex Framework, Robotlegs, as3commons and many other libraries are available via public repositories, and there is no need to collect *.swc files in some awful-always-growing “libs” folder. BTW, the Flex compiler is also a dependency, just recall your “sdk” folder, with 4.5.1, 4.6, 4.1.0 and other flex frameworks — all of that now can be deleted, yay!

Compiling Starling with Maven

  1. Install Maven3 :-) there are many tutorials on it, and there is no difference between the installation of ant or maven, i swear ;) (Official site: maven.apache.org)
  2. cd into the Starling root folder
  3. to compile it, run
    mvn --file starling/build/maven/pom.xml compile
  4. That's all! The SWC file will be placed at starling/build/maven/target/

Using Starling as dependency in your Maven projects

If you use Maven, you already know, how easy to attach Starling to your project, but i will remind you! :-)

  1. Configure the repository:
    <repository>
        <id>starling-repository</id>
        <url>http://repository-trylogic.forge.cloudbees.com/snapshot</url>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
  2. configure the dependencies:
    <dependency>
        <groupId>com.gamua</groupId>
        <artifactId>starling-framework</artifactId>
        <version>[1.2, ]</version>
        <type>swc</type>
    </dependency>
  3. Done! Easy, huh?

Where to go from here

  • The main benefit for Maven is to simplify the build process and support Continuous Integration. You can find the current build server (Jenkins) for Starling here.
  • All build artifacts are deployed to public repo, you can use it in your Maven (or Ivy, for example) projects anytime you want.
  • Maven support will be improved in future, here is my little road-map:
    1. Configure tests (it's not easy, because it requires Flash Player on build server, but cloudbees supports it, AFAIK)
    2. create own account for Starling at cloudbees (or something similar)
    3. ask Daniel to place pom.xml in root of repo :-D
  tutorials/how_to_compile_starling_with_maven.txt · Last modified: 2016/11/16 18:11 by daniel
 
Powered by DokuWiki