test-jar dependency type is not properly handled with Gradle
See original GitHub issueGenerating new Gradle projects that contains testImplementation("org.springframework.cloud:spring-cloud-stream:test-binder@test-jar")
fails with the following message when building
Could not find org.springframework.cloud:spring-cloud-stream:test-binder.
Required by:
project :
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
How to replicate
Generate a new project Spring Boot 2.4, Java 11, Cloud Stream and Kafka Binder
Run ./gradlew build
The solution that worked was to replace testImplementation("org.springframework.cloud:spring-cloud-stream:test-binder@test-jar")
by
testImplementation("org.springframework.cloud:spring-cloud-stream") {
artifact {
name = "spring-cloud-stream"
extension = "jar"
type ="test-jar"
classifier = "test-binder"
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Multi-project test dependencies with gradle - Stack Overflow
In case you have a multi-project gradle build you may have test dependencies between sub-projects (which probably is a hint that your projects...
Read more >I can't seem to share test code between projects in a multi ...
I've tried to set up the dependencies so this works, but I'… ... either in my script or in how Gradle handles the...
Read more >Gradle Enterprise Maven Extension User Manual
The .mvn/.gradle-enterprise folder should NOT be committed under version control. ... Tags are typically used to indicate the type or class of a...
Read more >Gradle Multi-Project Builds for Maven Users - OctoPerf
Moving from Maven to Gradle is not necessarily easy, ... So, Maven pom.xml files work as some kind of bi-directional tree structure:.
Read more >Gradle dependencies | IntelliJ IDEA Documentation - JetBrains
Any dependency added to the project is managed by Gradle. The best way to add or ... it will be displayed in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dinvlad this issue has all the latest update. We don’t have time to work on this at the moment, I am afraid.
Any updates on this one?