Tuesday, September 27, 2011

How to use Shrinkwrap MavenDependencyResolver

If you use Maven to build your application and you want to test it with Arquillian, Be sure that you will be looking for a way to include some of your libraries (artifact) from Maven into your archive file (war, ear...).

In this article we show you how to use the Shrinkwrap MavenDependencyResolver to read artifact from pom file using the maven setting file.

For this purpose you just need to add your maven setting file in a folder mvn_settings under src/test/ressources and add this entry in your @Deployment method !

.addAsLibraries(DependencyResolvers.use(MavenDependencyResolver.class)
.configureFrom("src/test/resources/mvn_settings/settings.xml")
.artifact("GROUPID:ARTIFACTID:TYPE:VERSION")
.resolveAs(GenericArchive.class))


For further details about Resolver extension in ShrinkWrap, refer to: https://github.com/shrinkwrap/resolver

1 comment:

  1. All Heat Shrink Wrap Products On Sale! ... Common plastics used to produce heat shrink wrap are: polyolefin, PVC, and polypropylene. ... Anything from centerfold shrink wrap, shrink tubing, shrink bags, or even marine shrink wrap rolls can be considered heat shrink wrap.

    Pressurized Welding Enclosure Habitat
    How To Do Safe Hot Work
    Heat Shrink Wrap For Scaffolding
    Hot Work Safety Solutions
    Positive Pressure Habitat

    ReplyDelete