I have a project that builds fine with maven with ...
# getting-started
d
I have a project that builds fine with maven with 1.9.24; upgrading the kotlin version to 2.0.0 gives me this, though:
Copy code
[ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:2.0.0:compile (compile) on project models: Compilation failure
[ERROR] java.lang.NoSuchMethodError: org.jetbrains.kotlin.fir.analysis.checkers.declaration.FirDeclarationChecker: method 'void <init>()' not found
[ERROR]         at org.jetbrains.kotlin.noarg.fir.FirNoArgDeclarationChecker.<init>(FirNoArgDeclarationChecker.kt:26)
This is with updating the kotlin-maven-plugin and the kotlin libraries to 2.0.0 across the board. Is this not what the upgrade is supposed to be, in simple form?
v
What are the next lines in the stacktrace? That constructor got one argument added in 2.0.0, so something that calls that constructor is not compatible with 2.0.0.
d
haven't been able to replicate it - I'm reworking the build files altogether (mostly removing duplicated plugins down the hierarchy) and so far I've not re-encountered it. This may have been a broken-but-working-through-the-grace-of-God build somehow.
Ah, here we go, though:
Copy code
[ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:2.0.0:compile (compile) on project care: Compilation failure
[ERROR] java.lang.NoSuchMethodError: org.jetbrains.kotlin.fir.analysis.checkers.declaration.FirDeclarationChecker: method 'void <init>()' not found
[ERROR]         at org.jetbrains.kotlin.noarg.fir.FirNoArgDeclarationChecker.<init>(FirNoArgDeclarationChecker.kt:26)
[ERROR]         at org.jetbrains.kotlin.noarg.fir.FirNoArgDeclarationChecker.<clinit>(FirNoArgDeclarationChecker.kt)
[ERROR]         at org.jetbrains.kotlin.noarg.fir.FirNoArgCheckers$declarationCheckers$1.<init>(FirNoArgCheckersComponent.kt:15)
[ERROR]         at org.jetbrains.kotlin.noarg.fir.FirNoArgCheckers.<init>(FirNoArgCheckersComponent.kt:14)
[ERROR]         at org.jetbrains.kotlin.noarg.fir.FirNoArgExtensionRegistrar$configurePlugin$1.invoke(FirNoArgExtensionRegistrar.kt:13)
v
Seems like you use an old version of the https://kotlinlang.org/docs/no-arg-plugin.html
d
ah ha! Okay, that's not VERY surprising. Working on it.
👌 1
109 Views