[
https://issues.apache.org/jira/browse/SUREFIRE-1390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16299210#comment-16299210
]
Sebastien Dubois commented on SUREFIRE-1390:
--------------------------------------------
Just for the record, if anyone else in the same situation as me ends up here: I
faced this issue and then realized that it was because the Spring Boot
executable jar was being used, the issue being that in that JAR my own classes
are under BOOT-INF\classes and not at the usual location...
The clean solution in that case seems to be to split the code in different
modules so that you can have it as a dependency.
A simpler approach (though less clean) is to use the solution described here to
create the special Spring Boot jar in a separate file and thus have a normal
one usable with Surefire/Failsafe:
https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#howto-create-an-additional-executable-jar
> maven-failsafe-plugin:2.20:verify classNotFound (spring autowired service)
> testNg
> ---------------------------------------------------------------------------------
>
> Key: SUREFIRE-1390
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1390
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Failsafe Plugin, TestNG support
> Affects Versions: 2.19, 2.19.1, 2.20
> Environment: Win 10; terminal: MINGW64; Spring boot starter [1.5.3,
> 1.5.4]
> Reporter: hhwebdev
> Assignee: Tibor Digana
> Labels: build, test
> Fix For: Backlog
>
> Attachments: 2017-07-12T09-45-33_517-jvmRun1.dump,
> cmd_mvn_install_X.txt, failsafe-summary.xml
>
>
> Apologies in advance if duplicate or needs to be in Failsafe specific
> project, am new to jira, tried searching, but couldn't find match. Not sure
> if bug in plugin, but couldn't find anything on google/SO based on failsafe
> stacktrace.
> Upgrading failsafe versions to [2.19, 2.20] causes unexpected failure during
> integration test run of spring-based testNg tests.
> However, remaining on current failsafe version, 2.18.1, works as expected.
> See attachments for more details.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)