Building Flexmojos from sources

Skip to end of metadata
Go to start of metadata

Building from sources

Standard instruction to use Git and Maven to build FlexMojos.

Accessing the sources

The Subversion source repository is not where current FlexMojos development is done. It has been moved to the Git VCS system and is stored on Github. To checkout the sources, you must have the git command installed, or an IDE which supports Git.
git clone http://github.com/Flexmojos/flexmojos.git

This command will clone the Github FlexMojos repository, which will make it available locally. git pull can be used to update your repository after you clone it. These commands are loosely equivalent to svn co and svn up (but not exactly).

Maven repository

FlexMojos depends on some Maven plugins only available at Sonatype public repository. You'll need to add the following to your Maven settings.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<settings>
 ...
  <profiles>
     <profile>
        <id>flex-mojos</id>
            <repositories>
                <!-- Required for regular plugin use until moved over to Maven central repo. -->
                <repository>
                    <id>flex-mojos-repository</id>
                    <url>http://repository.sonatype.org/content/groups/flexgroup/</url>
                    <releases> <enabled>true</enabled> </releases>
                    <snapshots> <enabled>false</enabled> </snapshots>
                </repository>

                <!-- Required for building plugin from source. -->
                <repository>
                    <id>flex-mojos-internal-repository</id>
                    <url>http://repository.sonatype.org/content/groups/public/</url>
                    <releases> <enabled>true</enabled> </releases>
                    <snapshots> <enabled>true</enabled> </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <!-- Required for regular plugin use until moved over to Maven central repo. -->
                <pluginRepository>
                    <id>flex-mojos-plugin-repository</id>
                    <url>http://repository.sonatype.org/content/groups/flexgroup/</url>
                    <releases> <enabled>true</enabled> </releases>
                    <snapshots> <enabled>false</enabled> </snapshots>
                </pluginRepository>

                <!-- Required for building plugin from source. -->
                <pluginRepository>
                    <id>flex-mojos-internal-plugins-repository</id>
                    <url>http://repository.sonatype.org/content/groups/public/</url>
                    <releases> <enabled>true</enabled> </releases>
                    <snapshots> <enabled>true</enabled> </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>

    <activeProfiles>
        <activeProfile>flex-mojos</activeProfile>
    </activeProfiles>
 ...
</settings>

In addition, there is one JAR (AIR development tools) that is packaged with the Flex SDK but is not open source. Because of this, Maven cannot host this artifact. To build the plugin from source, you will need to install this artifact into your own private repo:

>mvn install:install-file -DgroupId=com.adobe.flex -DartifactId=adt -Dversion=3.2.0.3958 -Dpackaging=jar -Dfile=adt.jar

This JAR is bundled with the Flex SDK, which is freely available from Adobe's website: http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3sdk

First Build

FlexMojos uses itself to build ActionScript modules, but Maven doesn't handle that that well. To workaround this there is an extra profile defined on poms. Activate it by doing:
$ mvn clean install -P minimal

Alternatively, if you enable snapshots on the flex-mojos-repository and flex-mojos-plugin-repository repositories (shown above, with <snapshots> <enabled>false</enabled> </snapshots> for both), you can skip this step and the mvn clean install command will download the latest 4.0-SNAPSHOT from the repository.

Regular Builds

After first build flexmojos can be built normally just like any maven project:
$ mvn clean install

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Aug 09, 2009

    Vladimir Krivosheev says:

    Maven Code Style And Code Conventions — http://maven.apache.org/developers/conve...

    Maven Code Style And Code Conventions — http://maven.apache.org/developers/conventions/code.html