redhat-developer / redhat-developer/vscode-java

No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.6 was found

Đang mở
#3,094 13 bình luận 7 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
TypeScript
Star
2.3k
Fork
546
Merge trung bình
20 giờ 1 phút
Pull request đã merge (30 ngày)
11

Mô tả

Error when opening a new Java project generated via Spring Initializr.

Environment
  • Operating System: Debian 11
  • JDK version: JDK 17
  • Visual Studio Code version: 1.67.2
  • Java extension version: 1.18.0
Steps To Reproduce
  1. Go to https://start.spring.io/
  2. Generate a project with defaults:

Project: Gradle - Groovy
Language: Java
Spring Boot: 3.0.6
Packaging: Jar
Java: 17

[Please attach a sample project reproducing the error]
Please attach logs

Current Result

`The supplied phased action failed with an exception.
A problem occurred configuring root project 'todos'.
Could not resolve all files for configuration ':classpath'.
Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.6.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.6
No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.6 was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.6.1' but:

  • Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.6 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 11
    • Other compatible attribute:
      • Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1')
  • Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.6 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 11)
      • Doesn't say anything about its elements (required them packaged as a jar)
      • Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1')
  • Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.6 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 11
    • Other compatible attribute:
      • Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1')
  • Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.6 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 11
    • Other compatible attribute:
      • Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1')
  • Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.6 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 11
    • Other compatible attribute:
      • Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1')
  • Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.6 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 11)
      • Doesn't say anything about its elements (required them packaged as a jar)
      • Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1')`
Expected Result

No error while running Spring Boot projects generated by Spring Initializr. This works on other IDE's.

Additional Informations

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện dự án Spring Initializr Gradle-Groovy trong VS Code với Debian 11, JDK 17 và phiên bản extension được liệt kê. Kiểm tra tại sao Gradle consumer yêu cầu Java 11 trong khi Spring Boot 3.0.6 yêu cầu Java 17; hoàn tất khi dự án được tạo mở mà không gặp variant-resolution error.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java, spring-boot, vscode
Lĩnh vực
build-system, developer-experience, tooling
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.