cas 6.2 Incompatible because this component declares an API of a component compatible with Java 11

2023-05-16

最近用到cas6.2的项目  配置基本按下面的来 其中配置jdk什么的都是百度的

使用cas-overlay-template 6.2服务部署到整合cas-client_爱学习的老王的博客-CSDN博客_cas overlay

但是导包出现国外的倒不进去  翻墙都没得用 最后从ali仓库一个一个捞出来的

就是在gradle.build里面加了一下代码 ,据我了解这应该是按顺序执行找不到会执行下一个

    maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
    maven { url 'http://maven.aliyun.com/repository/gradle-plugin/' }
    maven { url 'http://maven.aliyun.com/repository/jcenter/' }
    maven { url 'http://maven.aliyun.com/repository/central/' }
    maven { url 'http://maven.aliyun.com/repository/google/' }

位置

因为上面地址是国外的 我就不要了注释掉了  各位看官请执行调整

找包的话请看

gradle项目导包出现Could not GET connect refuse 之类的_王者之座的博客-CSDN博客

还有下一步执行到gradlew.bat clean build 时候又出现问题  也就是当前主题了

* Where:
Build file 'F:\cas-overlay-template-6.2.1\build.gradle' line: 76

* What went wrong:
A problem occurred evaluating root project 'cas'.
> Could not resolve all artifacts for configuration 'classpath'.
   > Could not resolve org.apereo.cas:cas-server-core-api-configuration-model:6.2.0.
     Required by:
         unspecified:unspecified:unspecified
      > No matching variant of org.apereo.cas:cas-server-core-api-configuration-model:6.2.0 was found. The consumer was configured to find a runtime of a component compatible with Java 8, packaged as a jar, and its dependencies decl
ared externally but:
          - Variant 'apiElements' capability org.apereo.cas:cas-server-core-api-configuration-model:6.2.0 declares a component, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
          - Variant 'runtimeElements' capability org.apereo.cas:cas-server-core-api-configuration-model:6.2.0 declares a runtime of a component, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
   > Could not resolve org.apereo.cas:cas-server-core-configuration-metadata-repository:6.2.0.
     Required by:
         unspecified:unspecified:unspecified
      > No matching variant of org.apereo.cas:cas-server-core-configuration-metadata-repository:6.2.0 was found. The consumer was configured to find a runtime of a component compatible with Java 8, packaged as a jar, and its depende
ncies declared externally but:
          - Variant 'apiElements' capability org.apereo.cas:cas-server-core-configuration-metadata-repository:6.2.0 declares a component, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
          - Variant 'runtimeElements' capability org.apereo.cas:cas-server-core-configuration-metadata-repository:6.2.0 declares a runtime of a component, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.4/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 987ms

F:\cas-overlay-template-6.2.1>gradlew.bat clean build

FAILURE: Build failed with an exception.

* Where:
Build file 'F:\cas-overlay-template-6.2.1\build.gradle' line: 76

* What went wrong:
A problem occurred evaluating root project 'cas'.
> Could not resolve all artifacts for configuration 'classpath'.
   > Could not resolve org.apereo.cas:cas-server-core-api-configuration-model:6.2.0.
     Required by:
         unspecified:unspecified:unspecified
      > No matching variant of org.apereo.cas:cas-server-core-api-configuration-model:6.2.0 was found. The consumer was configured to find a runtime of a component compatible with Java 8, packaged as a jar, and its dependencies decl
ared externally but:
          - Variant 'apiElements' capability org.apereo.cas:cas-server-core-api-configuration-model:6.2.0 declares a component, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
          - Variant 'runtimeElements' capability org.apereo.cas:cas-server-core-api-configuration-model:6.2.0 declares a runtime of a component, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
   > Could not resolve org.apereo.cas:cas-server-core-configuration-metadata-repository:6.2.0.
     Required by:
         unspecified:unspecified:unspecified
      > No matching variant of org.apereo.cas:cas-server-core-configuration-metadata-repository:6.2.0 was found. The consumer was configured to find a runtime of a component compatible with Java 8, packaged as a jar, and its depende
ncies declared externally but:
          - Variant 'apiElements' capability org.apereo.cas:cas-server-core-configuration-metadata-repository:6.2.0 declares a component, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
          - Variant 'runtimeElements' capability org.apereo.cas:cas-server-core-configuration-metadata-repository:6.2.0 declares a runtime of a component, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.4/userguide/command_line_interface.html#sec:command_line_warnings

提示jdk版本不匹配 我就很奇怪 刚开始我就配置了open_jdk  在setting和 projectstructure中   还有环境变量  应该是没问题的啊

后面仔细一看 gradle.bat这个命令  在cas6.2.0根目录下。  里面有9个JAVA_HOME    由于我之前的项目要用到jdk1.8 所以我找了个可以兼容的方法  创建了个JAVA_HOME_OPEN  在path里进行切换  结果这边读取的还是JAVA_HOME 所以出问题  我就把里面的 JAVA_HOME全改成JAVA_HOME_OPEN 就开始下一步了

ps:最后为了避免麻烦 我选择在terminal窗口执行以下语句直接切换 其中两个各自指向jdk11的配置地址,并且该配置只会在当前窗口生效 就不用去改什么路径或切换jdk了

set java_home=%JDK11%
set jre_home=%JRE_HOME_11%

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

cas 6.2 Incompatible because this component declares an API of a component compatible with Java 11 的相关文章

随机推荐

  • 常用各类数据集

    原文链接 xff1a http homepages inf ed ac uk rbf CVonline Imagedbase htm CVonline xff1a 图像数据库 Google直译的结果 xff0c 希望对大家有帮助 按主题索引
  • vnc无画面的解决方法

    网上看到了很多vnc配置文件 xff0c 例如安装xfce后 xff0c 只需要几行代码 xff0c 就可以正常显示画面 而自己实际操作的时候 xff0c 发现怎么弄都是白屏 xff0c 没有窗口 xff0c 非常困惑 经过了一段时间的折腾
  • 打造基于 VNC 的 Ubuntu 20.04 的远程桌面

    VNC server B站视频 打造基于 VNC 的Ubuntu 20 04远程桌面 https www bilibili com video BV1nV41147dt spm id from 61 333 999 0 0 1 安装 VNC
  • “Top-down”---至顶向下的设计方法

    Top down 至顶向下的设计方法 曾经看到有人说 xff0c 人活着的过程就是在不断地解决问题的过程 我觉得这句话很有道理 xff0c 从年幼时的牙牙学语 xff0c 到学习阶段的各种作业 xff0c 当然还有各种编程难题 xff0c
  • linux与其他操作系统文件共享方法

    大家好 xff0c 我是加摩斯 xff0c 觉得文章有帮助的小伙伴 xff0c 记得一键三连哟 xff5e 申明 xff1a 原创 xff0c 转载前请与我沟通 前言 xff1a 我将Linux文件共享的方法分为以下几类 xff1a 1 x
  • 树莓派4B安装 Ubuntu20.04 + ROS Noetic 踩坑记录

    写在开头 本文记录了给一台树莓派4B配置ROS开发环境的全部操作过程 xff0c 和在实际操作过程中遇到的各种问题的解决方法 xff0c 希望对有相同需求的小伙伴们有帮助 本文的目标是直接在树莓派上开发ROS xff0c 因而在安装时与目标
  • python输出格式—format方法

    format方法 format 功能很强大 xff0c 它把字符串当成一个模板 xff0c 通过传入的参数进行格式化 xff0c 并且使用大括号 作为特殊字符代替C语言中的 位置映射 print 34 34 format 39 123 39
  • python 字符串详解(附案例)

    目录 什么是python字符串 如何表示一个字符串 字符串的访问 print xff08 xff09 索引 for循环 打印字符 end 切片split 范围选择符 n m 字符串长度 使用len xff08 xff09 函数 replac
  • SQL语言多表查询

    多表查询的基础是单表查询 xff0c 一些基本的语句都在单表查询中介绍过了 目录 主外键相等链接 xff08 两个表 xff09 join链接 xff08 两个表 xff09 子查询 xff08 两个表 xff09 自链接 xff08 两个
  • resize 详细讲解 C++

    resize 函数 是一个替换字符串长度的函数 xff0c 有两个重载函数 xff0c 第一个参数都是替换之后的大小 xff0c 第二个为替换的字母 include lt iostream gt include lt string gt u
  • C++内联函数 如何使用、优缺点

    将inline写在函数之前就成了内联函数 内联函数适用于 频繁调用的小函数 xff08 语句简单 xff09 内联函数的优点 内联函数是为了取代C语言中的宏而存在的 因为宏比较不好写 xff08 被括号和分号支配的恐惧 xff09 宏不能调
  • C++ 类和对象(上) 访问限定符 域操作符 this指针 类的定义

    访问限定符 public xff1a 在类外可以直接被访问 private xff1a 在类外不可以直接被访问 protected xff1a 在类外不可以直接被访问 class 的默认访问权限为private xff0c strict 的
  • C++ 类与对象(中)构造函数 析构函数

    构造函数 什么是构造函数 C 43 43 是基于C的基础上的 xff0c 但是为了提升C 语言 xff0c C 43 43 在类中引用了构造函数 构造函数是为了将类初始化 构造函数的特点 1 名字与类名相同 2 创建类类型对象时由编译器自动
  • mysql: failed to connect to localhost:3306

    mysql failed to connect to localhost 3306 这个问题是因为mysql的特定服务没有开启 xff0c 客户端通过网络发起请求自然是登陆不上的 解决方法 打开windows服务管理器 xff0c 找到my
  • 命令行模式安装VisualStudio

    命令行模式安装VisualStudio 今天远程安装VisualStudio2019遇到神奇bug xff0c installer运行后完全透明 xff0c 根本无法界面上配置安装 xff0c 还好找到了命令行模式 首先下载 exe 这里选
  • Ubuntu 设置中文语言环境

    点击右上角的齿轮形状的按钮 xff0c 然后选择System Settings 点击进入 会显示有语言需要安装 点击install 再次当前用户输入密码 xff0c 显示安装过程中 点击 install remove languages 选
  • reduceSum记录

    reduceSum 算子实现版本记录总结 第一版 global void reduceSum float input float result const int size int x 61 blockIdx x blockDim x 43
  • OSError: [WinError 10048]

    系统可用端口在短时间内被耗尽 xff0c 解决办法是设置更多的可用端口 xff0c 或者减少端口冷却时间 原文链接 xff1a https help socketlabs com docs how to fix error only one
  • java.sql.SQLException: not support oracle driver 8.0

    最近在研究开源项目 导入项目发现了这个问题 但是网上都是java sql SQLException not support oracle driver 1 0 所以找不到合适的解决方式 后面又检查了一遍 发现数据库连接从mysql换成ora
  • cas 6.2 Incompatible because this component declares an API of a component compatible with Java 11

    最近用到cas6 2的项目 配置基本按下面的来 其中配置jdk什么的都是百度的 使用cas overlay template 6 2服务部署到整合cas client 爱学习的老王的博客 CSDN博客 cas overlay 但是导包出现国