-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test-jar dependency type is not properly handled with Gradle #1159
Comments
@williamsuane thanks for the report. With the help of @wilkinsona, we've been reminded that Maven handles certain dependency type with "magic strings", see the documentation. To make things consistent between the two model we may need to handle these too considering that type is a shared attribute between the two models. |
So that works but, unfortunately, requesting the jar without a type fails as the dependency is not found in the bom. It is declared like this (correctly according to Maven): <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream</artifactId>
<version>${spring-cloud-stream.version}</version>
<type>test-jar</type>
<scope>test</scope>
<classifier>test-binder</classifier>
</dependency> With the following:
Ignoring the type won't fix this issue as we need to definition to match what's in the bom. |
I'm a bit surprised that doesn't work. We could probably fix it with a change in the dependency management plugin. It would also be interesting to know how it behaves when using Gradle's Platform support. |
I've just came across the same issue with a project I am working on which uses SpringBoot and SpringCloud with maven. Adding the dependency on the test binder jar in this manner:
results in that maven picking up the default classifier for
Now, removing the
Adding a version, then fixes everything and the correct jar is downloaded from Maven Central
And we get a |
Any updates on this one? |
@dinvlad this issue has all the latest update. We don't have time to work on this at the moment, I am afraid. |
Gradle project with spring-cloud-stream does not build, Mockito dependency fails on build due to "org.springframework.cloud:spring-cloud-starter-config" Any updates on this ? |
I tried the solution provided by @HackerTheMonkey for spring boot 3 and spring cloud v2022.0.0 when updating a project but ran into the same issue:
|
Generating new Gradle projects that contains
testImplementation("org.springframework.cloud:spring-cloud-stream:test-binder@test-jar")
fails with the following message when buildingHow 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")
byThe text was updated successfully, but these errors were encountered: