Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1747

spring-boot-maven-plugin with goal repackage make tests to silently not execute

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 3.0.0-M4
    • None
    • Maven Failsafe Plugin
    • None

    Description

      When integration-testing a spring boot application, and also having this plugin:

                  <plugin>
                      <groupId>org.springframework.boot</groupId>
                      <artifactId>spring-boot-maven-plugin</artifactId>
                      <executions>
                          <execution>
                              <goals>
                                  <goal>repackage</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
       

      the test is not executed by maven-failsafe-plugin. And no errors or warnings is displayed to indicate that code is not tested.
      When configuring phace like this they are executed

                  <plugin>
                      <groupId>org.springframework.boot</groupId>
                      <artifactId>spring-boot-maven-plugin</artifactId>
                      <executions>
                          <execution>
                              <phase>post-integration-test</phase>
                              <goals>
                                  <goal>repackage</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
      

      I found the answer here https://stackoverflow.com/questions/50705270/mvn-spring-boot-plugin-breaks-integration-testing
      But the build should either break or tests run.

      Attachments

        1. demo.zip
          17.52 MB
          Atle Tokle

        Activity

          People

            tibordigana Tibor Digana
            atokle Atle Tokle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: