-
Notifications
You must be signed in to change notification settings - Fork 117
Create Royale project with Maven
Carlos Rovira edited this page Jul 8, 2020
·
3 revisions
With Maven you can create a Royale Project using Maven Archetypes. The following steps-by-step guide are for Mac users, but similar steps can be followed by Windows users.
- Open 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).
- The following instruction is an example to create a project:
mvn archetype:generate -DarchetypeGroupId=org.apache.royale.framework -DarchetypeArtifactId=royale-simple-application-archetype -DarchetypeVersion=0.9.8-SNAPSHOT
- Maven will start to create the new project from scratch and will ask you some questions (the following are the questions and an example of possible 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
In this example, you should get a project folder called ASimpleRoyaleTestApp in the folder you have located in 1. Inside the project you will have a basic Application, located in /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>
In order to build created project, go to the root folder where Maven pom.xml file is located and type:
mvn -s /Users/<YourUser>/<Path-To-You-Royale-Repo>/settings-template.xml clean install
Apache®, Apache Royale, Royale™, and the Royale logo are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries.