[
https://issues.apache.org/jira/browse/MDEP-471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Herve Boutemy updated MDEP-471:
-------------------------------
Description:
It is possible to get the depedency plugin to fail to recognize methods
references.
For example, the following function declaration is the only place in its class
where the Guava "Lists" class is referenced (apart from imports):
{code:java}
public static <V> SequenceMap<String, Character, V> forStringKeys() {
return new SequenceMap<>(Lists::charactersOf);
}
{code}
We choose to fail when declared dependencies are thought to be unused, and this
usage is simply not detected, resulting in the following output and exception:
{noformat}
[WARNING] Unused declared dependencies found:
[WARNING] com.google.guava:guava:jar:18.0:compile
[INFO] ------------------------------------------------------------------------
Caused by: org.apache.maven.plugin.MojoExecutionException: Dependency problems
found
at
org.apache.maven.plugin.dependency.analyze.AbstractAnalyzeMojo.execute(AbstractAnalyzeMojo.java:187)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
{noformat}
Will try to get a test and patch attached to this once I figure out where your
test case class file resources are coming from.
was:
It is possible to get the depedency plugin to fail to recognize methods
references.
For example, the following function declaration is the only place in its class
where the Guava "Lists" class is referenced (apart from imports):
public static <V> SequenceMap<String, Character, V> forStringKeys() {
return new SequenceMap<>(Lists::charactersOf);
}
We choose to fail when declared dependencies are thought to be unused, and this
usage is simply not detected, resulting in the following output and exception:
[WARNING] Unused declared dependencies found:
[WARNING] com.google.guava:guava:jar:18.0:compile
[INFO] ------------------------------------------------------------------------
Caused by: org.apache.maven.plugin.MojoExecutionException: Dependency problems
found
at
org.apache.maven.plugin.dependency.analyze.AbstractAnalyzeMojo.execute(AbstractAnalyzeMojo.java:187)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
Will try to get a test and patch attached to this once I figure out where your
test case class file resources are coming from.
> Java 8 Method references are not detected
> -----------------------------------------
>
> Key: MDEP-471
> URL: https://issues.apache.org/jira/browse/MDEP-471
> Project: Maven Dependency Plugin
> Issue Type: Bug
> Components: analyze
> Affects Versions: 2.9
> Environment: Mac OSX
> 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014;
> root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
> Reporter: Ben Hardy
> Assignee: Karl Heinz Marbaise
> Priority: Major
> Fix For: 3.0.1
>
>
> It is possible to get the depedency plugin to fail to recognize methods
> references.
> For example, the following function declaration is the only place in its
> class where the Guava "Lists" class is referenced (apart from imports):
> {code:java}
> public static <V> SequenceMap<String, Character, V> forStringKeys() {
> return new SequenceMap<>(Lists::charactersOf);
> }
> {code}
> We choose to fail when declared dependencies are thought to be unused, and
> this usage is simply not detected, resulting in the following output and
> exception:
> {noformat}
> [WARNING] Unused declared dependencies found:
> [WARNING] com.google.guava:guava:jar:18.0:compile
> [INFO]
> ------------------------------------------------------------------------
> Caused by: org.apache.maven.plugin.MojoExecutionException: Dependency
> problems found
> at
> org.apache.maven.plugin.dependency.analyze.AbstractAnalyzeMojo.execute(AbstractAnalyzeMojo.java:187)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> {noformat}
> Will try to get a test and patch attached to this once I figure out where
> your test case class file resources are coming from.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)