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:49:11 UTC
[royale-asjs] branch develop updated: ModuleExample: make maven
copy files from module to app so target is prepared to be loaded directly
in a browser and app can load the module
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 7af767e ModuleExample: make maven copy files from module to app so target is prepared to be loaded directly in a browser and app can load the module
7af767e is described below
commit 7af767ee88ac1991d9a536dbe2d0e8f3952d224f
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Wed Jun 19 20:49:04 2019 +0200
ModuleExample: make maven copy files from module to app so target is prepared to be loaded directly in a browser and app can load the module
---
examples/royale/ModuleExample/Module/pom.xml | 70 ++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
diff --git a/examples/royale/ModuleExample/Module/pom.xml b/examples/royale/ModuleExample/Module/pom.xml
index 62519e4..197a664 100644
--- a/examples/royale/ModuleExample/Module/pom.xml
+++ b/examples/royale/ModuleExample/Module/pom.xml
@@ -44,6 +44,76 @@
<additionalCompilerOptions>-js-compiler-option=--variable_map_input_file ../../../../../MainApp/target/javascript/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/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}/../MainApp/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}/../MainApp/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>debug-move-files</id>
+ <phase>install</phase>
+ <goals>
+ <goal>rename</goal>
+ </goals>
+ <configuration>
+ <fileSets>
+ <fileSet>
+ <sourceFile>${project.basedir}/../MainApp/target/javascript/bin/js-debug/${project.artifactId}__deps.js</sourceFile>
+ <destinationFile>${project.basedir}/../MainApp/target/javascript/bin/js-debug/modules/${project.artifactId}__deps.js</destinationFile>
+ </fileSet>
+ <fileSet>
+ <sourceFile>${project.basedir}/../MainApp/target/javascript/bin/js-debug/${project.artifactId}.css</sourceFile>
+ <destinationFile>${project.basedir}/../MainApp/target/javascript/bin/js-debug/modules/${project.artifactId}.css</destinationFile>
+ </fileSet>
+ </fileSets>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>