Uploaded image for project: 'ShrinkWrap Resolvers'
  1. ShrinkWrap Resolvers
  2. SHRINKRES-271

Maven dependency resolution is not reactor-aware

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 2.2.6
    • maven
    • None
    • Hide

      Run

              org.jboss.shrinkwrap.resolver.api.maven.Maven.resolver()
                      .loadPomFromFile(definitionFile.toFile())
                      // See https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope
                      .importDependencies(ScopeType.COMPILE, ScopeType.RUNTIME, ScopeType.IMPORT, ScopeType.SYSTEM)
                      .resolve()
                      .withTransitivity()
                      .asFile()
      

      on https://github.com/ccavanaugh/jgnash/blob/df4d6a6d2d25a2583ed7afbad1a0d1737bcbc6db/jgnash-core/pom.xml, which gives

      WARNING: Failed downloading jgnash/jgnash-resources/2.30.0/jgnash-resources-2.30.0.pom from file://C:\Users\sebastian\Development\GitHub\jgnash\jgnash-core/../repository/. Reason: 
      org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact jgnash:jgnash-resources:pom:2.30.0 in jgnash-local (file://C:\Users\sebastian\Development\GitHub\jgnash\jgnash-core/../repository)
      

      I'd expect that jgnash-resources can be found as it's part of the reactor.

      Show
      Run org.jboss.shrinkwrap.resolver.api.maven.Maven.resolver() .loadPomFromFile(definitionFile.toFile()) // See https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope .importDependencies(ScopeType.COMPILE, ScopeType.RUNTIME, ScopeType.IMPORT, ScopeType.SYSTEM) .resolve() .withTransitivity() .asFile() on https://github.com/ccavanaugh/jgnash/blob/df4d6a6d2d25a2583ed7afbad1a0d1737bcbc6db/jgnash-core/pom.xml , which gives WARNING: Failed downloading jgnash/jgnash-resources/2.30.0/jgnash-resources-2.30.0.pom from file: //C:\Users\sebastian\Development\GitHub\jgnash\jgnash-core/../repository/. Reason: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact jgnash:jgnash-resources:pom:2.30.0 in jgnash-local (file: //C:\Users\sebastian\Development\GitHub\jgnash\jgnash-core/../repository) I'd expect that jgnash-resources can be found as it's part of the reactor.

      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.

              Unassigned Unassigned
              sschuberth Sebastian Schuberth (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: