ShrinkWrap Resolver 2.2.0-beta-1 Released

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

The Arquillian team is proud to announce the 2.2.0-beta-1 release of the ShrinkWrap Resolver component!

The ShrinkWrap Resolver 2.2.0-beta-1 release brings you better support for Gradle, JDK 8 usability improvemens, plenty of bugfixes and feature requests you’ve asked for. It is a major step towards 2.2.0 stable release.

Significant additions in ShrinkWrap Resolver 2.2.0-beta-1

Gradle importer

Gradle importer was already included in the alpha releases, but it is time to promote it. Gradle Importer expose functions similar to Maven Importer but instead for Gradle using the Gradle Tooling API. It includes support for multi-module projects. Kudos to Michał Matłoka for the Gradle support.


ShrinkWrap.create(EmbeddedGradleImporter.class)
  .forThisProjectDirectory().importBuildOutput().as(WebArchive.class);

ShrinkWrap.create(EmbeddedGradleImporter.class)
  .forProjectDirectory("/path/to/dir").importBuildOutput("/path/to/result/war").as(WebArchive.class);

ShrinkWrap.create(EmbeddedGradleImporter.class)
  .forProjectDirectory("/path/to/dir").forTasks("task1","task2").withArguments("arg1","arg2")
  .importBuildOutput().as(WebArchive.class);
List resolution

Finally, you can resolve artifacts as lists, not only arrays. This is handy especially with JDK8 features. Kudos to John Ament for providing this enhancement.

Maven.resolver().
    .resolve("G:A:V").withTransitivity().asList(File.class);
MavenCoordinates as output

In some cases, you might be interested in just the Maven coordinates, so you can for instance compare two dependency sets. ShrinkWrap Resolver now allows you to to do that easier then before.

Maven.resolver().
    .resolve("G:A:V).withTransitivity().as(MavenCoordinate.class);

You can obviously return coordinates as List

MavenImporter and IDEs are now friends

MavenImporter, a tool that is able to compile and package project from a pom.xml file, is now able to fork compiler process if you are not running on JDK but JRE. This change makes it even easier to run the tests from IDE.

Deprecation warning

Few configuration methods were deprecated since 2.0.0. If you are configuring resolution sources (repositories, class path resolution), offline mode and you are not using Maven.configureResolver() to get configuration API, you should update your tests. Deprecated methods will be dropped with the next release of 2.2.x stream.

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.2.0-beta-1 view tag
Release date 2014-09-21
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-gradle-embedded-archive 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-gradle-depchain pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-impl-gradle-embedded-archive jar javadoc 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 22

Enhancement
  • SHRINKRES-187 - ParsedPomFile does not expose test resources
  • SHRINKRES-205 - Try to fork and use javac from path in MavenImporter if compiler is not found
Feature Request
  • SHRINKRES-73 - Improve error message for unsupported type of dependency
  • SHRINKRES-116 - Gradle support
  • SHRINKRES-165 - Honor maven.legacyLocalRepo property
  • SHRINKRES-181 - MavenArtifactInfo is missing <optional> info
  • SHRINKRES-190 - implements equals and hashCode methods in MavenResolvedArtifactImpl / MavenArtifactInfoImpl
  • SHRINKRES-196 - FormatStage should work in a JDK8 friendly way
Bug
  • SHRINKRES-162 - Resolved file extension returned instead of packaging type in MavenResolvedArtifact
  • SHRINKRES-176 - MavenImporter archive name
  • SHRINKRES-179 - Build Fails in JDK8
  • SHRINKRES-182 - ShrinkWrap Resolver sometimes can't resolve a dependency with EJB packaging
  • SHRINKRES-183 - Resolvers.configure(Class,ClassLoader) ignores ClassLoader?
  • SHRINKRES-186 - MavenResolverSystemBase deprecates offline() but JavaDoc refer to wrong new usage
  • SHRINKRES-195 - activeProfiles element from settings.xml seems to be ignored, property override not working
  • SHRINKRES-197 - Use settings.security property to get settings-security.xml location
  • SHRINKRES-198 - maven.util.FileUtil contains System.out.println
  • SHRINKRES-200 - Wrong exception message if no service was found
  • SHRINKRES-202 - withClassPathResolution method in ConfigurableMavenResolverSystemImpl ignores parameter
  • SHRINKRES-204 - Broken filtering of archives via MavenImporter on Windows
Sub-task
Sub-requirement

Thanks to the following list of contributors: Karel Piwko, Michal Matloka, The Alchemist, Tadeas Kriz, Pawan Dubey, John D. Ament, Alex Soto