Hey does anyone have any clue what could be going ...
# announcements
p
Hey does anyone have any clue what could be going wrong here? Maven ran from the
maven-wrapper
fails to compile my project with this error:
Copy code
[ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.4.30:compile (compile) on project my-project: Compilation failure: Compilation failure:
[ERROR] /Users/poohbar/IdeaProjects/my-project/Controller.kt:[23,30] Unresolved reference: of
The line that it fails on looks like this:
Copy code
val path = Path.of(folder, file)
And replacing it with:
Copy code
val path = Paths.get(folder, file)
solves the issue. So bizzarre. 😮
I tried putting
of
in quotes like this ` Path.
of
` but that didnt help
e
what version of Java are you compiling with
p
it is a static method on the
Path
interface
e
it was added in Java 11, and not available earlier
☝️ 1
what version of Java
p
i am not specifying any java version in my pom
just kotlin
1.4.30
e
depends on your environment, then
p
that might explain why it works fine in the intellij bundled maven
but does not work in the maven wrapper
ok thanks, that helped... intellij was running the build with the built-in java 11 but the maven-wrapper was running it with my local jdk which was 1.8