<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Maven Surefire Plugin &#8211; My Shitty Code</title>
	<atom:link href="https://myshittycode.com/tag/maven-surefire-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>https://myshittycode.com</link>
	<description>Embracing the Messiness in Search of Epic Solutions</description>
	<lastBuildDate>Fri, 06 Jan 2023 16:53:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://myshittycode.com/wp-content/uploads/2022/04/cropped-icon-32x32.png</url>
	<title>Maven Surefire Plugin &#8211; My Shitty Code</title>
	<link>https://myshittycode.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">205304208</site>	<item>
		<title>Maven: Unable to Execute Spock Specs</title>
		<link>https://myshittycode.com/2014/07/21/maven-unable-to-execute-spock-specs/</link>
					<comments>https://myshittycode.com/2014/07/21/maven-unable-to-execute-spock-specs/#respond</comments>
		
		<dc:creator><![CDATA[Shitty Author]]></dc:creator>
		<pubDate>Mon, 21 Jul 2014 16:04:03 +0000</pubDate>
				<category><![CDATA[Programming Language]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Maven Surefire Plugin]]></category>
		<category><![CDATA[Spock]]></category>
		<guid isPermaLink="false">http://myshittycode.com/?p=520</guid>

					<description><![CDATA[<p>PROBLEM When running mvn clean test, Maven Surefire Plugin doesn&#8217;t pick up *Spec.groovy test files. SOLUTION By default, Maven Surefire Plugin is configured to execute test files with the following patterns: **/Test*.java, **/*Test.java and **/*TestCase.java. To fix this, we need to modify the inclusion list for this plugin. Since both Java and Groovy files get [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2014/07/21/maven-unable-to-execute-spock-specs/">Maven: Unable to Execute Spock Specs</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">PROBLEM</h2>



<p>When running <b>mvn clean test</b>, Maven Surefire Plugin doesn&#8217;t pick up <b>*Spec.groovy</b> test files.</p>



<h2 class="wp-block-heading">SOLUTION</h2>



<p>By default, Maven Surefire Plugin is configured to execute test files with the following patterns: <b>**/Test*.java</b>, <b>**/*Test.java</b> and <b>**/*TestCase.java</b>.</p>



<p>To fix this, we need to modify the inclusion list for this plugin. Since both Java and Groovy files get compiled down to <b>*.class</b>, it is probably easier to just include <b>*.class</b> instead of <b>*.java</b> or <b>*.groovy</b>.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: xml; title: ; notranslate">
&lt;plugin&gt;
    &lt;groupid&gt;org.apache.maven.plugins&lt;/groupid&gt;
    &lt;artifactid&gt;maven-surefire-plugin&lt;/artifactid&gt;
    &lt;version&gt;2.17&lt;/version&gt;
    &lt;configuration&gt;
        &lt;includes&gt;
            &lt;include&gt;**/Test*.class&lt;/include&gt;
            &lt;include&gt;**/*Test.class&lt;/include&gt;
            &lt;include&gt;**/*TestCase.class&lt;/include&gt;
            &lt;include&gt;**/*Spec.class&lt;/include&gt;
        &lt;/includes&gt;
    &lt;/configuration&gt;
&lt;/plugin&gt;
</pre></div><p>The post <a rel="nofollow" href="https://myshittycode.com/2014/07/21/maven-unable-to-execute-spock-specs/">Maven: Unable to Execute Spock Specs</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://myshittycode.com/2014/07/21/maven-unable-to-execute-spock-specs/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">520</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Database Caching using Disk

Served from: myshittycode.com @ 2026-03-01 16:14:17 by W3 Total Cache
-->