ShrinkWrap Resolver 3.0.0-beta-2 Released

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

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

In the second beta release, we introduced a possibility to run Maven build in the background (as a daemon)

EmbeddedMaven Daemon build

In some cases, you need to run a Maven build in the background. The first case is when the build itself starts some application (eg. mvn spring-boot:run). The second case is when you are building a project that is too big so can do some other operation in the meantime and let the Maven built run in the background. In these cases you can specify that the build should be used as a daemon, which means that ShrinkWrap Resolver runs the build in a new separated thread:


In the case of running some application using the Maven build, it could be useful to wait till the application is started. To do so, use one of the methods:

...useAsDaemon().withWaitUntilOutputLineMathes(".*Started Application.*").build();
...useAsDaemon().withWaitUntilOutputLineMathes(".*Started Application.*", 50, TimeUnit.SECONDS).build();

In the first case, it waits until some line matches the given regex. If there is no line matched within the default timeout (which is two minutes) then TimeoutException is thrown. The second case is the same but it sets the timeout to given value. ShrinkWrap Resolver stops the main thread and waits until some line matches the given regex and then continues. The build itself continues running as well.

In the case you need to build a huge project and let it run on the background and then come back to it later, you can use the object DaemonBuild that is returned by the method build():

DaemonBuild build = EmbeddedMaven.forProject("path/to/pom.xml").setGoals("package").useAsDaemon().build();

This object offers a methods isAlive() that says if the thread containing the Maven build is alive or not; and a method getBuiltProject() that returns an instance of BuiltProject when the thread is not alive, null otherwise.

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 3.0.0-beta-2 view tag
Release date 2017-05-18
Released by Matous Jobanek
Compiled against
  • JUnit – 4.12

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-spi jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-depchain pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api-maven 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-api-maven-embedded jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-impl-maven-embedded jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-impl-gradle jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api-gradle-embedded-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-gradle-depchain pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-impl-gradle-embedded-archive jar javadoc pom

Release notes and resolved issues 1

Feature Request
  • SHRINKRES-274 - EmbeddedMaven - Support running Maven builds in the background

Thanks to the following list of contributors: Matous Jobanek