Open qchen-fdii-cardc opened 2 years ago
Hi @qchen-fdii-cardc, thank you for reporting. Which JVM and Gradle version are you running? Could you try cloning this project and running ./gradlew run
? What are the results?
Hi, thank you so much for your response. It’s very kind.
Here is my gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists
I’m using Oracal OpenJDK version 18.0.1.
When using with JavaFX, the error shows what I reported.
Build.gradle with ResolutionException:
plugins { id 'java' id 'application' id 'org.jetbrains.kotlin.jvm' version '1.6.20' id 'org.openjfx.javafxplugin' version '0.0.10' id 'org.beryx.jlink' version '2.24.1' }
group 'me.qchen' version '1.0.0'
repositories { mavenCentral() }
ext { junitVersion = '5.8.2' }
sourceCompatibility = '16' targetCompatibility = '16'
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
application { mainModule = 'cn.cardc.demofx' mainClass = 'cn.cardc.demofx.HelloApplication' }
[compileKotlin, compileTestKotlin].forEach { it.kotlinOptions { jvmTarget = '16' } }
javafx { version = '18' modules = ['javafx.controls'] }
dependencies { implementation("ai.hypergraph:kotlingrad:0.4.7")
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
}
test { useJUnitPlatform() }
jlink { imageZip = project.file("${buildDir}/distributions/app-${javafx.platform.classifier}.zip") options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages'] launcher { name = 'demofx' } }
jlinkZip { group = 'FunWithJavaFX' }
But when I create another project without JavaFX, it works fine.
Build.gradle.kts without error:
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { kotlin("jvm") version "1.6.21" application }
group = "me.qchen" version = "1.0.0"
repositories { mavenCentral() }
dependencies { implementation("ai.hypergraph:kotlingrad:0.4.7") implementation("org.apache.commons:commons-math3:3.6.1")
testImplementation(kotlin("test"))
}
tasks.test { useJUnitPlatform() }
tasks.withType
application { mainClass.set("MainKt") }
Thanks for your help.
从 Windows 版邮件https://go.microsoft.com/fwlink/?LinkId=550986发送
发件人: @.> 发送时间: 2022年6月6日 10:26 收件人: @.> 抄送: Q. @.>; @.> 主题: Re: [breandan/kotlingrad] java.lang.module.ResolutionException in dependencies (Issue #29)
Hi @qchen-fdii-cardchttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fqchen-fdii-cardc&data=05%7C01%7C%7Cf697126bc94a40ff0c7c08da4763f8f6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637900791943799085%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=AxB6Onbc0IcU6fYdgUdMJeEu%2FZuNnuA%2Bj%2FVd6nFBvvQ%3D&reserved=0, thank you for reporting. Which JVM and Gradle version are you running? Could you try cloning this projecthttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbreandan%2Fkotlingrad-consumer&data=05%7C01%7C%7Cf697126bc94a40ff0c7c08da4763f8f6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637900791943799085%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0IqdODlrp8cFHiPCVNVTmGjd9Q9B1Yp6wytAg%2BBpKfg%3D&reserved=0 and running ./gradlew run? What are the results?
― Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbreandan%2Fkotlingrad%2Fissues%2F29%23issuecomment-1146970189&data=05%7C01%7C%7Cf697126bc94a40ff0c7c08da4763f8f6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637900791943799085%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=zeSYAZvMq0b%2Bos3Ez4cvOpBbfqhT4UsRAhUjOQepnWk%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAPXQ47HMUKLWUDVOARK2WZ3VNVOVRANCNFSM5X56QRVQ&data=05%7C01%7C%7Cf697126bc94a40ff0c7c08da4763f8f6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637900791943799085%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=HW7YzN10ePLnkZCqyraW6HhnMrhfdsX6Ccv%2FDg%2BbSCk%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>
I've add dependencies
implementation("ai.hypergraph:kotlingrad:0.4.7")
in Gradle project, build.gradle.Compiled without error. When I tried to run:
> Task :run FAILED Error occurred during initialization of boot layer java.lang.module.ResolutionException: Modules guru.nidi.graphviz.kotlin and guru.nidi.graphviz export package guru.nidi.graphviz to module XXXX
where XXXX could be svgSalamander or com.ibm.icu.
I can figure out the problem of two modules java/kotlin graphviz both define package guru.nidi.graphviz.
I search on internet, without any clue.
Thanks for any help.