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/06/19 18:04:39 UTC

[royale-asjs] branch develop updated: BE0013: fix js-release and js-debug module copy correctly to Application target folder so it can be loaded in both cases

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

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


The following commit(s) were added to refs/heads/develop by this push:
     new 42a8048  BE0013: fix js-release and js-debug module copy correctly to Application target folder so it can be loaded in both cases
42a8048 is described below

commit 42a80481f6a8a2d150086dd1e32f58fcde4e4735
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Wed Jun 19 20:04:32 2019 +0200

    BE0013: fix js-release and js-debug module copy correctly to Application target folder so it can be loaded in both cases
---
 ..._Apache_Royale_application_with_modules.as3proj |  2 +-
 .../JewelModule/pom.xml                            | 58 +++++++++++++++++++---
 2 files changed, 52 insertions(+), 8 deletions(-)

diff --git a/examples/blog/BE0013_Dividing_an_Apache_Royale_application_with_modules/BE0013_Dividing_an_Apache_Royale_application_with_modules.as3proj b/examples/blog/BE0013_Dividing_an_Apache_Royale_application_with_modules/BE0013_Dividing_an_Apache_Royale_application_with_modules.as3proj
index 25442c7..8b9b12f 100644
--- a/examples/blog/BE0013_Dividing_an_Apache_Royale_application_with_modules/BE0013_Dividing_an_Apache_Royale_application_with_modules.as3proj
+++ b/examples/blog/BE0013_Dividing_an_Apache_Royale_application_with_modules/BE0013_Dividing_an_Apache_Royale_application_with_modules.as3proj
@@ -78,7 +78,7 @@
     <option testMovie=""/>
     <option showHiddenPaths="False"/>
     <option testMovieCommand=""/>
-    <option defaultBuildTargets=""/>
+    <option defaultBuild=""/>
     <option isPrimeFacesVisualEditor="False"/>
   </options>
   <moonshineRunCustomization>
diff --git a/examples/blog/BE0013_Dividing_an_Apache_Royale_application_with_modules/JewelModule/pom.xml b/examples/blog/BE0013_Dividing_an_Apache_Royale_application_with_modules/JewelModule/pom.xml
index 17918b7..9f39ebb 100644
--- a/examples/blog/BE0013_Dividing_an_Apache_Royale_application_with_modules/JewelModule/pom.xml
+++ b/examples/blog/BE0013_Dividing_an_Apache_Royale_application_with_modules/JewelModule/pom.xml
@@ -42,17 +42,59 @@
           <mainClass>JewelModule.mxml</mainClass>
           <targets>JSRoyale</targets>
           <debug>false</debug>
-          <additionalCompilerOptions>-js-compiler-option=--variable_map_input_file ../../../../../MainJewelApp/target/javascript/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainJewelApp/target/javascript/bin/js-release/gccprops.txt</additionalCompilerOptions>
+          <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainJewelApp/target/javascript/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainJewelApp/target/javascript/bin/js-release/gccprops.txt</additionalCompilerOptions>
         </configuration>
       </plugin>
-      
+
+      <!-- copy module files from Module target folder to Application target folder-->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>3.1.0</version>
+        <executions>
+          <!-- for js-release (copy all to 'modules' folder)-->
+          <execution>
+            <id>copy-resources-release</id>
+            <phase>install</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <resources>
+                <resource>
+                  <directory>${project.basedir}/target/javascript/bin/js-release/</directory>
+                </resource>
+              </resources>
+              <outputDirectory>${project.basedir}/../MainJewelApp/target/javascript/bin/js-release/modules/</outputDirectory>
+            </configuration>
+          </execution>
+          <!-- for js-debug (copy all to js-debug but will need a next step later (check **))-->
+          <execution>
+            <id>copy-resources-debug</id>
+            <phase>install</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <resources>
+                <resource>
+                  <directory>${project.basedir}/target/javascript/bin/js-debug/</directory>
+                </resource>
+              </resources>
+              <outputDirectory>${project.basedir}/../MainJewelApp/target/javascript/bin/js-debug/</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- (**) for js-debug: we need to move two files from 'target/js-debug' to 'target/js-debug/modules' since Application expect to find it there -->
       <plugin>
         <groupId>com.coderplus.maven.plugins</groupId>
         <artifactId>copy-rename-maven-plugin</artifactId>
         <version>1.0</version>
         <executions>
           <execution>
-            <id>rename-file</id>
+            <id>debug-move-files</id>
             <phase>install</phase>
             <goals>
               <goal>rename</goal>
@@ -60,12 +102,12 @@
             <configuration>
               <fileSets>
                 <fileSet>
-                  <sourceFile>${project.basedir}/target/javascript/bin/js-release/${project.artifactId}.js</sourceFile>
-                  <destinationFile>${project.basedir}/../MainJewelApp/target/javascript/bin/js-release/modules/${project.artifactId}.js</destinationFile>
+                  <sourceFile>${project.basedir}/../MainJewelApp/target/javascript/bin/js-debug/${project.artifactId}__deps.js</sourceFile>
+                  <destinationFile>${project.basedir}/../MainJewelApp/target/javascript/bin/js-debug/modules/${project.artifactId}__deps.js</destinationFile>
                 </fileSet>
                 <fileSet>
-                  <sourceFile>${project.basedir}/target/javascript/bin/js-release/${project.artifactId}.min.css</sourceFile>
-                  <destinationFile>${project.basedir}/../MainJewelApp/target/javascript/bin/js-release/modules/${project.artifactId}.min.css</destinationFile>
+                  <sourceFile>${project.basedir}/../MainJewelApp/target/javascript/bin/js-debug/${project.artifactId}.css</sourceFile>
+                  <destinationFile>${project.basedir}/../MainJewelApp/target/javascript/bin/js-debug/modules/${project.artifactId}.css</destinationFile>
                 </fileSet>
               </fileSets>
             </configuration>
@@ -77,3 +119,5 @@
   </build>
   
 </project>
+
+