Hi, In case it is useful to anyone...
I got what I needed by configuring the compiler files: pom.xml,
HelloWorld.as3proj and asconfig.json.
MAVEN: "examples/mxroyale/HelloWorld/pom.xml" (I set "source.map" to true and
included it in the "additionalCompilerOptions")
...
<name>Apache Royale: Examples: MXRoyale: HelloWorld</name>
<properties>
<source.map>true</source.map> /*********************/
<project.compiler.options>
-js-default-initializers=true;
-source-map=${source.map}; /*********************/
-js-dynamic-access-unknown-members=true;
</project.compiler.options>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.royale.compiler</groupId>
<artifactId>royale-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<mainClass>HelloWorld.mxml</mainClass>
<allowSubclassOverrides>true</allowSubclassOverrides>
<targets>${royale.targets}</targets>
<debug>false</debug>
<additionalCompilerOptions>${project.compiler.options};</additionalCompilerOptions>
/************/
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.royale.framework</groupId>
...
ANT: build.xml (include file="${basedir}/../../build_example.xml"): (In theory
adding/setting the parameter "debug = true" in the execution of the mxmlc
command is enough but the only thing I have achieved is that it creates the
HelloWorld.js.map, none from the SDK.)
I have not changed anything
...
<mxmlc fork="true"
debug="true"
configname="${config_arg}"
swf-version="${swf.version}"
closure-lib="${GOOG_HOME}"
file="${basedir}/src/main/royale/${example}.${file_suffix}"
output="${basedir}/bin-debug/${example}.swf">
<jvmarg line="${mxmlc.jvm.args}"/>
<arg line="${optional_arg}" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="${playerglobal_arg}" />
</mxmlc>
...
SWF: HelloWorld.as3proj (I added the option "sourceMap to true"):
...
<classpaths>
<class path="src/main/royale"/>
</classpaths>
<moonshineResourcePaths></moonshineResourcePaths>
<moonshineNativeExtensionPaths></moonshineNativeExtensionPaths>
<build>
...
<option es="False"/>
<option sourceMap="true"/> /****************/
</build>
...
AS3 Extension: asconfig.json (This file did not exist but I created it "to
test". You have to configure the "debug" and "source-map" options in
"compilerOptions") :
[with maven I get the js.map files of all the classes (project and sdk), with
asconfigc I only get the HelloWorld.js.map file]
{
"config": "royale",
"compilerOptions": {
"debug": true,
"targets": [
"JSRoyale"
],
"source-map": true,
"source-path": [
"src/main/royale"
],
"theme": "${royalelib}/themes/MXRoyale/src/mx.css",
"library-path": [
"${royalelib}/libs/SparkRoyale.swc",
"${royalelib}/libs/MXRoyaleBase.swc",
....
Hiedra
De: Maria Jose Esteve <[email protected]>
Enviado el: jueves, 10 de marzo de 2022 19:27
Para: [email protected]
Asunto: Ejemplo mxaplication no crea los ficheros .js.map
Hi,
I am testing the mxroyale examples of the sdk and although I can compile with
ant and with Maven the ".js.map" files are not generated and when executing I
have many errors.
Could someone give me some clue?
Thx.
Hiedra