[ 
https://issues.apache.org/jira/browse/SUREFIRE-1747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17023924#comment-17023924
 ] 

Tibor Digana commented on SUREFIRE-1747:
----------------------------------------

So it means Failsafe works with the second profile and that one contains only 
{{spring-boot-maven-plugin}}. This means the behavior has to do with the 
{{spring-boot-maven-plugin}} plugin and the bytecode or the resulting JAR file. 
The Failsafe plugin takes the JAR file {{demo-0.0.1-SNAPSHOT.jar}} into the 
classpath and not the compiled classes in {{target/classes}}.
Pls investigate more on your side because this behavior sounds to me related to 
your POM.

> spring-boot-maven-plugin with goal repackage make tests to silently not 
> execute
> -------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1747
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1747
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Failsafe Plugin
>    Affects Versions: 3.0.0-M4
>            Reporter: Atle Tokle
>            Assignee: Tibor Digana
>            Priority: Major
>         Attachments: demo.zip
>
>
> When integration-testing a spring boot application, and also having this 
> plugin:
> {code:xml}
>             <plugin>
>                 <groupId>org.springframework.boot</groupId>
>                 <artifactId>spring-boot-maven-plugin</artifactId>
>                 <executions>
>                     <execution>
>                         <goals>
>                             <goal>repackage</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
>  {code}
> 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
> {code:xml}
>             <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>
> {code}
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to