Skip to content
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

jacoco-report-aggregation plugin misses versions during resolution when io.spring.dependency-management plugin is used #24645

Open
rkrisztian opened this issue Apr 5, 2023 · 6 comments

Comments

@rkrisztian
Copy link

When I use the jacoco-report-aggregation plugin together with the io.spring.dependency-management plugin, and execute gw testCodeCoverageReport, I get the following error:

Execution failed for task ':testCodeCoverageReport'.
> Could not resolve all files for configuration ':allCodeCoverageReportClassDirectories'.
   > Could not find org.springframework.boot:spring-boot-starter:.
     Required by:
         project : > project :demo-common
         project : > project :demo-subproject

Expected Behavior

There should be no resolution issues just by introducing the JaCoCO report aggregation plugin in a Spring Boot project.

Current Behavior

See error above.

Context

My company develops Spring Boot applications. One of the major problems I am having is figuring out the most ideal configuration for a JaCoCo report that does not miss coverage when tests cover code across subprojects, and is compatible with SonarQube. While I found one that works (and explained everything at #8881 (comment)), it would be better to use a configuration that requires less code and is probably more future proof, i.e., by using the jacoco-report-aggregation plugin. But right now I'm stuck midway at reaching that solution because of resolution issues.

It's not just my problem. See https://stackoverflow.com/questions/73727598/jacoco-report-aggregation-plugin-spring-dependency-management where others faced a similar issue. Their workaround they found was to use specific versions, which I don't want to enforce on my company's projects.

Steps to Reproduce

See demo project aggregation-bug.zip.
Type gw testCodeCoverageReport.
(Sorry next time I'll try out the Gradle issue reproducer.)

Your Environment

Linux with Azul JDK 17, but shouldn't matter much.

@jbartok
Copy link
Member

jbartok commented Apr 7, 2023

Thank you for your interest in Gradle!

Your issue appears to be a question about how to use Gradle. Your question might be answered in Gradle documentation or on our community Slack or forums. Find links to these resources on help.gradle.org.

If you think you have come across a Gradle bug, please file a new issue describing the problem and how to reproduce it.

If you think Gradle is missing a feature, please file a new issue describing your use case for the feature.


This falls into the court of the Spring Dependency Management plugin. Please raise the issue with them.

@jbartok jbartok closed this as not planned Won't fix, can't repro, duplicate, stale Apr 7, 2023
@jbartok jbartok added closed:question usage question or request for help and removed a:bug to-triage labels Apr 7, 2023
@rkrisztian
Copy link
Author

@jbartok where did you get the idea that I was asking a question?

If you think you have come across a Gradle bug, please file a new issue describing the problem and how to reproduce it.

That is exactly what I did.

@jbartok
Copy link
Member

jbartok commented Apr 7, 2023

This is not a generic Gradle issue, but specific to the Spring Dependency Management plugin, hosted here. That's the repo you need to file your issue at.

@rkrisztian
Copy link
Author

OK, thanks. Opened spring-gradle-plugins/dependency-management-plugin#353 .

@mwisnicki
Copy link

This is not a generic Gradle issue, but specific to the Spring Dependency Management plugin, hosted here. That's the repo you need to file your issue at.

@jbartok according to maintainer of that plugin this is an issue with jacoco-report-aggregation -> see the very end of spring-gradle-plugins/dependency-management-plugin#353 (comment)

Can you reopen this ticket?

@big-guy
Copy link
Member

big-guy commented Apr 1, 2024

@rkrisztian could you try this on the latest Gradle release? We changed the way we resolve dependencies for source directories in 8.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants