-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
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"));