Uploaded image for project: 'ShrinkWrap'
  1. ShrinkWrap
  2. SHRINKWRAP-379

Add method resolveAsFile to Maven shortcut API

XMLWordPrintable

      Currently to create a JavaArchive from an existing file we need something like this:

      final JavaArchive ejbJar = ShrinkWrap
              .createFromZipFile(JavaArchive.class, DependencyResolvers.use(MavenDependencyResolver.class)
                      .loadMetadataFromPom("pom.xml").artifact("com.foo:bar")
                      .resolveAsFiles(new StrictFilter())[0]);
      

      Would be cleaner to use the Maven Shortcut API:

      final JavaArchive ejbJar = ShrinkWrap
              .createFromZipFile(JavaArchive.class, Maven.withPom("pom.xml").resolveAsFile("com.foo:bar"));
      

              silenius_jira Samuel Santos (Inactive)
              silenius_jira Samuel Santos (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: