Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Spring Boot parent starter modifies surefire defaults?

Tags:

spring-boot

I'm migrating existing application to Spring Boot. To simplify project configuration I decided to setup spring-boot-starter-parent as parent.

The problem is that surefire configuration

<configuration>
  <includes>
    <include>**/*Tests.java</include>
    <include>**/*Test.java</include>
   </includes>
   <excludes>
     <exclude>**/Abstract*.java</exclude>
   </excludes>
</configuration>

is different than default surefire settings and broke my build. How can I "undo" includes/excludes from Spring Boot? Not overwrite, but go back to surefire defaults.

I think that spring-boot-starter-parent should be surefire-neutral.

PS. Sooner or later I will solve my problem myself. Current issue is rather question to Spring Boot

like image 927
michaldo Avatar asked Dec 19 '25 00:12

michaldo


1 Answers

I restored surefire defaults for includes and excludes with

<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <includes>
                        <include>**/Test*.java</include>
                        <include>**/*Test.java</include>
                        <include>**/*TestCase.java</include>
                    </includes>
                    <excludes>
                        <exclude>**/*$*</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
</build>
like image 62
michaldo Avatar answered Dec 20 '25 17:12

michaldo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!