Hi Carlos,

"swf" and "swc" is more a placeholder for "application" or "library" ... it's 
more historically to name them that way.


The default of a "swf" module would produce a swf file. But by using the config 
option:

<outputJavaScript>true</outputJavaScript>

the output should be JavaScript instead.


In the examples I use the default to produce the swf and add a second 
"execution" to produce the JavaScript output (see the pom in 
flex-asjs/examples/flexjs/pom.xml). Additionally I use the maven-war-plugin to 
create a war file from the debug-output and add that to the build using the 
build-helper-maven-plugin (This way the war is automatically installed and 
deployed). The cool thing about this is that you can use this war as an overlay 
to bundle the client with a server application.


I guess I'll be writing some documentation, now that the site deployment seems 
to be setup.


When building pure JavaScript output you can probably omit the playerglobal. 
Just give it a try.


I just had a look at your pom ... you need a packaging of swf, additionally you 
need the outputJavaScript = true. You can omit the war and buildhelper plugin 
for now, the output will be in

target/javascript/bin/js-debug


Chris



________________________________
Von: carlos.rov...@gmail.com <carlos.rov...@gmail.com> im Auftrag von Carlos 
Rovira <carlosrov...@apache.org>
Gesendet: Dienstag, 27. September 2016 18:12:29
An: dev@flex.apache.org
Betreff: [FlexJS][Maven] Simple pom with js output

Hi Chris,

I'm trying to make a test flex's maven project. I check some projects in
"examples" folder and the poms has SWF packing (<packaging>swf</packaging>)
So first question is...to get JS output I should use other kind of
packaging?)

I could remove the dependency on player global?

Hope you could help me to configure it a get a successful build.

This is a my basic pom.xml (note: I suppose I can use Main.as as main class
or Main.mxml, I used .as since I'm testing VisualCode extension from
NextGenAS in parallel)

<project xmlns="http://maven.apache.org/POM/4.0.0";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.carlosrovira.flexjs.examples</groupId>
  <artifactId>TestFlexJS</artifactId>
  <version>0.1.0-SNAPSHOT</version>
  <packaging>???</packaging>

  <name>Apache Flex - FlexJS: Examples: FlexJS: TestFlexJS</name>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.flex.flexjs.compiler</groupId>
        <artifactId>flexjs-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <mainClass>Main.as</mainClass>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <!--<dependencies>
    <dependency>
      <groupId>com.adobe.flash.framework</groupId>
      <artifactId>playerglobal</artifactId>
      <version>23.0</version>
      <type>swc</type>
      <scope>provided</scope>
    </dependency>
  </dependencies>-->

</project>

Thanks in advance



--
Carlos Rovira
http://about.me/carlosrovira

Reply via email to