jsweet-candies / candy-threejs

Java API bridge for threejs (JSweet candy)
2 stars 0 forks source link

Cannot build 89/ #1

Open raftAtGit opened 3 years ago

raftAtGit commented 3 years ago

Hey guys,

First, thanks a lot for the effort, highly appreciated :)

TLDR: mvn install fails in 89/ folder with the error below:

$ mvn clean install
[←[1;34mINFO←[m] Scanning for projects...
[←[1;34mINFO←[m]
[←[1;34mINFO←[m] ←[1m-------------------< ←[0;36morg.jsweet.v3.candies:threejs←[0;1m >--------------------←[m
[←[1;34mINFO←[m] ←[1mBuilding threejs 89-20200915←[m
[←[1;34mINFO←[m] ←[1m--------------------------------[ jar ]---------------------------------←[m
Downloading from jsweet-plugins-release: http://repository.jsweet.org/artifactory/plugins-release-local/org/js
weet/jsweet-maven-plugin/3.0.0-SNAPSHOT/jsweet-maven-plugin-3.0.0-SNAPSHOT.pom
[←[1;34mINFO←[m] ←[1m------------------------------------------------------------------------←[m
[←[1;34mINFO←[m] ←[1;31mBUILD FAILURE←[m
[←[1;34mINFO←[m] ←[1m------------------------------------------------------------------------←[m
[←[1;34mINFO←[m] Total time:  1.628 s
[←[1;34mINFO←[m] Finished at: 2020-11-09T23:49:37+01:00
[←[1;34mINFO←[m] ←[1m------------------------------------------------------------------------←[m
[←[1;31mERROR←[m] Plugin org.jsweet:jsweet-maven-plugin:3.0.0-SNAPSHOT or one of its dependencies could not be
 resolved: Failed to read artifact descriptor for org.jsweet:jsweet-maven-plugin:jar:3.0.0-SNAPSHOT: Could not
 transfer artifact org.jsweet:jsweet-maven-plugin:pom:3.0.0-SNAPSHOT from/to jsweet-plugins-release (http://re
pository.jsweet.org/artifactory/plugins-release-local): Failed to transfer file http://repository.jsweet.org/a
rtifactory/plugins-release-local/org/jsweet/jsweet-maven-plugin/3.0.0-SNAPSHOT/jsweet-maven-plugin-3.0.0-SNAPS
HOT.pom with status code 409 -> ←[1m[Help 1]←[m
[←[1;31mERROR←[m]
[←[1;31mERROR←[m] To see the full stack trace of the errors, re-run Maven with the ←[1m-e←[m switch.
[←[1;31mERROR←[m] Re-run Maven using the ←[1m-X←[m switch to enable full debug logging.
[←[1;31mERROR←[m]
[←[1;31mERROR←[m] For more information about the errors and possible solutions, please read the following arti
cles:
[←[1;31mERROR←[m] ←[1m[Help 1]←[m http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

$ mvn -version
←[1mApache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T17:06:16+02:00)←[m
Maven home: C:\work\apache-maven-3.6.2
Java version: 1.8.0_271, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_271\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Long story:

I'd like to use threejs candy as a dependency in another project. For 75-xx versions the project builds (with gradle and gradle plugin), however for 89.xx versions I got the below class file version error.

Looks like this is caused by a transitive dependency of threejs candy which is compiled with JDK 11+ version. I'm using JDK 8 which doesn't like JDK 11+ compiled classes.

$ ./gradlew jsweetClean jsweet

> Task :app:jsweet FAILED
cannot access def.dom.Document
  bad class file: C:\Users\hakan.eryargi\.gradle\caches\modules-2\files-2.1\org.jsweet\jsweet-core\
6.1.0-SNAPSHOT\a225e4f8edd478b647215e946c227d979e60c0dc\jsweet-core-6.1.0-SNAPSHOT.jar(def/dom/Docu
ment.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath. at C:\raft_
code\sky-maze3d-webgl\app\src\main\java\raft\jumpy\App.java(8)
C:\raft_code\sky-maze3d-webgl\app\src\main\java\raft\jumpy\App.java:8: error: cannot access def.dom
.Document
import def.dom.Document;
              ^
  bad class file: C:\Users\hakan.eryargi\.gradle\caches\modules-2\files-2.1\org.jsweet\jsweet-core\
6.1.0-SNAPSHOT\a225e4f8edd478b647215e946c227d979e60c0dc\jsweet-core-6.1.0-SNAPSHOT.jar(def/dom/Docu
ment.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.

If I switch to JDK 11 I got the following error:

$ ./gradlew jsweetClean jsweet

> Task :app:jsweet FAILED
class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoad
er (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.
base of loader 'bootstrap')

My understanding is, this is some incompatibility of jsweet-gradle-plugin and JDK 11+.

So, I tried to build/install 89/ folder locally with JDK 8 and noticed it doesnt build due to it cannot pull dependencies as mentioned in the first part.

Summary: The code in the 89/ folder is not buildable. I believe it's really important and nice that the code cloned from the master branch is buildable.

But my main motivation is, able to use threejs candy 89.xx versions in another project. Either with JDK 11+ or JDK 8.

I will highly appreciate any direction to solve the issue.

Thanks :)

lgrignon commented 3 years ago

Hello. Can you please try with latest 3.0.0-RC11?