redhat-developer / redhat-developer/vscode-java
No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.6 was found
Personne n'a encore pris cette issue.
- Langage dominant
- TypeScript
- Étoiles
- 2.3k
- Forks
- 546
- Merge moyen
- 20 h 1 min
- PR mergées (30 j)
- 11
Description
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
- Go to https://start.spring.io/
- 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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par reproduire le projet Spring Initializr Gradle-Groovy dans VS Code avec Debian 11, JDK 17 et la version d’extension indiquée. Vérifiez pourquoi le Gradle consumer demande Java 11 alors que Spring Boot 3.0.6 requiert Java 17 ; le travail est terminé lorsque le projet généré s’ouvre sans le variant-resolution error.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java, spring-boot, vscode
- Domaine
- build-system, developer-experience, tooling
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 25/100