Create Royale project with Maven - apache/royale-asjs GitHub Wiki

With Maven you can create a Royale Project using Maven Archetypes. The following step-by-step guide is for Mac users, but Windows users can follow similar steps.

Create a Royale project

  1. Open the Terminal Window and go to the folder where you want to create your new Royale Project (i.e: cd ~/Desktop, to create the project directly in Desktop).
  2. Follow this example command to create your project:
mvn archetype:generate -DarchetypeGroupId=org.apache.royale.framework -DarchetypeArtifactId=royale-simple-application-archetype -DarchetypeVersion=0.9.8-SNAPSHOT
  1. Maven will start to create the new project from scratch and will ask you these questions (I have included sample responses):
Define value for property 'groupId': : org.apache.royale.examples
Define value for property 'artifactId': : ASimpleRoyaleTestApp
Define value for property 'version':  1.0-SNAPSHOT: : 
Define value for property 'package':  org.apache.royale.examples: : 
Confirm properties configuration:
groupId: org.apache.royale.examples
artifactId: ASimpleFlexJSTestApp
version: 1.0-SNAPSHOT
package: org.apache.royale.examples
Y: : Y

Review the created application

You should now have a project folder called ASimpleRoyaleTestApp (or whatever name you gave it) in the folder you have located in step 1. Inside the project you will have a basic application, located in the /src/main/flex folder, with the following code created.

<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                xmlns:js="library://ns.apache.org/royale/basic" >
  <js:valuesImpl>
     <js:SimpleCSSValuesImpl />
  </js:valuesImpl>
  <js:initialView>
     <js:View>
       <js:Label text="Hello World!" />
    </js:View>
  </js:initialView>
</js:Application>

Build the Royale project

To build the created project, go to the root folder where Maven pom.xml file is located and enter:

mvn clean install

Note: you can add "-P option-with-swf" to build SWF and "-DskipTests" to avoid tests

⚠️ **GitHub.com Fallback** ⚠️