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

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

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

https://blog.csdn.net/qq_40297844/article/details/106437993

但是导包出现国外的倒不进去  翻墙都没得用 最后从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/' }

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

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

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

找包的话请看

https://blog.csdn.net/oTianKongLan123/article/details/107161648

还有下一步执行到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 就开始下一步了

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/2202.html原文链接:https://javaforall.net

赞 (2)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 所有方向你要的资料干货这都有,从入门到实战!【CSDN宝藏资料图鉴第一期】「建议收藏」

    前言CSDN是全球知名的开发者社区,创建于1999年,经过20来年的知识文档积累已然成为中文开发者的知识宝库;从基础的法入门到蜕变实战案例、从神秘前沿技术到清晰的实践步骤,可以说CSDN是你找寻资料的最佳宝库,只要你想得到,在这里就可以找得到!今天我们就来深拔一期有质量的专栏和资源,这些专栏作者可能有些是在校大学生、有些是某领域内的行内大牛,但并不影响他们的文章通俗易懂并且富有深度。从在校大学生我们看到了新一代的奋进,从领域大牛身上我们也看到了无私的技术分享,希望有质量的文章越来越多,共同为行业的进步

    2022年4月16日
  • wxPython 入门教程.

    wxPython 入门教程.这篇文章是关于wxPython,但wxPython实际是两件事物的组合体:Python脚本语言和GUI功能的wxWindows库(关于wxWindows的介绍,请参阅developerWorks上的[“细述wxWindows”](http://www.ibm.com/developerworks/cn/linux/sdk/python/wxwin/index.html))。wxWindows库是为了最大可移植性的C/C++库,而抽取GUI功能。所以wxWindow

    2022年5月11日
  • JavaSE进阶_03_接口&多态

    JavaSE进阶_03_接口&多态今日内容​ 接口【重点】​ 多态【重点】接口【重点】什么是接口当一个类中的所有的方法都是抽象方法的时候,这个类就可以定义成接口接口其实是特殊的类,比抽象类更加抽象接口是使用interface关键字定义的特殊的类接口的好处1、定义了规则:接口中的抽象方法可以认为是一种规则2、利于扩展接口的定义格式publicinterface接口名{}接口的特点1、接口不能实例化

    2022年9月6日
  • php用空格分隔字符串,分割字符串空格[通俗易懂]

    php用空格分隔字符串,分割字符串空格[通俗易懂]【java易错点】javasplit分割字符串空格问题解析Strings=”@123.com”;String[]data=s.split(“@”);//以@分割字符串,获得@后的值。运行结果如下data[0]:””;data[1]:123.com;此时,你会发现,data数组里面存储的第一个元素是一个空格…文章落雨_2012-02-14832浏览量python…

    2022年11月2日
  • Android项目ViewPager+Fragment的基本使用[通俗易懂]

    Android项目ViewPager+Fragment的基本使用[通俗易懂]Android项目ViewPager+Fragment的简单使用

    2022年7月22日
  • windows10 系统设置一键备份

    windows10 系统设置一键备份1、打开pe下优启通桌面的EIX系统安装;2、分区备份—–C盘——-新建映像文件3、选择保存路径,非C盘,重命名;4、一键备份5、确认;

    2022年6月25日

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号