question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

test-jar dependency type is not properly handled with Gradle

See original GitHub issue

Generating 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:open
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
snicollcommented, Dec 13, 2021

@dinvlad this issue has all the latest update. We don’t have time to work on this at the moment, I am afraid.

0reactions
dinvladcommented, Dec 13, 2021

Any updates on this one?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found