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

resolving of maven artifacts with classifier failed

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 2.0.0-beta-3
    • 2.0.0-beta-2
    • maven
    • None

    Description

      The following code is not working:

      ArquillianTest.java
      @Deployment
      public static EnterpriseArchive createDeployment() {
          ...
          JavaArchive[] ejbModule = mavenResolver
                  .resolve("groupId:artifactId:jar:classifier")
                  .withoutTransitivity()
                  .as(JavaArchive.class);
          ...
      }
      

      The class org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenCoordinates should be able to interprete the coordinate above with the documented pattern:

      <groupId>:<artifactId>[:<packagingType>[:<classifier>]][:<version>]

      It seems, that the classifier is interpreted as version.

      The following workaround is running well:

      ArquillianTest.java
      @Deployment
      public static EnterpriseArchive createDeployment() {
          ...
          JavaArchive[] warDependenciesClientViews = mavenResolver
                  .addDependency(
                      MavenDependencies.createDependency(
                          MavenCoordinates.createCoordinate(
                              "groupId", 
                              "artifactId", 
                              null, 
                              PackagingType.JAR, 
                              "classifier"), 
                          null, 
                          false))
                  .resolve()
                  .withoutTransitivity()
                  .as(JavaArchive.class);
          ...
      }
      

      Attachments

        Activity

          People

            mmatloka Michal Matloka (Inactive)
            juergen.biersack Juergen Biersack (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: