You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Advice for :jpa
Unused dependencies which should be removed:
testImplementation(libs.java.tools)
To Reproduce
sorry, I haven't created a minimal reproducer, I actually can't imagine with this being the only case I see right now what would cause it. Here's the pointers to the code, but to use the repo you'll have to follow the instructions to set up github packages.
However, if you want to look at test as separate "Module", this is counterintuitive. But it depends on how you look at test in your project.
There is a proposal to make this configurable (#900). Meaning, the plugin could introduce an option do disable this special treatment of test. Please have a look at that issue.
Note: This has nothing to do with JPMS. It's the same behavior for any Jar.
Hmm... except Initializer is a compileOnly annotation. So I think the problem is that its scope as implementation is wrong. Sorry, I didn't notice it said "implementation" for that in its detection.
annotations are weird, and a bit obnoxious, because even if an annotation were to describe itself as runtime that doesn't mean it should be exposed via api... some annotations like jspecify does that so that runtime tools like spotbugs can see them, but they aren't used beyond tests usually, not real runtime (imho). In this case though I believe this is appropriately defined as a compile only since I didn't specify runtime retention.
Build scan link
https://scans.gradle.com/s/5ox43obbapdui
Plugin version
1.31.0
Gradle version
(Optional)
reason
output for bugs relating to incorrect adviceDescribe the bug
So even the reason here implies that it knows I need
testImplementation
but then I get this
To Reproduce
sorry, I haven't created a minimal reproducer, I actually can't imagine with this being the only case I see right now what would cause it. Here's the pointers to the code, but to use the repo you'll have to follow the instructions to set up github packages.
build scan was taken with this commented out https://github.com/xenoterracide/spring-app-commons/blob/ea49791ed7597642e7aca910a9a0203c8b6fb806/build.gradle.kts#L35-L41
this is where the import for the module being complained about is used
https://github.com/xenoterracide/spring-app-commons/blob/ea49791ed7597642e7aca910a9a0203c8b6fb806/module/jpa/src/test/java/com/xenoterracide/jpa/FooAggregate.java#L6
and obviously this is needed at runtime
https://github.com/xenoterracide/spring-app-commons/blob/ea49791ed7597642e7aca910a9a0203c8b6fb806/module/jpa/src/test/java/com/xenoterracide/jpa/FooAggregate.java#L56
Expected behavior
module is not unused.
Additional context
I wonder if it has anything to do with usage of JPMS, or if it has something to do with this using a "3rd party" repo.
The text was updated successfully, but these errors were encountered: