maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Gettys (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (MDEP-560) maven-dependency-plugin ignores method references passed as parameter
Date Thu, 01 Jun 2017 19:37:04 GMT

    [ https://issues.apache.org/jira/browse/MDEP-560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16033544#comment-16033544
] 

Robert Gettys edited comment on MDEP-560 at 6/1/17 7:36 PM:
------------------------------------------------------------

I believe I'm having a similar issue.  The docs say that the plugin depends on the bytecode
generated by the test-compile phase.  

I checked the bytecode generated, and my test class' bytecode directly references my DAO class,
which directly references the datastax class from the library but, after running "mvn clean
dependency:analyze", I see the following:

[WARNING] Unused declared dependencies found:
...
[WARNING]    com.datastax.cassandra:cassandra-driver-core:jar:3.1.2:compile
...



was (Author: rgettys):
I believe I'm having a similar issue.  The docs say that the plugin depends on the bytecode
generated by the test-compile phase.  

I checked the bytecode generated, and my test class' bytecode directly references my DAO class,
which directly references the datastax class from the library but, after running ``mvn clean
dependency:analyze``, I see the following:

```
[WARNING] Unused declared dependencies found:
...
[WARNING]    com.datastax.cassandra:cassandra-driver-core:jar:3.1.2:compile
...
```

> maven-dependency-plugin ignores method references passed as parameter
> ---------------------------------------------------------------------
>
>                 Key: MDEP-560
>                 URL: https://issues.apache.org/jira/browse/MDEP-560
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: Vladimir Dergachev
>            Priority: Minor
>
> I created example for commons-lang library https://gist.github.com/vdergachev/3dd0908ec0301b1e0357005e669cc726
> My applications contains few modules, in parent pom.xml i have regular entry
> {code}
> <properties>
> <java.version>1.8</java.version>
> ...
> <properties>
> <dependencyManagement>
> <dependencies>
> ....
> <dependency>
> <groupId>commons-lang</groupId>
> <artifactId>commons-lang</artifactId>
> <version>2.6</version>
> </dependency>
> ...
> </dependencies>
> </dependencyManagement>
> {code}
> in module's pom ONLY spring deps, so i don't have commons-lang library in module dependencies,
but test runs fine. As you can see I passed reference StringUtils::isEmpty as a parameter
to method. When part 2 uncommented and method StringUtils.isEmpty called directly in code
i will have correct error message from maven-dependency-plugin
> {code}
> [INFO] — maven-dependency-plugin:3.0.0:analyze-only (analyze-dependencies)
> [WARNING] Used undeclared dependencies found:
> [WARNING] commons-lang:commons-lang:jar:2.6:compile
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message