Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] Failed to execute goal org.apache.royale.compiler:royale-maven-plugin:0.9.8-SNAPSHOT:compile-extern (default-compile-extern) #16

Open
mzamoun-veolia opened this issue Jan 13, 2021 · 13 comments

Comments

@mzamoun-veolia
Copy link

[INFO] --- royale-maven-plugin:0.9.8-SNAPSHOT:compile-extern (default-compile-extern) @ royale-typedefs-js ---
[INFO] Executing COMPC in tool group Royale with args: [-load-config=C:\tools\royale\royale-typedefs\js\target\compile-extern-config.xml, -compiler.targets=SWF]
args:
-load-config=C:\tools\royale\royale-typedefs\js\target\compile-extern-config.xml
-compiler.targets=SWF
target:SWF
COMPC
Chargement de la configuration▒: C:\tools\royale\royale-typedefs\js\target\compile-extern-config.xml

C:\tools\royale\royale-typedefs\js\target\generated-sources\externc\functions\Symbol.as(8): col: 57 Erreur▒: Le type est introuvable ou n▒est pas une constante de compilation▒: symbol

public function Symbol(opt_description:String = ''):symbol {  return null; }
                                                    ^

C:\tools\royale\royale-typedefs\js\target\generated-sources\externc\interfaces\AsyncGenerator.as(15): col: 5 Erreur▒: Impossible de remplacer une m▒thode interface. next et une m▒thode dans l▒interface de base AsyncIterator sont contradictoires.

function next(opt_value:Object /* ? */ = null):Promise
^

C:\tools\royale\royale-typedefs\js\target\generated-sources\externc\interfaces\Generator.as(15): col: 5 Erreur▒: Impossible de remplacer une m▒thode interface. next et une m▒thode dans l▒interface de base Iterator sont contradictoires.

function next(opt_value:Object /* ? */ = null):IIterableResult
^

C:\tools\royale\royale-typedefs\js\target\generated-sources\externc\functions\Symbol.as(8): col: 57 Le type est introuvable ou n▒est pas une constante de compilation▒: symbol

public function Symbol(opt_description:String = ''):symbol {  return null; }
                                                    ^

C:\tools\royale\royale-typedefs\js\target\generated-sources\externc\interfaces\AsyncGenerator.as(15): col: 5 Impossible de remplacer une m▒thode interface. next et une m▒thode dans l▒interface de base AsyncIterator sont contradictoires.

function next(opt_value:Object /* ? */ = null):Promise
^

C:\tools\royale\royale-typedefs\js\target\generated-sources\externc\interfaces\Generator.as(15): col: 5 Impossible de remplacer une m▒thode interface. next et une m▒thode dans l▒interface de base Iterator sont contradictoires.

function next(opt_value:Object /* ? */ = null):IIterableResult
^

7.719535306 seconds
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.301 s
[INFO] Finished at: 2021-01-13T14:16:58+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.royale.compiler:royale-maven-plugin:0.9.8-SNAPSHOT:compile-extern (default-compile-extern) on project royale-typedefs-js: There were errors during the build. Got return code 3 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@mzamoun-veolia
Copy link
Author

I have the same error !

@carlosrovira
Copy link
Contributor

Hi, can you provide info about the system you're running? (O.S., version, env vars, ...) and how are you building (I see you use maven)? Are you using some predefined steps, for example [1]? or some script to build all repos with maven like this [2]?
thanks
[1] https://github.com/apache/royale-asjs/wiki/Build-Apache-Royale-with-Maven
[2] https://gist.github.com/carlosrovira/200753108de263fa43e80d3228213509

@mzamoun-veolia
Copy link
Author

 mvn -version
Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\tools\apache-maven-3.6.3
Java version: 15.0.1, vendor: Oracle Corporation, runtime: C:\tools\Java\jdk-15.0.1
Default locale: fr_FR, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

@carlosrovira
Copy link
Contributor

I think Jdk 15 is still not supported. Latest I tried was 10 (maybe others could work as well)
You should try to add another JDK (8 or 10 for example) and set your java home for royale to use that instead of the one in your system and ensure is the one used. In Mac I use jenv to set different JDKs for different things or different folders, windows should has something similar for sure

@mzamoun-veolia
Copy link
Author

same error with jdk 8:
mvn -version
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\tools\apache-maven-3.6.3
Java version: 1.8.0_261, vendor: Oracle Corporation, runtime: C:\tools\Java\jdk1.8.0_261\jre
Default locale: fr_FR, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

@mzamoun-veolia
Copy link
Author

Just Remarque:
in js/target/downloads/es3.js , there is something like :
/**

  • @param {string=} opt_description
  • @return {symbol}
    */
    function Symbol(opt_description) {}

Did you think it is one of the original problem ?

@mzamoun-veolia
Copy link
Author

remind that one of the error is :
\royale-typedefs\js\target\generated-sources\externc\functions\Symbol.as(8): col: 57 Erreur▒: Le type est introuvable ou n▒est pas une constante de compilation▒: symbol

public function Symbol(opt_description:String = ''):symbol {  return null; }

@carlosrovira
Copy link
Contributor

Hi, no, the build is working right. Many of us use it daily (my first thing in the day is to sync repos and build maven and ant to ensure all continues to work ok). I'm on mac, but that's the same for others using windows and mac. So for sure is something on your set up.

if using JDK8 is not making a difference, then you can try to check the links I put before and follow it closely to see what could be the difference. Right now I'm run of ideas. Sorry :(

@mzamoun-veolia
Copy link
Author

I got the solution :

add in pom.xml :

     <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-site-plugin</artifactId>
             <version>3.0</version>
             <configuration>
                <chmod>true</chmod>
                   <inputEncoding>UTF-8</inputEncoding>
                      <outputEncoding>UTF-8</outputEncoding>
                                                                                                                                                                       </configuration>
                                                                                                                                                          </plugin>

execute : mvn -N io.takari:maven:wrapper
to add correctely the .mvn directory

execute mvn with this option : -Drat.numUnapprovedLicenses=100

./mvnw -Drat.numUnapprovedLicenses=100 install

and you will have :

[INFO] Reactor Summary for Apache Royale: TypeDefs: Parent 0.9.8-SNAPSHOT:
[INFO]
[INFO] Apache Royale: TypeDefs: Parent .................... SUCCESS [ 3.571 s]
[INFO] Apache Royale: TypeDefs: JS ........................ SUCCESS [ 27.432 s]
[INFO] Apache Royale: TypeDefs: Cordova ................... SUCCESS [ 1.742 s]
[INFO] Apache Royale: TypeDefs: CreateJS .................. SUCCESS [ 3.028 s]
[INFO] Apache Royale: TypeDefs: GCL ....................... SUCCESS [ 1.027 s]
[INFO] Apache Royale: TypeDefs: GoogleMaps ................ SUCCESS [ 3.339 s]
[INFO] Apache Royale: TypeDefs: Jasmine ................... SUCCESS [ 1.143 s]
[INFO] Apache Royale: TypeDefs: JQuery .................... SUCCESS [ 2.115 s]
[INFO] Apache Royale: TypeDefs: Node ...................... SUCCESS [ 11.004 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56.846 s
[INFO] Finished at: 2021-01-22T11:31:32+01:00
[INFO] ------------------------------------------------------------------------

Note that I execute it with java 15. And it works :)

@carlosrovira
Copy link
Contributor

thanks @mzamoun-veolia for posting!

Hi @chrisdutz can you take a look at this?

@chrisdutz
Copy link
Contributor

Well actually by running "mvn -N io.takari:maven:wrapper" you'll create/recreate the maven-wrapper ... not sure what's the difference. I do know that I added some of the files as I created them and hereby was allowed to put the Apache Header on them. If you use the version from Takari repo, that noch from Apache. Therefore it doesn't have the Apache header and therefore you need to add the rat excusions.

Also I find it strange that the site plugin is required as this usually only is required in "mvn site" builds and shouldn't have any influence on the normal build lifecycle.

It would be interesting to see a diff of .mvn/wrapper/maven-wrapper.properties as it's in our repo and as it is after updating it with the "mvn -N io.takari:maven:wrapper" command.

@chrisdutz
Copy link
Contributor

chrisdutz commented Jan 22, 2021

I just checked, it's using Maven 3.6.3 instead of 3.6.0 and the maven-wrapper 0.5.6 instead of 0.5.2 ... so not really sure why there should be a difference ... and it adds the maven-wrapper.jar which is a binary and never is allowed to be in an Apache release.

The scripts don't execute maven in any other way ... so I don't thing we should do this.

@chrisdutz
Copy link
Contributor

I think it might be an idea to build with a clean maven local repo ... cause if the js files were fetched while there were "issues" on the site they were fetched from, then the build is broken and the only way to repair it, is by re-downloading them again.

So please try again with "mvn package -Dmaven.repo.local=someDirectory" ... just to check this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants