You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2019/11/20 23:11:24 UTC

[royale-asjs.wiki] branch master updated: Update and simplify maven steps with all the latest improvements

This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/royale-asjs.wiki.git


View the commit online:
https://github.com/apache/royale-asjs.wiki/commit/1313eed9a1869fc474cead5c6cd6cb995e04ae25

The following commit(s) were added to refs/heads/master by this push:
     new 1313eed  Update and simplify maven steps with all the latest improvements
1313eed is described below

commit 1313eed9a1869fc474cead5c6cd6cb995e04ae25
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Thu Nov 21 00:11:20 2019 +0100

    Update and simplify maven steps with all the latest improvements
---
 Build-Apache-Royale-with-Maven.md | 88 +++++++++++++--------------------------
 1 file changed, 30 insertions(+), 58 deletions(-)

diff --git a/Build-Apache-Royale-with-Maven.md b/Build-Apache-Royale-with-Maven.md
index 67bdcf5..35fd8bf 100644
--- a/Build-Apache-Royale-with-Maven.md
+++ b/Build-Apache-Royale-with-Maven.md
@@ -1,20 +1,23 @@
-Apache Royale can be built with maven. Royale consists of three parts: The _compiler_, _typedefs_ and the _framework(asjs)_, each is hosted in a separate GIT repository and have to be built and released separately. The order hereby is:
+Apache Royale can be built with [Maven](https://maven.apache.org).
+
+Royale consists of three parts: The _compiler_, _typedefs_ and the _framework(asjs)_, each is hosted in a separate GIT repository and have to be built and released separately. The order hereby is:
 
 1. [Compiler](https://github.com/apache/royale-compiler)
 2. [Typedefs](https://github.com/apache/royale-typedefs)
 3. [Framework](https://github.com/apache/royale-asjs)
 
-In addition to building the framework libraries, the framework module also assembles the binary distribution of the Royale SDK.
-
-It also has a feature of **assembling a fully functional Royale distribution** in a directory of choice, by setting an additional environment variable: _distributionTargetFolder_. If you set this to the path of a directory, the build will create a distribution there. This can then be used directly in your IDE of choice.
+In addition to building the framework libraries, the framework module also assembles the binary distribution of the Royale SDK to use in your IDE of choice.
 
-## Steps
+## Requirements
 
-1. Install Java from: http://www.oracle.com/technetwork/java/javase/downloads/index.html
-2. Install Maven 3.3.1 or greater from: http://maven.apache.org/download.cgi (I'm using 3.5.0)
+1. Install Java from: http://www.oracle.com/technetwork/java/javase/downloads/index.html (minimum version 8)
+2. Install Maven from: http://maven.apache.org/download.cgi (minimum version 3.3.1)
     1. Download the archive
     2. Unpack the archive
-    3. Set your systems PATH to the bin directory (I usually define a MAVEN_HOME to the unpacked directory and then add $MAVEN_HOME/bin to the PATH)
+    3. Set your system PATH to the bin directory
+
+> if you don't have Maven installed, you can use **mvnw** (or [Maven Wrapper](https://github.com/takari/maven-wrapper)) available in each root repository folder, that allows you check if maven exists in your system and install latest version if nothing is found.
+
 3. Download the "Flash Player projector content debugger" for your system from: https://www.adobe.com/support/flashplayer/debug_downloads.html (The Browser plugin or ActiveX component will not work)
     1. Set an environment variable called FLASHPLAYER_DEBUGGER and set it to the path of the Flash Debug Player executable (On windows and Linux machined this is trivial as you simply provide the full path (including the executable name), on Mac's this will look something like this: {Place the Player is installed to}/Flash Player.app/Contents/MacOS/Flash Player Debugger)
 
@@ -33,7 +36,9 @@ It also has a feature of **assembling a fully functional Royale distribution** i
     FLASHPLAYER_DEBUGGER=/Applications/Adobe/Flash/22.0/Flash Player.app/Contents/MacOS/Flash Player Debugger
     ```
 
-4. Build Compiler (royale-compiler)
+## Build Steps
+
+1. First you need to build Compiler (royale-compiler)
 
     1. Clone:
     ```
@@ -48,20 +53,12 @@ It also has a feature of **assembling a fully functional Royale distribution** i
 
     3. Build the compiler:
     ```
-    mvn -s settings-template.xml clean install
-    ```
-
-    This will execute all unit-tests and integration-tests. You can however run the build without any tests:
-    ```
-    mvn -s settings-template.xml -DskipTests clean install
+    mvn clean install
     ```
 
-    And if you just want to run the unit-tests and skip the integration-tests:
-    ```
-    mvn -s settings-template.xml -DskipITs clean install
-    ```
+    > This will execute all unit-tests and integration-tests. You can however run the build without any tests adding `-DskipTests` or skip just the integration-tests with `-DskipITs`
 
-5. Build Typedefs (royale-typedefs)
+2. Next, build Typedefs (royale-typedefs)
 
     1. Clone:
     ```
@@ -76,10 +73,10 @@ It also has a feature of **assembling a fully functional Royale distribution** i
 
     3. Build the typedefs:
     ```
-    mvn -s settings-template.xml clean install
+    mvn clean install
     ```
 
-6. Build the Framework (royale-asjs)
+3. Finally, build the Framework (royale-asjs)
 
     1. Clone:
     ```
@@ -94,46 +91,21 @@ It also has a feature of **assembling a fully functional Royale distribution** i
 
     3. Build the framework libs:
     ```
-    mvn -s settings-template.xml clean install -Pgenerate-swcs-for-swf
-    ```
-
-   Now you have compiler, typedefs and framework ready. If you want to make some modification you can make the change and build only the part that was modified and you'll be ready to use it in your own project.
-
-### Following builds
-
-   Notice that after the first build, you can run a more simple instruction for compiler, typedefs and framework for subsequent builds. You just need to position on each repo and execute the following simple line:
-
     mvn clean install
+    ```
 
-   Optional: if something change in helper jars (compiler-build-tools and compiler-jburg-types), you'll need to build the compiler utilities. This happens rarely:
-
-    mvn -s settings-template.xml clean install -P utils
-
-Optionaly you can run without test for convenience (-DskipTests)
-
-### Build All SWCs
-
-To build all SWCs for Maven, you need to use the profiles that create the SWF SWCs. We changed the default to not require the Adobe artifacts. The command line is :
-
-    mvn clean install -P generate-swcs-for-swf,main
-
-Similarly, when building examples, to get the SWF output you have to specify
-
-    mvn clean install -P generate-swf
-
-### Build distribution (Royale SDK) with Maven
+Now you have compiler, typedefs and framework ready. That's all :).
 
-Note: distribution is not completely working and needs to be fixed. In the meanwhile you can use ANT to create a SDK from scratch from royale-asjs root folder using `mvn clean install -Pgenerate-swcs-for-swf`. Use `ant super-clean` to ensure the folder doesn't contain any stale files that could make the process fail.
+> If you want to make some modification you can make the change and build only the part that was modified and you'll be ready to use it in your own project. To do so just go to the sub project folder and run `mvn clean install`.
 
-   Optionally you can also build the distribution binaries:
+### Optional Maven Profiles
 
-   ```
-   mvn -s settings-template.xml -P build-distribution clean install
-   ```
+The following profiles can be added to the command line using `-P` maven option:
 
-   Optionally you can also build the distribution binaries and a local distribution (including dependencies for Flash, AIR) in a local directory:
-   ```
-   mvn -s settings-template.xml -DdistributionTargetFolder={pathToDistributionDirectory} -P build-distribution clean install
-   ```
+* **with-ui-testsuite**: It also builds the testsuite modules and runs the integration-tests
+> You can use [the latest geckodriver](https://github.com/mozilla/geckodriver/releases) to run the _Selenium UI tests in Firefox_ adding `-Dwebdriver.gecko.driver=/Users/christofer.dutz/Downloads/geckodriver`
+* **option-with-swf**: It also makes each module build the SWF version.
+* **with-examples**: It builds the all examples in `examples` folder too.
+* **with-distribution**: It lets the build also build the _distribution_ (the Apache Royale SDK to use with an IDE). To build in the folder of your choice use `-DdistributionTargetFolder={pathToDistributionDirectory}`.
 
->The reason for specifying the "-s settings-template.xml" is that we currently are using unreleased artifacts for the mavenizer. If we don't explicitly tell maven to also look in the Apache Snapshot Repo, it will not find these. This option will no longer be needed as soon as we have released the Mavenizer for a first time.
\ No newline at end of file
+> Note: distribution is not completely working yet and needs to be fixed. In the meanwhile you can use ANT to create a SDK from scratch from royale-asjs root folder. Use `ant super-clean` to ensure the folder doesn't contain any stale files that could make the process fail and the ant all`.