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

3 篇文章 0 订阅
2 篇文章 0 订阅

最近用到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%

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
A problem occurred configuring root project '��ҵ'. > Could not resolve all artifacts for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.1.0. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.1.0 > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.1.0 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally but: - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.1.0 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 8 - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.1.0 declares a runtime of a component, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.1.0 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 8 - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.1.0 declares a runtime of a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 8 - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.1.0 declares a runtime of a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 8 - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.1.0 declares a runtime of a component, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) * 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.
05-31

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值