babyfish-ct / jimmer

A revolutionary ORM framework for both java and kotlin.
Apache License 2.0
882 stars 91 forks source link

dto文件编译 与 `org.graalvm.buildtools.native` 插件不兼容 #778

Closed llh4github closed 2 weeks ago

llh4github commented 2 weeks ago

项目中含有 org.graalvm.buildtools.native 插件时,执行 ./gradlew build -x test命令时出现错误:

* What went wrong:
Execution failed for task ':bootJar'.
> Entry BOOT-INF/classes/com/example/demo/model/dto/BookStoreAddInput$Builder.class is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/8.10.2/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.

样例代码如下:

demo-native.zip

babyfish-ct commented 2 weeks ago

Please add this block into build.gradle.kts

tasks.withType<Jar> {
    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

Reference Link: https://stackoverflow.com/questions/67265308/gradle-entry-classpath-is-a-duplicate-but-no-duplicate-handling-strategy-has-b