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

Resolve from pom.xml: old version is picked

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.2.1
    • 2.1.1
    • None
    • None

    Description

      With a pom.xml including the following dependencies the resulting archive contains spring-aop-4.1.7.RELEASE.jar, although I expect version 4.2.1 to be included. The latter is what maven does on the command line. I have the same issue with spring-beans, spring-context, spring-core, and spring-expression.

      File[] libs = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeAndTestDependencies().resolve().withTransitivity().asFile();
      webArchive.addAsLibraries(libs);

      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>4.2.1.RELEASE</version>
      </dependency>
      <dependency>
      <groupId>org.springframework.data</groupId>
      <artifactId>spring-data-jpa</artifactId>
      <version>1.9.0.RELEASE</version>
      </dependency>

      Attachments

        Activity

          People

            mjobanek Matous Jobanek
            c-otto Carsten Otto (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: