[
https://issues.apache.org/jira/browse/MDEP-840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17647768#comment-17647768
]
Joe Barnett commented on MDEP-840:
----------------------------------
javap -c output of kotlin version:
{code:java}
Compiled from "Example.kt"
public final class mdep840.Example {
public mdep840.Example();
Code:
0: aload_0
1: invokespecial #8 // Method
java/lang/Object."<init>":()V
4: return public final void invokeBinder();
Code:
0: new #13 // class
io/dropwizard/auth/AuthValueFactoryProvider$Binder
3: dup
4: ldc #15 // class java/security/Principal
6: invokespecial #18 // Method
io/dropwizard/auth/AuthValueFactoryProvider$Binder."<init>":(Ljava/lang/Class;)V
9: pop
10: return
}
{code}
and java version:
{code:java}
Compiled from "Example.java"
class mdep840.Example {
mdep840.Example();
Code:
0: aload_0
1: invokespecial #1 // Method
java/lang/Object."<init>":()V
4: return public void invokeBinder();
Code:
0: new #7 // class
io/dropwizard/auth/AuthValueFactoryProvider$Binder
3: dup
4: ldc #9 // class java/security/Principal
6: invokespecial #11 // Method
io/dropwizard/auth/AuthValueFactoryProvider$Binder."<init>":(Ljava/lang/Class;)V
9: pop
10: return
}
{code}
but not sure that shows anything appreciably different?
> Unused declared dependencies found but dependency is used?
> -----------------------------------------------------------
>
> Key: MDEP-840
> URL: https://issues.apache.org/jira/browse/MDEP-840
> Project: Maven Dependency Plugin
> Issue Type: Bug
> Components: analyze-only
> Affects Versions: 3.4.0
> Reporter: Joe Barnett
> Priority: Major
>
> We have a class here:
> [https://github.com/trib3/leakycauldron/blob/main/testing/src/main/kotlin/com/trib3/testing/server/ResourceTestBase.kt]
>
> that imports io.dropwizard.auth.AuthValueFactoryProvider from
> io.dropwizard:dropwizard-auth, and the pom declares that dependency directly.
>
> Starting with maven-dependency-plugin 3.4.0, we now get this error when
> running the analyze-only goal:
> {code:java}
> [ERROR] Unused declared dependencies found:
> [ERROR] io.dropwizard:dropwizard-auth:jar:2.1.4:compile{code}
>
> removing the declared dependency results in the code failing to compile since
> dropwizard-auth is no longer on the classpath. This worked in 3.3.0.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)