When using spring-boot-maven-plugin:repackage and maven-failsafe-plugin:integration-test on the same project, the ClassLoader used in integration-test can't resolve classes in the repackaged archive.

See: https://github.com/rolaca11/spring-failsafe-bug

I found two possible fixes (can be tried with the different profiles), but both require non-standard usage of either plugin. These are both simple, but maybe there should be either a fix, like a SpringBootRepackagedClassLoader, or if it's too much work, some clearer documentation about the possible issue.

Comment From: wilkinsona

This will work with no additional configuration if you use spring-boot-starter-parent (you are using spring-boot-parent at the moment). Alternatively, you can set things up manually, as described in the documentation.

Comment From: rolaca11

Haven't seen this part, sorry