maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian Leske (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MNG-5243) If a transitive dependency is missing, the error message makes it very hard to find out where it comes from
Date Mon, 21 Dec 2015 22:01:46 GMT

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

Sebastian Leske commented on MNG-5243:
--------------------------------------

[~schulte77]: Interesting, I  did not realize the information was printed in debug mode.

Maybe Maven can be changed to print that message at a higher severity if the build fails (or
just always print it as a warning). Or at least print some specific hint that the dependency
chain is output with "-X".

For starters, I'll try to add some hints to http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
. 

> If a transitive dependency is missing, the error message makes it very hard to find out
where it comes from
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-5243
>                 URL: https://issues.apache.org/jira/browse/MNG-5243
>             Project: Maven
>          Issue Type: Improvement
>            Reporter: Sebastian Leske
>            Priority: Minor
>         Attachments: dependency-bug.tgz
>
>
> If a transitive dependency cannot be resolved during the build, the build fails (so far
obviously OK). However, the error message printed does not indicate where the dependency came
from. It may have been pulled in via several layers of transitive dependencies, in that case
it is very difficult to figure out how it got included.
> Example:
> Project dependencies are: A -> B -> C. Error message during build of A, if C is
missing from the repo:
> {noformat}
> [...]
> [WARNING] The POM for dependency-bug-test:C:jar:1 is missing, no 
> dependency information available
> [INFO] -------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] -------------------------------------------
> [...]
> [ERROR] Failed to execute goal on project A: Could not resolve dependencies
> for project dependency-bug-test:A:jar:1: 
> Failure to find dependency-bug-test:C:jar:1 in 
> http://repo.maven.apache.org/maven2 was cached in the local repository,
> resolution will not be reattempted until the update interval of
> central has elapsed or updates are forced -> [Help 1]
> [...]
> {noformat}
> Note the error message gives no indication whatsoever that the missing C is required
because B depends on it. With more complex dependencies, this makes tracking down the culprit
very difficult.
> Also note that "mvn dependency:tree" does not help in this case, because it fails with
the same unhelpful error :-(.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message