mP1 / j2cl-maven-plugin

Java to javascript maven plugin that uses several Google java/javascript compilers and tools
Apache License 2.0
8 stars 3 forks source link

Error during mvn clean install #652

Closed bschenkelberger closed 1 year ago

bschenkelberger commented 1 year ago

I receive the following error during the installation:

alkingkooka:jsinterop-base:jar:1.0-SNAPSHOT-UNPACK Directory C:\Entwicklung\Projekte\XXX\j2cl-maven-plugin\target\it-tests\formatting-pretty-print\target\walkingkooka-j2cl-maven-plugin-cache\walkingkooka--jsinterop-base--jar--1.0-SNAPSHOT-010ec4e48bcecce288a2680583838053b02898e5\1-unpack Source root(s) Failed to execute walkingkooka:jsinterop-base:jar:1.0-SNAPSHOT-UNPACK message: Path is missing "/" "C:/Entwicklung/Projekte/XXX/j2cl-maven-plugin/target/it-repo/walkingkooka/jsinterop-base/1.0-SNAPSHOT/jsinterop-base-1.0-SNAPSHOT.jar" java.lang.IllegalArgumentException: Path is missing "/" "C:/Entwicklung/Projekte/XXX/j2cl-maven-plugin/target/it-repo/walkingkooka/jsinterop-base/1.0-SNAPSHOT/jsinterop-base-1.0-SNAPSHOT.jar" at walkingkooka.naming.PathSeparator.checkBeginning(PathSeparator.java:126) at walkingkooka.naming.StringPath.parse(StringPath.java:45)

Have anyone an idea?

mP1 commented 1 year ago

Can you please share a bit more of the stacktrace.

Have a feeling its expecting unix style paths...because StringPath.parse L45 is definitely checking the path start with a slash

mP1 commented 1 year ago

Ive added a quick fix to the line you have shared. It should work, just letting the build run fingers crossed.

mP1 commented 1 year ago

@ bschenkelberger

Please try again, hopefully should work...

bschenkelberger commented 1 year ago

The mentioned issue is gone, but now I receive this one [ERROR] Failed to execute walkingkooka:j2cl-maven-plugin-it-formatting-pretty-print:war:1.0-HASH message: Illegal char <:> at index 101: C:\Entwicklung\Projekte\XXX\j2cl-maven-plugin\target\it-tests\formatting-pretty-print\pom.xml/C:\Entwicklung\Projekte\XXX\j2cl-maven-plugin\target\it-tests\formatting-pretty-print\src\main\java java.nio.file.InvalidPathException: Illegal char <:> at index 101: C:\Entwicklung\Projekte\XXX\j2cl-maven-plugin\target\it-tests\formatting-pretty-print\pom.xml/C:\Entwicklung\Projekte\XXX\j2cl-maven-plugin\target\it-tests\formatting-pretty-print\src\main\java at sun.nio.fs.WindowsPathParser.normalize (WindowsPathParser.java:182) at sun.nio.fs.WindowsPathParser.parse (WindowsPathParser.java:153)

mP1 commented 1 year ago

Can you share a bit more of the stacktrace...

mP1 commented 1 year ago

Give me a bit will try building on windows using VirtualBox to iron out any nit.

bschenkelberger commented 1 year ago

Yes, of course:

[ERROR] Failed to execute walkingkooka:j2cl-maven-plugin-it-formatting-pretty-print:war:1.0-HASH message: Illegal char <:> at index 101: C:\Entwicklung\Projekte\XXX\j2cl-maven-plugin\target\it-tests\formatting-pretty-print\pom.xml/C:\Entwicklung\Projekte\XXX\j2cl-maven-plugin\target\it-tests\formatting-pretty-print\src\main\java java.nio.file.InvalidPathException: Illegal char <:> at index 101: C:\Entwicklung\Projekte\XXX\j2cl-maven-plugin\target\it-tests\formatting-pretty-print\pom.xml/C:\Entwicklung\Projekte\XXX\j2cl-maven-plugin\target\it-tests\formatting-pretty-print\src\main\java at sun.nio.fs.WindowsPathParser.normalize (WindowsPathParser.java:182) at sun.nio.fs.WindowsPathParser.parse (WindowsPathParser.java:153) at sun.nio.fs.WindowsPathParser.parse (WindowsPathParser.java:77) at sun.nio.fs.WindowsPath.parse (WindowsPath.java:92) at sun.nio.fs.WindowsFileSystem.getPath (WindowsFileSystem.java:229) at java.nio.file.Path.of (Path.java:147) at java.nio.file.Paths.get (Paths.java:69) at walkingkooka.j2cl.maven.J2clSourcesKind.lambda$concat$1 (J2clSourcesKind.java:99) at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:195) at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:195) at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:195) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining (ArrayList.java:1655) at java.util.stream.ReferencePipeline$Head.forEach (ReferencePipeline.java:658) at java.util.stream.ReferencePipeline$7$1.accept (ReferencePipeline.java:274) at java.util.stream.ReferencePipeline$2$1.accept (ReferencePipeline.java:177) at java.util.Spliterators$ArraySpliterator.forEachRemaining (Spliterators.java:948) at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:484) at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:474) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential (ReduceOps.java:913) at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect (ReferencePipeline.java:578) at walkingkooka.j2cl.maven.J2clSourcesKind.concat (J2clSourcesKind.java:103) at walkingkooka.j2cl.maven.J2clSourcesKind.sources (J2clSourcesKind.java:72) at walkingkooka.j2cl.maven.J2clSourcesKind.access$100 (J2clSourcesKind.java:36) at walkingkooka.j2cl.maven.J2clSourcesKind$1.compileSourceRoots (J2clSourcesKind.java:46) at walkingkooka.j2cl.maven.J2clArtifact.sourceRoots (J2clArtifact.java:1316) at walkingkooka.j2cl.maven.hash.J2clTaskHash.hashArtifactSources (J2clTaskHash.java:157) at walkingkooka.j2cl.maven.hash.J2clTaskHash.execute (J2clTaskHash.java:81) at walkingkooka.j2cl.maven.J2clTaskKind.execute (J2clTaskKind.java:191) at walkingkooka.j2cl.maven.J2clMavenContext.callable (J2clMavenContext.java:447) at walkingkooka.j2cl.maven.J2clMavenContext.lambda$trySubmitTasks$2 (J2clMavenContext.java:394) at java.util.concurrent.FutureTask.run (FutureTask.java:264) at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515) at java.util.concurrent.FutureTask.run (FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628) at java.lang.Thread.run (Thread.java:829) java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Directory under C:\Entwicklung\Projekte\XXX\j2cl-maven-plugin\target\it-tests\formatting-pretty-print\target\walkingkooka-j2cl-maven-plugin-cache missing for "walkingkooka:j2cl-maven-plugin-it-formatting-pretty-print:war:1.0" at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) at walkingkooka.j2cl.maven.J2clMavenContext.waitUntilCompletion(J2clMavenContext.java:529) at walkingkooka.j2cl.maven.J2clMojoBuild.execute(J2clMojoBuild.java:51) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289) at org.apache.maven.cli.MavenCli.main(MavenCli.java:193) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)

mP1 commented 1 year ago

I think i have a fix for above, build appears to work (ive removed the horrible does a path start with "/" and replaced that with a Path.isAbsolute).

Hopefully this is the last horrible path checking using a does it start with slash. I tried searching the source for "/" and doing path stuff. The only remaining slash tests are for some paths relating to zip files which will always use slash.

Will post another comment when the build completes successfully

mP1 commented 1 year ago

Please try...

bschenkelberger commented 1 year ago

Thx, for your help. Now it works