Giuseppe Barbieri
02/21/2024, 11:18 AMCaused by: java.lang.NoSuchMethodError: 'com.fasterxml.jackson.core.StreamReadConstraints com.fasterxml.jackson.dataformat.yaml.YAMLParser.streamReadConstraints()'which is, probably, because I have multiple versions of that dependency in my classpath (2.14.2 and 2.16.1) what's the best way to debug and fix that?
Martin
02/21/2024, 11:19 AMbuildSrc/build.gradle.kts
(or build-logic
if you're using included builds)Martin
02/21/2024, 11:19 AMMartin
02/21/2024, 11:20 AMGiuseppe Barbieri
02/21/2024, 11:21 AMdependencies
and dependencyInsight --dependency com.fasterxml.jackson.core
Giuseppe Barbieri
02/21/2024, 11:23 AMPut all your plugin dependenciesIt should't be a plugin dependency
Giuseppe Barbieri
02/21/2024, 11:24 AMdependencyInsight --dependency com.fasterxml.jackson.core
shows conflict resolution between an additional version (2.9.10.1) which loses against 2.14.2
Selection reasons: - By constraint - By conflict resolution: between versions 2.14.2 and 2.9.10.1
Vampire
02/21/2024, 11:34 AMGiuseppe Barbieri
02/21/2024, 11:35 AMobject ImageJMainTest {
@JvmStatic
fun main(args: Array<String>) {
ImageJMain.main(args)
}
}
from the tests, via Idea guiMartin
02/21/2024, 11:36 AMMartin
02/21/2024, 11:37 AMafterEvaluate {
println(configurations.getByName("runtimeClasspath").files)
}
Vampire
02/21/2024, 11:37 AMCan you have two versions of a given dependency in a runtime classpath?If you force it to, sure.
Vampire
02/21/2024, 11:38 AMMartin
02/21/2024, 11:38 AMIdea guiThis is probably the issue ?
Giuseppe Barbieri
02/21/2024, 11:38 AMMartin
02/21/2024, 11:38 AMGiuseppe Barbieri
02/21/2024, 11:39 AMGiuseppe Barbieri
02/21/2024, 11:39 AMGiuseppe Barbieri
02/21/2024, 11:40 AMMartin
02/21/2024, 11:41 AMMartin
02/21/2024, 11:43 AMJavaExec
thing in your build script and do all kinds of things there. Sounds hard for IJ to pick this upVampire
02/21/2024, 11:46 AMtasks
.withType<JavaExec>()
.matching { it.name.endsWith(".main()") }
.configureEach { ... }
Martin
02/21/2024, 8:30 PMobject ImageJMainTest {
// ij-gradle-task: runMain
@JvmStatic
fun main(args: Array<String>) {
ImageJMain.main(args)
}
}