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

Maven resolver unable to resolve dependencies with explicit version


    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 2.0.0-alpha-7
    • 2.0.0-alpha-6
    • maven
    • None

      Actual version: 2.0.0-alpha-6 (not in the version drop down)

      A possible regression as similar code, using the old API, worked for me with Shrinkwrap-1.

      Example: given the following dependency in the local pom.xml:

      And the following SW-2 code:

      MavenResolverSystem resolver = Maven.resolver();

      I get the follwoing exception:

      org.jboss.shrinkwrap.resolver.api.ResolutionException: Unable to get version for dependency specified by org.powermock:powermock-api-mockito, it was not provided in <dependencyManagement> section.

      Again, this worked for me in SW-1.

      If I do in fact create a <dependencyManagement> section in the pom, and define the version there, it works as a workaround. But it would seem that an explicit <version> element in the <dependency> should be sufficient.

            kpiwko Karel Piwko
            rhn-engineering-jshaughn Jay Shaughnessy
            0 Vote for this issue
            2 Start watching this issue