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 2018/08/30 09:29:59 UTC

[royale-asjs] branch develop updated: this fixes apache/royale-compiler/#45, copying example project assets to js-release

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 6aec0d0  this fixes apache/royale-compiler/#45, copying example project assets to js-release
6aec0d0 is described below

commit 6aec0d07d3125acac5bb2e3836d366687e153f3a
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Thu Aug 30 11:29:54 2018 +0200

    this fixes apache/royale-compiler/#45, copying example project assets to js-release
---
 examples/pom.xml | 47 ++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 38 insertions(+), 9 deletions(-)

diff --git a/examples/pom.xml b/examples/pom.xml
index 6a2ba04..9a80674 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -35,6 +35,9 @@
 
   <properties>
     <compiler.output-dir>${basedir}/target/javascript/bin/js-debug</compiler.output-dir>
+    <compiler.output-dir-debug>${basedir}/target/javascript/bin/js-debug</compiler.output-dir-debug>
+    <!-- In Release mode we only want to copy assets folder content to assets destination folder, the rest is managed by compiler -->
+    <compiler.output-dir-release>${basedir}/target/javascript/bin/js-release</compiler.output-dir-release>
     <royale.framework.version>0.9.3-SNAPSHOT</royale.framework.version>
   </properties>
 
@@ -51,12 +54,6 @@
 
   <build>
     <sourceDirectory>src/main/royale</sourceDirectory>
-    <resources>
-      <resource>
-        <directory>src/main/resources</directory>
-        <filtering>true</filtering>
-      </resource>
-    </resources>
     <pluginManagement>
       <plugins>
         <!-- Copy the resources to the compiler output directory -->
@@ -64,9 +61,41 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-resources-plugin</artifactId>
           <version>3.0.1</version>
-          <configuration>
-            <outputDirectory>${compiler.output-dir}</outputDirectory>
-          </configuration>
+          <executions>
+            <execution>
+              <id>copy-resources-debug</id>
+              <phase>validate</phase>
+              <goals>
+                <goal>copy-resources</goal>
+              </goals>
+              <configuration>
+                <outputDirectory>${compiler.output-dir-debug}</outputDirectory>
+                <resources>
+                  <resource>
+                    <directory>src/main/resources</directory>
+                    <filtering>true</filtering>
+                  </resource>
+                </resources>
+              </configuration>
+            </execution>
+            <execution>
+              <id>copy-resources-release</id>
+              <phase>validate</phase>
+              <goals>
+                <goal>copy-resources</goal>
+              </goals>
+              <configuration>
+                <!-- Copy the assets to the assets output directory -->
+                <outputDirectory>${compiler.output-dir-release}/assets</outputDirectory>
+                <resources>
+                  <resource>
+                    <directory>src/main/resources/assets</directory>
+                    <filtering>true</filtering>
+                  </resource>
+                </resources>
+              </configuration>
+            </execution>
+          </executions>
         </plugin>
         <plugin>
           <groupId>org.apache.royale.compiler</groupId>