Make test work on command line properly
Surefire wraps everything in a .jar to run the tests, and the manifest has a main class, so that fools the main class detection.
This commit is contained in:
@@ -220,7 +220,9 @@ class FunctionCreatorConfiguration {
|
||||
if (mainClass == null) {
|
||||
mainClass = manifest.getMainAttributes().getValue("Start-Class");
|
||||
}
|
||||
if (mainClass == null) {
|
||||
if (mainClass == null
|
||||
// Not surefire or IntelliJ
|
||||
&& !getArchive().getUrl().toString().endsWith(".jar!/")) {
|
||||
// Not a Spring Boot jar but it might have a "main" class
|
||||
mainClass = manifest.getMainAttributes().getValue("Main-Class");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user