Hi Davide,

The Maven build doesn’t work the same way the Ant build works. While Ant sort 
of compiles and copies stuff all over the place the maven build is able to 
produce a so called “distribution”. In order to build a distribution, you need 
to compile the “asjs” project with maven and enable the distribution profile:

mvn -s settings-template.xml 
-DdistributionTargetFolder={pathToDistributionDirectory} -P build-distribution 
clean install

Just replace “{pathToDistributionDirectory}” with the path to a directory you 
want the build to produce the distribution to (I would strongly suggest to 
output it to an empty directory.

See more details here [1]

Chris

[1]: https://cwiki.apache.org/confluence/display/FLEX/Building+FlexJS+with+Maven


Am 13.04.17, 14:58 schrieb "[email protected]" <[email protected]>:

    Ok, I have compiled all with Maven (as I wrote in the "[FlexJs]: Error: 
Unable to access jarfile flex-asjs/js/bin/../lib/mxmlc.jar" thread).
    
    But now I don't have bin directory in path, I don't have settings, ...
    
    For example:
    $ cd /home/flex/FlexJS_maven/flex-asjs/js/bin
    $ ./asjsc
    Using Falcon codebase: ./../..
    Using Flex SDK: ./../..
    Error: Unable to access jarfile ./../lib/mxmlc.jar
    
    This jar don't exists in all maven build tree.
    
    So I have:
    $ mkdir ../lib
    
    copied the .jar file build with ant here
    
    but now I have
    $ LANG=en_EN ./asjsc
    Using Falcon codebase: ./../..
    Using Flex SDK: ./../..
    Error: Could not find or load main class flex2.tools.Mxmlc
    
    So I have copied all the "lib" directory that I have build with ant
    
    $ LANG=en_EN ./asjsc
    Using Falcon codebase: ./../..
    Using Flex SDK: ./../..
    Apache Flex Compiler (mxmlc)
    Version 4.16.0 build 20170410
    Copyright 2017 The Apache Software Foundation.
    
    command line: Error: unknown configuration variable 'js-output-type'
    
    Use 'mxmlc -help' for information about using the command line.
    
    
    
    This error is the same I get with the ant build.
    
    I have two question:
    1) How can I build the flex-asjs/js/lib directory?
    2) why I get the error "unknown configuration variable 'js-output-type'". I 
have see the .sh file asjsc and I have see that:
    java $VMARGS $D32 $SETUP_SH_VMARGS -Dflexcompiler="$FALCON_HOME" 
-Dflexlib="$FLEX_HOME/frameworks" -jar "$SCRIPT_HOME/../lib/mxmlc.jar" 
+flexlib="$FLEX_HOME/frameworks" -js-output-type=jsc +configname=js "$@"
    
    I have removed the "-js-output-type=jsc", and I get:
    
    $ LANG=en_EN ./asjsc
    Using Falcon codebase: ./../..
    Using Flex SDK: ./../..
    Loading configuration file 
/home/flex/FlexJS/FlexJS_maven/flex-asjs/frameworks/js-config.xml
    Apache Flex Compiler (mxmlc)
    Version 4.16.0 build 20170410
    Copyright 2017 The Apache Software Foundation.
    
    /home/flex/FlexJS/FlexJS_maven/flex-asjs/frameworks/js-config.xml(78): 
Error: unknown configuration variable 'compiler.mxml.children-as-data'
    
              <children-as-data>true</children-as-data>
    
    Thanks
    Davide
    

Reply via email to