ShrinkWrap Resolver 2.1.0 Released

Since we wrote this post we didn't laze around. Check our latest announcement.

The Arquillian team is proud to announce the 2.1.0 release of the ShrinkWrap Resolver component!

The ShrinkWrap Resolver 2.1.0 release brings you support for Maven 3.1.0, additional features and improvements to the configuration API.

Significant additions in ShrinkWrap Resolver 2.1.0

Support for Maven 3.1.0 and newer

This release was updated to use Eclipse Aether, which makes it compatible with Maven 3.1.0 and newer. ShrinkWrap Resolver Maven Plugin now requires you to run it with a recent Maven version, other components are compatible with previous Maven version as well. I’d like to thank Tomaž Cerar and Michał Matłoka for making this update possible.

API for defining Maven repositories

ShrinkWrap Resolver now allows you to specify Maven repositories directly in code. These repositories always have priority. For instance, if there is a repository with the same id defined anywhere in setting.xml or pom.xml, this definition will override it. Kudos for this feature goes to Marc-Antoine Gouillart!

Maven.configureResolver()
    .withRemoteRepo("my-repository-id", "url://to/my/repository", "layout")
    .resolve("G:A:V").withTransitivity().asFile();
Maven.configureResolver()
    .withRemoteRepo(
        MavenRemoteRepositories.createRemoteRepository(
            "my-repository-id", "url://to/my/repository", "layout"))
    .resolve("G:A:V").withTransitivity().asFile(); 
Configuration API updates

In the past, methods that modified resolution sources, such as withClassPathResolution(boolean) or withMavenCentralRepo(boolean) were enabled too late in the resolution chain, namely if you loaded a pom.xml file before, it was always loaded using default settings. To make setup clearer, configuration related methods were moved to Maven.configureResolver() API instead. The biggest advantage of this API is that it influences all resolution calls, including the ones needed for construction of pom.xml model.

Maven.configureResolver()
    .workOffline()
    .withCentralRepo(false)
    .withClasspathResolution(true)
    .loadPomFromFile("/path/to/pom.xml")
    .resolve("G:A").withTransitivity().asFile(); 

While previous methods are still working, they are marked as deprecated. Please update your tests.

We hope that you’ll enjoy our new stuff and look forward to hear your feedback in the community forums.

What is ShrinkWrap Resolver?

The ShrinkWrap Resolvers project provides a Java API to obtain artifacts from a repository system. This is handy to include third party libraries available in any Maven repository in your test archive. ShrinkWrap Resolvers additionally allow you to reuse all the configuration you've already specified in the Maven build file, making packaging of an application archive much easier job.

Release details

Component ShrinkWrap Resolver
Version 2.1.0 view tag
Release date 2014-03-16
Released by Karel Piwko
Compiled against
  • JUnit – 4.11

Published artifacts org.jboss.shrinkwrap.resolver

  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-bom pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api-maven jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-depchain pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-impl-maven jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api-maven-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-spi-maven jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-spi-maven-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-impl-maven-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-spi jar javadoc pom

Release notes and resolved issues 12

Updating Aether to suport Maven 3.1.0 and newer

Component Upgrade
Enhancement
  • SHRINKRES-5 - Make it easier to add a maven repository with the maven resolvers
  • SHRINKRES-26 - Make Shrinkwrap resolver work in a modular environment
  • SHRINKRES-169 - Replace deprecated Assert code
Feature Request
  • SHRINKRES-164 - Support encoding property from Maven compiler plugin
Bug
Task

Thanks to the following list of contributors: Karel Piwko, Andrew Lee Rubinger, Michal Matloka, Marc Antoine Gouillart, Tomaz Cerar