Closed xiaoxidashen closed 2 years ago
oh,I fix it by change maven path
Thanks for this - I actually just started hitting this in some CI tests, but oddly not consistently. When you say you changed the maven path, does this mean your .m2\
directory was on one drive, but your j2cl maven project was on another?
If so, this is a bug in our closure compiler fork, and we can try to test for that before relativizing. I also have a local patch I'm working on that will stop using jszip
s at all, which will also make this go away.
Thanks for this - I actually just started hitting this in some CI tests, but oddly not consistently. When you say you changed the maven path, does this mean your
.m2\
directory was on one drive, but your j2cl maven project was on another?If so, this is a bug in our closure compiler fork, and we can try to test for that before relativizing. I also have a local patch I'm working on that will stop using
jszip
s at all, which will also make this go away.
yes,at the beginning, I used Idea's built-in maven, which is in the C drive, my project is in the D drive, and then reported this error, I tried to solve this problem, I used Idea's Debug to run mvn, added a breakpoint, and found this The error is because the maven drive and the project drive are not the same, then I installed maven on the D drive, and used the maven of my D drive in Idea, and then it ran successfully
A fix has been merged that should resolve this, can you confirm that 0.20-SNAPSHOT no longer has this issue?
C:\Code\jdk-18+36\bin\java.exe -Dmaven.multiModuleProjectDirectory=D:\Code\Java\Projects\java2Js\compiler "-Dmaven.home=C:\Code\Ide\IntelliJ IDEA 2022.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Code\Ide\IntelliJ IDEA 2022.1\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Code\Ide\IntelliJ IDEA 2022.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Code\Ide\IntelliJ IDEA 2022.1\lib\idea_rt.jar=52818:C:\Code\Ide\IntelliJ IDEA 2022.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Code\Ide\IntelliJ IDEA 2022.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Code\Ide\IntelliJ IDEA 2022.1\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version=2022.1 com.vertispan.j2cl:j2cl-maven-plugin:0.19:watch [INFO] Scanning for projects... [INFO] [INFO] ------------------------< org.example:compiler >------------------------ [INFO] Building compiler 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- j2cl-maven-plugin:0.19:watch (default-cli) @ compiler --- [INFO] Using D:\Code\Java\Projects\java2Js\compiler\target/compiler-1.0-SNAPSHOT as webappDirectory since goal is running in a non-reactor build and none was set [INFO] Removing dependency com.google.jsinterop:base:jar:1.0.0:compile, replacing with com.vertispan.jsinterop:base:jar:1.0.0-1 [INFO] Removing dependency com.google.jsinterop:jsinterop-annotations:jar:1.0.2:compile, no replacement [INFO] Starting com.vertispan.jsinterop:base:1.0.0-1/unpack [INFO] Finished com.vertispan.jsinterop:base:1.0.0-1/unpack in 6ms [INFO] Start watching {org.example:compiler:1.0-SNAPSHOT=[D:\Code\Java\Projects\java2Js\compiler\src\main\java, D:\Code\Java\Projects\java2Js\compiler\src\main\resources]} [INFO] Watching for changes [INFO] Starting com.vertispan.jsinterop:base:1.0.0-1/bytecode [INFO] Finished com.vertispan.jsinterop:base:1.0.0-1/bytecode in 9ms [INFO] Starting org.example:compiler:1.0-SNAPSHOT/bytecode [INFO] Starting com.vertispan.jsinterop:base:1.0.0-1/stripped_sources [INFO] Finished com.vertispan.jsinterop:base:1.0.0-1/stripped_sources in 61ms [INFO] Starting com.vertispan.jsinterop:base:1.0.0-1/stripped_bytecode [INFO] Starting com.vertispan.jsinterop:base:1.0.0-1/transpiled_js [INFO] Finished org.example:compiler:1.0-SNAPSHOT/bytecode in 527ms [INFO] Starting org.example:compiler:1.0-SNAPSHOT/stripped_sources [INFO] Finished com.vertispan.jsinterop:base:1.0.0-1/stripped_bytecode in 469ms [INFO] Starting com.vertispan.jsinterop:base:1.0.0-1/stripped_bytecode_headers [INFO] Starting org.example:compiler:1.0-SNAPSHOT/transpiled_js [INFO] Finished org.example:compiler:1.0-SNAPSHOT/transpiled_js in 249ms [INFO] Finished com.vertispan.jsinterop:base:1.0.0-1/transpiled_js in 754ms [INFO] Starting org.example:compiler:1.0-SNAPSHOT/optimized_js java.lang.IllegalArgumentException: 'other' has different root at java.base/sun.nio.fs.WindowsPath.relativize(WindowsPath.java:420) at java.base/sun.nio.fs.WindowsPath.relativize(WindowsPath.java:42) at com.google.javascript.jscomp.CommandLineRunner.prepForBundleAndAppendTo(CommandLineRunner.java:2046) at com.google.javascript.jscomp.AbstractCommandLineRunner.printBundleTo(AbstractCommandLineRunner.java:2339) at com.google.javascript.jscomp.AbstractCommandLineRunner.outputManifestOrBundle(AbstractCommandLineRunner.java:2203) at com.google.javascript.jscomp.AbstractCommandLineRunner.outputBundle(AbstractCommandLineRunner.java:2153) at com.google.javascript.jscomp.AbstractCommandLineRunner.processResults(AbstractCommandLineRunner.java:1565) at com.google.javascript.jscomp.AbstractCommandLineRunner.doRun(AbstractCommandLineRunner.java:1324) at com.google.javascript.jscomp.AbstractCommandLineRunner.run(AbstractCommandLineRunner.java:535) at com.vertispan.j2cl.tools.Closure.compile(Closure.java:183) at com.vertispan.j2cl.build.provided.ClosureTask$4.execute(ClosureTask.java:225) at com.vertispan.j2cl.build.TaskScheduler$2.executeTask(TaskScheduler.java:172) at com.vertispan.j2cl.build.TaskScheduler$2.lambda$onReady$0(TaskScheduler.java:211) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) java.lang.RuntimeException at com.vertispan.j2cl.build.DiskCache.markFailed(DiskCache.java:452) at com.vertispan.j2cl.build.DiskCache$CacheResult.markFailure(DiskCache.java:54) at com.vertispan.j2cl.build.TaskScheduler$2.executeTask(TaskScheduler.java:181) at com.vertispan.j2cl.build.TaskScheduler$2.lambda$onReady$0(TaskScheduler.java:211) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) [ERROR] Exception executing task org.example:compiler:1.0-SNAPSHOT/optimized_js java.lang.IllegalStateException: Closure Compiler failed, check log for details at com.vertispan.j2cl.build.provided.ClosureTask$4.execute (ClosureTask.java:245) at com.vertispan.j2cl.build.TaskScheduler$2.executeTask (TaskScheduler.java:172) at com.vertispan.j2cl.build.TaskScheduler$2.lambda$onReady$0 (TaskScheduler.java:211) at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:539) at java.util.concurrent.FutureTask.run (FutureTask.java:264) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:304) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635) at java.lang.Thread.run (Thread.java:833)