krosenvold
krosenvold

Reputation: 77181

What is the format of the Maven Surefire plug-in <include> statement?

I'm trying to run Maven Surefire with an include statement of:

<include>**/[A-R]*SeleniumTest.java</include>
<include>**/[A-R]**SeleniumTest.java</include>
<include>**/[A-R].*SeleniumTest.java</include>

But it does not seem to support any of these notations. What is the syntax of this expression? (Documentation link would be much appreciated)

Upvotes: 5

Views: 1491

Answers (2)

blahspam
blahspam

Reputation: 951

The Maven Surefire Plugin follows the same semantics for configuring includes and excludes as Maven's FileSets.

You can find some details on how that works via Maven: The Definitive Guide (Section 12.7):

The includes section uses a list of include elements, which contain path patterns. These patterns may contain wildcards such as '**' which matches one or more directories or '*' which matches part of a file name, and '?' which matches a single character in a file name

Upvotes: 6

Clay
Clay

Reputation: 3010

The patterns used by maven's include tags follow the behavior of Ant's Pattern notation.

The [A-R] notation in your example is not supported, but you could use a combination of includes and excludes to narrow down the set of tests that get run.

Upvotes: 3

Related Questions