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

resolving of maven artifacts with classifier failed

XMLWordPrintable

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

      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);
          ...
      }
      

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

                Created:
                Updated:
                Resolved: