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

Rustam Abdullaev commented on SUREFIRE-1198:
--------------------------------------------

Failsafe is NOT working with Spring Boot in repackage mode since versionĀ 2.19.

{code}
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>2.1.0.RELEASE</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
{code}

Causes

{code}
java.lang.ArrayStoreException: 
sun.reflect.annotation.TypeNotPresentExceptionProxy
        at 
sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
        at 
sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
        at 
sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
        at 
sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
        at 
sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
        at 
sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
        at java.lang.Class.createAnnotationData(Class.java:3521)
        at java.lang.Class.annotationData(Class.java:3510)
        at java.lang.Class.getAnnotation(Class.java:3415)
        at 
org.apache.maven.surefire.common.junit4.JUnit4TestChecker.isValidJUnit4Test(JUnit4TestChecker.java:66)
        at 
org.apache.maven.surefire.common.junit4.JUnit4TestChecker.accept(JUnit4TestChecker.java:53)
        at 
org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:102)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.scanClassPath(JUnit4Provider.java:309)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.setTestsToRun(JUnit4Provider.java:189)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:132)
        at 
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
        at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
        at 
org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
        at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
{code}

So we're stuck with version *2.18.1* at the moment.

How to use Surefire with the repackage goal?

> Failsafe does not allow to configure the jar file to use
> --------------------------------------------------------
>
>                 Key: SUREFIRE-1198
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1198
>             Project: Maven Surefire
>          Issue Type: Bug
>            Reporter: Stephane Nicoll
>            Assignee: Tibor Digana
>            Priority: Major
>             Fix For: 2.20
>
>
> See [this Spring Boot 
> issue|https://github.com/spring-projects/spring-boot/issues/4510#issuecomment-159448634]
> It seems that SUREFIRE-855 does not allow {{target/classes}} to be used 
> anymore. Is there a reason why this behaviour was completely removed in 
> favour of only the jar file?
> It would be nice if we had an option to chose between the two (defaulting to 
> the jar)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to