java - Keycloak-Admin-Client in a JPMS/Jigsaw Java 11 Maven application - Dependency Problems
问题描述
maybe someone has already figured that out or has some tips, I would be really thankful.
I'm trying to use the Keycloak-Admin-Client maven dependency in a modularized Java 11 application. The Application is modularized via JPMS/Jigsaw.
I'm using the version 9.0.2 of the Keycloak-Admin-Client.
<keycloak-admin-client.version>9.0.2</keycloak-admin-client.version>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-admin-client</artifactId>
<version>${keycloak-admin-client.version}</version>
My current Problem:
java.lang.module.FindException: Module javax.ws.rs.api not found, required by com.fasterxml.jackson.jaxrs.base
But I already have this in my module-info and POM:
requires java.ws.rs;
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
</dependency>
The javax.ws.rs-api jar is also in my libs folder (module-path):
Some additional informations from the jackson-jaxrs-providers GitHub-Repo:
requires static javax.ws.rs.api;
requires static java.ws.rs;
requires static jakarta.ws.rs.api;
https://github.com/FasterXML/jackson-jaxrs-providers/blob/master/json/src/moditect/module-info.java
I hope my problem is understandable, please ask if more details are needed.
Thanks a lot and best regards.
Pierre
解决方案
问题是 javax.ws.rs-api 工件版本 2.1 具有不同的工件 ID“java.ws.rs-api”而不是“javax.ws.rs-api”。
在 2.0.1 版中。是否缺少包裹。版本 2.1-m08 有效。
<dependency>
<groupId>javax.ws.rs</groupId>
<!-- pwi: JAX-RS 2.x has different artifact-id, "javax.ws.rs-api" and Version 2.0.1 has missing packages -->
<artifactId>javax.ws.rs-api</artifactId>
<version>2.1-m08</version>
</dependency>
推荐阅读
- image - Docker Bind Mount 读取初始容器数据
- .htaccess - htacces 没有重定向
- c - 在C中的矩阵中查找相同的列
- javascript - If 语句不显示结果
- android - 从 androids 上传的图像仅在 android 设备上侧向显示
- php - 在 WooCommerce 中管理从总量原材料中定制产品的库存?
- web-services - 设计一个依赖 SOAP API 的服务,它改变了很多
- caching - 使用 redis 缓存作为主存储然后再同步到数据库的缺点?
- c++ - 执行:使用 [dbName] ;exec sp_space 与 ADO C++ 一起使用
- php - 数据堆叠问题 PHP