[shrinkwrap-issues] [JBoss JIRA] (SHRINKRES-271) Maven dependency resolution is not reactor-aware

Sebastian Schuberth (JIRA) issues at jboss.org
Tue May 16 03:18:00 EDT 2017


    [ https://issues.jboss.org/browse/SHRINKRES-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406747#comment-13406747 ] 

Sebastian Schuberth commented on SHRINKRES-271:
-----------------------------------------------

Hi [~mjobanek], I just checked running "mvn dependency:tree" from the "jgnash-resources" module directory, and it works just fine.

However, I guess what you meant anyway was that running "mvn dependency:tree" from the "jgnash" root directory would not work. And indeed you're right, by default it does not:

{code}
[ERROR] Failed to execute goal on project jgnash-core: Could not resolve dependencies for project jgnash:jgnash-core:jar:2.30.0: Could not transfer artifact jgnash:jgnash-resources:jar:2.30.0 from/to maven.jenkins-ci.org (http://maven.jenkins-ci.org:8081/content/repositories/releases/): Connect to maven.jenkins-ci.org:8081 [maven.jenkins-ci.org/199.193.196.24] failed: Connection timed out: connect -> [Help 1]
{code}

But the point is, as described in the link from my original post, that this is a bug / limitation in the Maven command line tool. There is no technical reason why Maven would not be able to resolve local module dependencies from the same reactor. You can work around this limitation in the Maven command line tool by using "mvn compile dependency:tree". Note that "compile" in here is just a dummy command, we are not really interested in or require the project to be compiled. In particular it does not deploy the artifacts from the local modules to the local Maven directory. Still, printing the dependency tree works now.

So, IMO Shrinkwrap should be able to handle this case, too, but without the work-around required for the Maven command line tool.

> Maven dependency resolution is not reactor-aware
> ------------------------------------------------
>
>                 Key: SHRINKRES-271
>                 URL: https://issues.jboss.org/browse/SHRINKRES-271
>             Project: ShrinkWrap Resolvers
>          Issue Type: Bug
>          Components: maven
>    Affects Versions: 2.2.6
>         Environment: Windows 10 64-bit
>            Reporter: Sebastian Schuberth
>
> Maven dependency resolution does not seem to be reactor-aware in the sense that inter-module dependencies in a multi-module project are not resolved properly unless they are manually installed in the local Maven cache.
> The general problem when using the Maven command line tool is well described at http://stackoverflow.com/questions/1677473/maven-doesnt-recognize-sibling-modules-when-running-mvn-dependencytree.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the shrinkwrap-issues mailing list