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

Artifacts from dependencyManagement imported pom not resolved

    XMLWordPrintable

    Details

    • Steps to Reproduce:
      Hide

      Launch jboss as 7.1.1.Final on localhost, listening on the default management port 9999

      mvn test

      edit DemoTest.java to comment 'String SEAM_SECURITY_ARTIFACT' and uncomment the alternative definition.

      mvn test

      Show
      Launch jboss as 7.1.1.Final on localhost, listening on the default management port 9999 mvn test edit DemoTest.java to comment 'String SEAM_SECURITY_ARTIFACT' and uncomment the alternative definition. mvn test

      Description

      ShrinkWrap's Maven Dependency Resolver (version 1.0.0-beta-5, also tested with 1.0.0-beta-6) fails to resolve artifacts where the version is specified by an imported bom in the dependencyManagement section, or where the artifact isn't in central even if it's in a repo listed by the project's pom.xml.

      See the attached self contained test case. Examine DemoTest.java; you'll see two different artifact co-ordinates for Seam 3 Security, neither of which works. The project's pom finds seam 3 security fine via the imported seam 3 bom, but the shrinkwrap dependency resolver doesn't even after loading the project's pom.xml via configureFrom(...) .

      If I use the co-ordinates:
      org.jboss.seam.security:seam-security
      ShrinkWrap fails with:
      java.lang.IllegalArgumentException: Bad artifact coordinates, expected format is <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>

      if I specify a version explicitly (which shouldn't be necessary since it's in the seam 3 bom imported via dependencyManagement) it instead says it can't find the artifact in Central, even though the jboss repo is listed in pom.xml:

      org.jboss.seam.security:seam-security:3.1.0.Final

      produces:

      org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact org.jboss.seam.security:seam-security:jar:3.1.0.Final in central (http://repo1.maven.org/maven2)

        Attachments

          Activity

            People

            Assignee:
            kpiwko Karel Piwko
            Reporter:
            ringerc_jira Craig Ringer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: