Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Version2 #42

Merged
merged 12 commits into from

3 participants

justin j. moses Shaun Smith Dominic Graefen
justin j. moses

Hey team,

So here's a working POM for RL2. There is some back and forth with Sonatype before we get it in Maven Central, but it's a start.

Notes:

  1. Lengthy install script:

Unfortunately, as it is a Flash project (rather than Java), most of the dependencies are not hosted, meaning there's an runonce install script for each user before they can build. Maven requires all dependencies be hosted somewhere. It's not like Ant where you can just say - use every SWC in this folder. The install script simply installs all the libs into the user's local repository.

  1. Regular updates to dependencies

As such, it means that the POM will have to be updated if any dependency is added or an existing one changes.

  1. Version numbers

As the project is in flux, it is suffixed as SNAPSHOT. I've removed the "v" prefix and added a dash (v2.0.0b1 = 2.0.0-b1) to conform with Maven versioning.

  1. Releases

As builds are released, the SNAPSHOT should come off and deployments pushed to Maven Central.

  1. Developers and roles

Please feel free to add info to the developer/contributor section as you see fit.


Going forward I'm happy to keep the POM up to date, and perform releases. If you'd like me to be in charge of this, please let me know. If that's the case, it would be great if I could be notified me changes occur to any of the libs or to the Ant build, and indeed whenever a release is due to go out.

-- Justin

Shaun Smith
Owner

Awesome, thanks so much Justin!

Shaun Smith darscan merged commit 648eb9f into from
Dominic Graefen

Hi Justin,

thanks!

Me and Shaun just started working on this yesterday. We are using buildr instead of maven.
Buildr can also release to maven repositories(http://devboy.org:8081/nexus/content/repositories/artifacts/org/robotlegs/robotlegs-framework/2.0.0b1/),
so you will be able to require the artifact for your maven projects.

I am just setting up a fresh install of nexus on my server, but would like to know more about what steps we need to take to get RL2 onto maven-central!
With buildr we can work around the dependency issues and just bundle them inside the swc instead of hosting all RL2 dependencies in a maven repo.

justin j. moses

The previous Maven developer opened this JIRA ticket: https://issues.sonatype.org/browse/OSSRH-288

it's what you need to get started. i believe all we need to do is create a jira account for sonatype, ensure everything is still cool, then we can deploy. There is a process to deployment, but it's not that tricky. Is this something you want to manage? If not I'm happy to.

i've not used buildr, but i think you might be confusing the issue when talking about bundling the swc deps.

In order to build Robotlegs from source - which is what the POM is for - you need to supply dependencies, and Maven needs to find them somehow. The options are:

  • Host the dependencies on Maven Central, meaning each dep needs their own build script and open source location. Flexunit is getting there and I'm helping Till getting this up with SS but there are still others.

  • Host the dependencies on an external nexus that the Robotlegs team control. This is obviously not optimal because of the cost and effort maintaining a remote repository.

  • Do not host the dependencies at all, and ensure that developers know to install the deps locally before trying to build from source.

Incidentally, Flexmojos has this problem as well. While Flexmojos is hosted on Maven Central, none of the Flex artifacts are (ie. the compiler and SDKs). Marvin (FM creator) uploads the Flash deps to a branch on Sonatype every time a new SDK is released - hence why we need the settings.xml to reference the "flexgroup" on Sonatype.

Hopefully one day soon Adobe will host their own Nexus repo and this situation will be resolved. =)

Dominic Graefen

Looks like we just need to get approval for a deploy account by Sonatype, right?

I know the problems/options with maven, worked for too long with maven and flex-mojos.

We can use buildr to build from source and it's possible to resolve dependencies from maven and the filesystem,
that way we can use it right now without any extra work, and it will still be fine when (one day) all dependencies are hosted publicly somewhere.

I don't see any extra value we would gain from using maven right now.

Dominic Graefen

That last sentence was a bit harsh, I just dislike Maven with a passion :)
I am really thankful you are working on the maven bits and there's no reason they can't live next to each other.

Btw: heres the current buildfile for RL2 -> https://github.com/robotlegs/robotlegs-framework/blob/version2/buildfile

justin j. moses

Approval by Sonatype, yes. Whoever deploys should put their credentials into their local settings.xml and then run mvn deploy when a release is ready (removing the SNAPSHOT obv).

i understand your dislike of Maven. i just offered to the team because I was recently working with them and thought they could use the help getting Maven Central deployment. As you know, quite a lot of enterprise devs use Maven and it would be handy to have frameworks hosted on Maven Central. I'm not trying to step on anybody's toes =) If you're happy to manage the POM as part of the build process, then great! Just let me know if i can help.

Honestly, i've only just now taken a look at buildr-as3. At first glance it looks promising. I'm not much of a Ruby guy, but am always interested in different ways to simplify the situation.

Dominic Graefen

You're not stepping on my feet, no worries.

If there is a demand to deploy robotlegs to maven, we should make that happen!
We can do that with maven or buildr.

We probably need to find a driving system that is used by the team, and update the others accordingly.
Also we cannot get rid of ANT as it is the most common build-system in the flash world.

Which means we need to support 3 build-systems, which is not an ideal situation.

Dominic Graefen

Yesterday night I commited some updates to the buildr buildfile which will allow it to publish to my maven repo at artifacts.devboy.org (might look empty, but artifacts can be fetched from there. check also: nexus.devboy.org ).
I have two repositories available there, one for snapshot builds at snapshot.artifacts.devboy.org,
and one for release builds at release.artifacts.devboy.org.

Right now you can release to snapshot by calling:

buildr upload ruser=username rpass=password

Just ask me for the password.

Heres one build from yesterday: http://46.163.116.97:8081/nexus/content/repositories/snaphot.artifacts/org/robotlegs/robotlegs-framework/2.0.0b1-SNAPSHOT/

Dominic Graefen

Jason, can you point me to the mvn-repo where flexunit is hosted?

justin j. moses

Jason? You mean Justin?

The only real location for Flexunit at the moment is sonatype, on the Flexgroup branch that Marvin added. The latest version on there is 4.0-RC1. https://repository.sonatype.org/index.html#nexus-search;quick~flexunit

I'm in talks with Mike and Sim to help them out with a POM on Flexunit, and hopefully get it up onto Maven Central before too long...

Dominic Graefen

That would be awesome, if you want to host at my repo (if maven central is not possible for some reason) I will gladly give you a deploy key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
3  .gitignore
View
@@ -8,6 +8,7 @@
/obj/*
/report/*
/dist/*
+/target
.actionScriptProperties
.flexProperties
@@ -27,3 +28,5 @@ src/FlexUnitApplication.mxml
*.iml
*.ipr
*.iws
+
+target/test-classes/TestRunner.mxml
41 Maven-README.md
View
@@ -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 robotlegs 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 Robotlegs from source, run the following command in the Robotlegs 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 robotlegs 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/].
5 maven-runonce.bat
View
@@ -0,0 +1,5 @@
+mvn -s settings.xml install:install-file -Dfile=lib/SwiftSuspenders-v2.0.0b1.swc -DartifactId=swiftsuspenders -DgroupId=org.swiftsuspenders -Dversion=2.0.0-b1 -Dpackaging=swc
+mvn -s settings.xml install:install-file -Dfile=lib/as3commons-logging-2.7.swc -DartifactId=as3commons-logging -DgroupId=org.as3commons -Dversion=2.7 -Dpackaging=swc
+mvn -s settings.xml install:install-file -Dfile=lib/flexunit-4.1.0-8-flex_4.1.0.16076.swc -DgroupId=com.adobe.flexunit -DartifactId=flexunit -Dversion=4.1.0-8 -Dpackaging=swc -Dclassifier=flex
+mvn -s settings.xml install:install-file -Dfile=lib/hamcrest-as3-flex-1.1.3.swc -DgroupId=org.hamcrest -DartifactId=hamcrest-as3 -Dversion=1.1.3 -Dpackaging=swc -Dclassifier=flex
+mvn -s settings.xml install:install-file -Dfile=lib/mockolate-0.12.1-flex.swc -Dversion=0.12.1 -Dclassifier=flex -Dpackaging=swc -DgroupId=mockolate -DartifactId=mockolate
6 maven-runonce.sh
View
@@ -0,0 +1,6 @@
+#!/bin/bash
+mvn -s settings.xml install:install-file -Dfile=lib/SwiftSuspenders-v2.0.0b1.swc -DartifactId=swiftsuspenders -DgroupId=org.swiftsuspenders -Dversion=2.0.0-b1 -Dpackaging=swc
+mvn -s settings.xml install:install-file -Dfile=lib/as3commons-logging-2.7.swc -DartifactId=as3commons-logging -DgroupId=org.as3commons -Dversion=2.7 -Dpackaging=swc
+mvn -s settings.xml install:install-file -Dfile=lib/flexunit-4.1.0-8-flex_4.1.0.16076.swc -DgroupId=com.adobe.flexunit -DartifactId=flexunit -Dversion=4.1.0-8 -Dpackaging=swc -Dclassifier=flex
+mvn -s settings.xml install:install-file -Dfile=lib/hamcrest-as3-flex-1.1.3.swc -DgroupId=org.hamcrest -DartifactId=hamcrest-as3 -Dversion=1.1.3 -Dpackaging=swc -Dclassifier=flex
+mvn -s settings.xml install:install-file -Dfile=lib/mockolate-0.12.1-flex.swc -Dversion=0.12.1 -Dclassifier=flex -Dpackaging=swc -DgroupId=mockolate -DartifactId=mockolate
214 pom.xml
View
@@ -0,0 +1,214 @@
+<?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">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.robotlegs</groupId>
+ <artifactId>robotlegs-framework</artifactId>
+
+ <version>2.0.0-b1-SNAPSHOT</version>
+
+ <packaging>swc</packaging>
+
+ <name>Robotlegs Framework</name>
+ <description>
+ Robotlegs is a pure AS3 micro-architecture (framework) with a light footprint and limited scope. Simply put, Robotlegs is there to help you wire your objects together. It provides the glue that your application needs to easily function in a decoupled way. Through the use of automated metadata based dependency injection Robotlegs removes boilerplate code in an application. By promoting loose coupling and avoiding the use of Singletons and statics in the framework Robotlegs can help you write code that is highly testable.
+ </description>
+ <url>http://www.robotlegs.org</url>
+ <licenses>
+ <license>
+ <name>Robotlegs Custom License</name>
+ <url>http://github.com/robotlegs/robotlegs-framework/blob/master/LICENSE</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <developers>
+ <developer>
+ <id>darscan</id>
+ <name>Shaun Smith</name>
+ <email></email>
+ <roles>
+ <role>Founder</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>joelhooks</id>
+ <name>Joel Hooks</name>
+ <email>joelhooks@gmail.com</email>
+ <url>http://joelhooks.com/</url>
+ </developer>
+ <developer>
+ <id>stray</id>
+ <name>Stray</name>
+ <url>http://www.xxcoder.net/</url>
+ </developer>
+ </developers>
+ <contributors>
+ <contributor>
+ <name>Craig Wickesser</name>
+ <email>codecraig@gmail.com</email>
+ <url>http://digitalchickenscratch.com/</url>
+ <roles>
+ <role>Maven contributor</role>
+ </roles>
+ </contributor>
+ <contributor>
+ <name>Justin J. Moses</name>
+ <url>http://about.me/justinj</url>
+ <roles>
+ <role>Maven contributor</role>
+ </roles>
+ </contributor>
+ </contributors>
+
+ <scm>
+ <url>http://github.com/robotlegs/robotlegs-framework/tree/version2</url>
+ <connection>git://github.com/robotlegs/robotlegs-framework.git</connection>
+ </scm>
+
+ <properties>
+ <maven.version>3.0.3</maven.version>
+
+ <flexmojos.version>4.0-RC2</flexmojos.version>
+
+ <!-- The Flex SDK to compile against -->
+ <flex.sdk.version>4.5.1.21328</flex.sdk.version>
+ <swiftsuspenders.version>2.0.0-b1</swiftsuspenders.version>
+ <as3commons.version>2.7</as3commons.version>
+ <robotlegs1.version>1.5.2</robotlegs1.version>
+
+ <!-- Unit testing frameworks and dependencies -->
+ <flexunit.version>4.1.0-8</flexunit.version>
+ <hamcrest.version>1.1.3</hamcrest.version>
+ <mockolate.version>0.12.1</mockolate.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>
+ <resources>
+ <resource><directory>src</directory></resource>
+ </resources>
+
+ <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>
+ <includeFiles>
+ <include>metadata.xml</include>
+ <include>manifest.xml</include>
+ <include>design.xml</include>
+ </includeFiles>
+ <dumpConfigAttach>true</dumpConfigAttach>
+ <verboseStacktraces>true</verboseStacktraces>
+ <compilerWarnings>
+ <warn-no-constructor>false</warn-no-constructor>
+ </compilerWarnings>
+ <includeTestFiles>
+ <includeTestFile>suites/EntireTestSuite.as</includeTestFile>
+ </includeTestFiles>
+ <includeSources>
+ <includeSource>${project.build.sourceDirectory}</includeSource>
+ </includeSources>
+ </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>
+
+ <!--- Swift Suspenders. The used definitions will be merged in. -->
+ <dependency>
+ <groupId>org.swiftsuspenders</groupId>
+ <artifactId>swiftsuspenders</artifactId>
+ <version>${swiftsuspenders.version}</version>
+ <type>swc</type>
+ <scope>merged</scope>
+ </dependency>
+
+ <!-- AS3 Commons Logging. The used definitions will be merged in. -->
+ <dependency>
+ <groupId>org.as3commons</groupId>
+ <artifactId>as3commons-logging</artifactId>
+ <type>swc</type>
+ <version>${as3commons.version}</version>
+ <scope>merged</scope>
+ </dependency>
+
+ <!-- Robotlegs 1 dependency. The used definitions will be merged in. -->
+ <dependency>
+ <groupId>org.robotlegs</groupId>
+ <artifactId>robotlegs-framework</artifactId>
+ <version>${robotlegs1.version}</version>
+ <type>swc</type>
+ <scope>merged</scope>
+ </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>flex</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-as3</artifactId>
+ <version>${hamcrest.version}</version>
+ <type>swc</type>
+ <classifier>flex</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>mockolate</groupId>
+ <artifactId>mockolate</artifactId>
+ <version>${mockolate.version}</version>
+ <type>swc</type>
+ <classifier>flex</classifier>
+ <scope>test</scope>
+ </dependency>
+ <!-- ======================== -->
+
+ </dependencies>
+</project>
29 settings.xml
View
@@ -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>
Something went wrong with that request. Please try again.