openjfx javafxplugin jar创建中多个服务文件冲突

问题描述

继续Which ReastEasy 4 client dependencies are needed?

build.gradle

plugins {
    id 'org.openjfx.javafxplugin'
    id 'java'
}

repositories {
    jcenter()
    mavenCentral()
}

sourceCompatibility = 14
targetCompatibility = 14

ext.resteasyVersion = "4.5.8.Final";

dependencies {
    compile "org.jboss.resteasy:resteasy-client:$resteasyVersion"
    compile "org.jboss.resteasy:resteasy-jackson2-provider:$resteasyVersion"
}

在执行jar任务并运行jar之后,尝试创建JAX-RS请求时会引发错误

javax.ws.rs.ProcessingException: RESTEASY003215: Could not find writer for content-type application/json type: java.lang.String

这被认为是服务文件冲突的结果,仅打包了1个文件。使用ShadowJar插件时,解决方案是使用

进行配置
shadowJar {
  mergeServiceFiles()
}

(请参阅MessageBodyWriter not found error for Jersy / Jetty server),但这不适用于此插件的jar生成

如何解决此冲突?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)