Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tschneidereit committed Dec 23, 2011
2 parents 933e3fe + 913259e commit adbd3d9
Show file tree
Hide file tree
Showing 5 changed files with 234 additions and 0 deletions.
41 changes: 41 additions & 0 deletions Maven-README.md
@@ -0,0 +1,41 @@
Maven usage
=====

Installation
------

__Step 1: Install Maven 3.0.3+__

[Download from here](http://maven.apache.org/download.html)

__Step 2: Ensure maven binaries are on your PATH (ie. you can run `mvn` from anywhere)__

Follow the installation instructions from [here](http://maven.apache.org/download.html#Installation).

__Step 3: CD to the SwiftSuspenders root (where the POM.xml lives)__

__Step 4: Install the third party dependencies into your local repository__

* In OS X

bash -x maven-runonce.sh

* In Windows

maven-runonce.bat

>Note: we do this because unlike Ant, Maven requires all dependencies live within a repository somewhere. Because none of these dependencies are hosted externally on a remote repository, we need to install them locally into the repository. Going forward, the hope is that many of these dependencies will live in Maven Central, negating the need to install them locally. JM.

To build
-----
In order to build SwiftSuspenders from source, run the following command in the root folder.

mvn clean install -s settings.xml


Alternative to supplying settings
-----
If you would rather not supply `-s settings.xml` for every build, you can add the repository information from settings.xml into your local repository. Alternatively, you can simply copy the SwiftSuspenders settings.xml to `~/.m2/settings.xml` where ~ is your user directory (`\Users\username` in Win7+)

> __Why do we need the settings file?__ While Flexmojos lives within Maven Central, its dependencies (such as the Flex compiler) and flash project dependencies (such as framework SDKs) do NOT. They live within the flexgroup branch off (sonatype)[http://repository.sonatype.org/content/groups/flexgroup/].
2 changes: 2 additions & 0 deletions maven-runonce.bat
@@ -0,0 +1,2 @@
call mvn -s settings.xml install:install-file -Dfile=build/libs/flexunit-4.1.0-8-as3_4.1.0.16076.swc -DgroupId=com.adobe.flexunit -DartifactId=flexunit -Dversion=4.1.0-8 -Dpackaging=swc -Dclassifier=as3
call mvn -s settings.xml install:install-file -Dfile=build/libs/hamcrest-as3-only-1.1.3.swc -DgroupId=org.hamcrest -DartifactId=hamcrest-as3 -Dversion=1.1.3 -Dpackaging=swc -Dclassifier=as3
3 changes: 3 additions & 0 deletions maven-runonce.sh
@@ -0,0 +1,3 @@
#!/bin/bash
mvn -s settings.xml install:install-file -Dfile=build/libs/flexunit-4.1.0-8-as3_4.1.0.16076.swc -DgroupId=com.adobe.flexunit -DartifactId=flexunit -Dversion=4.1.0-8 -Dpackaging=swc -Dclassifier=as3
mvn -s settings.xml install:install-file -Dfile=build/libs/hamcrest-as3-only-1.1.3.swc -DgroupId=org.hamcrest -DartifactId=hamcrest-as3 -Dversion=1.1.3 -Dpackaging=swc -Dclassifier=as3
159 changes: 159 additions & 0 deletions pom.xml
@@ -0,0 +1,159 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<groupId>org.swiftsuspenders</groupId>
<artifactId>SwiftSuspenders</artifactId>

<version>2.0.0-b1-SNAPSHOT</version>

<packaging>swc</packaging>

<name>Swift Suspenders</name>
<description>
SwiftSuspenders is a basic metadata driven IOC (Inversion Of Control) solution for AS3. In its basic approach, it is similar to the SmartyPants IOC framework by Josh McDonald, but it differs from SmartyPants in two respects: It is inferior in capabilities and it is quite somewhat faster.

Its main Raison d’être is supporting the very nice Robotlegs AS3 MCVS framework by Shaun Smith – hence the name.
</description>
<url>https://github.com/tschneidereit/SwiftSuspenders</url>
<licenses>
<license>
<name>SwiftSuspenders Custom License</name>
<url>https://github.com/tschneidereit/SwiftSuspenders/blob/master/LICENSE</url>
<distribution>repo</distribution>
</license>
</licenses>

<developers>
<developer>
<id>tschneidereit</id>
<name>Till Schneidereit</name>
<url>http://www.tillschneidereit.de</url>
<roles>
<role>Founder</role>
</roles>
</developer>
</developers>
<contributors>
<contributor>
<name>Justin J. Moses</name>
<url>http://about.me/justinj</url>
<roles>
<role>Maven contributor</role>
</roles>
</contributor>
</contributors>

<scm>
<url>https://github.com/tschneidereit/SwiftSuspenders</url>
<connection>git://github.com/tschneidereit/SwiftSuspenders.git</connection>
</scm>

<properties>
<flexmojos.version>4.0-RC2</flexmojos.version>

<!-- The Flex SDK to compile against -->
<flex.sdk.version>4.5.1.21328</flex.sdk.version>

<!-- Unit testing frameworks and dependencies -->
<flexunit.version>4.1.0-8</flexunit.version>
<hamcrest.version>1.1.3</hamcrest.version>
</properties>

<distributionManagement>
<repository>
<id>sonatype-staging</id>
<url>http://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<testResources>
<testResource>
<directory>build/support/app-domain-test-files</directory>
<filtering>true</filtering>
<includes>
<include>app-domain-support.swf</include>
</includes>
<targetPath>${project.build.directory}/build/support/app-domain-test-files</targetPath>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>${flexmojos.version}</version>
<extensions>true</extensions>
<configuration>
<keepAs3Metadatas>
<keepAs3Metadata>Inject</keepAs3Metadata>
<keepAs3Metadata>PostConstruct</keepAs3Metadata>
</keepAs3Metadatas>
<dumpConfigAttach>true</dumpConfigAttach>
<verboseStacktraces>true</verboseStacktraces>
<compilerWarnings>
<warn-no-constructor>false</warn-no-constructor>
</compilerWarnings>
<includeTestFiles>
<includeTestFile>org/swiftsuspenders/suites/SwiftSuspendersTestSuite.as</includeTestFile>
</includeTestFiles>
</configuration>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex.sdk.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

<dependencies>
<!-- Note: while this includes the entire flex framework for compilation, the default for SWCs is external linkage, so nothing from the Flex framework will be added to the final output. -->
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>${flex.sdk.version}</version>
<type>pom</type>
</dependency>

<!-- ======================== -->
<!-- TEST Dependencies. (Only compiled in the unit test runner) -->
<dependency>
<groupId>com.adobe.flexunit</groupId>
<artifactId>flexunit</artifactId>
<version>${flexunit.version}</version>
<type>swc</type>
<classifier>as3</classifier>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-as3</artifactId>
<version>${hamcrest.version}</version>
<type>swc</type>
<classifier>as3</classifier>
<scope>test</scope>
</dependency>
<!-- ======================== -->

</dependencies>
</project>
29 changes: 29 additions & 0 deletions settings.xml
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">

<profiles>
<profile>
<id>flexgroup-on-sonatype</id>
<repositories>
<repository>
<id>Sonatype Flex Group</id>
<url>http://repository.sonatype.org/content/groups/flexgroup/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>Sonatype Flex Group</id>
<url>http://repository.sonatype.org/content/groups/flexgroup/</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>

<!-- NOTE: this will deactivate any "activeByDefault" profiles in the project POM -->
<activeProfiles>
<activeProfile>flexgroup-on-sonatype</activeProfile>
</activeProfiles>
</settings>

0 comments on commit adbd3d9

Please sign in to comment.