maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aslak Knutsen (JIRA)" <>
Subject [jira] (SUREFIRE-569) There should be a way to run unit tests from a dependency jar.
Date Sun, 13 Jan 2013 14:35:13 GMT


Aslak Knutsen commented on SUREFIRE-569:

I attempted to change as little existing code as possible to avoid any conflict. (Basically
only extracted some of the DirectoryScanner 'util' methods into ScannerUtil for reuse in DependencyScanner).

One little challenge with this now tho, is that even tho DependencyScanner and DirectoryScanner
use the same includes/excludes/test expressions, they don't share the actual matcher logic.
The Surefire DirectoryScanner hands of the matching to and I found
no easy way to reuse that logic. Both DirectoryScanner and DependencyScanner in the end use
MatchPatterns, but DirectoryScanner use it via

Another oddity is the 'merging' of the DependecyScanner and DirectoryScanner results. Didn't
want to change DefaultScannerResult, but maybe add a method for merge/append or similar to
DefaultScannerResult would be better.
List combined = new ArrayList();
scan = new DefaultScanResult(combined);
> There should be a way to run unit tests from a dependency jar.
> --------------------------------------------------------------
>                 Key: SUREFIRE-569
>                 URL:
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Paul Gier
>         Attachments: SUREFIRE-569.patch
> In some cases it would be useful to have a set of tests that run with various dependency
configurations.  One way to accomplish this would be to have a single project that contains
the unit tests and generates a test jar.  Several test configuration projects could then consume
the unit tests and run them with different dependency sets.  The problem is that there is
no easy way to run tests in a dependency jar.  The surefire plugin should have a configuration
to allow me to run all or a set of unit tests contained in a dependency jar.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message