GH-234 Fixed Function-Class detection

Fixed Function-Class detection to ensure it is not treated as main. The regression was introduced with 0287a5d

Resolves #234
This commit is contained in:
Oleg Zhurakousky
2018-11-19 07:55:36 +01:00
parent 7ea5167543
commit 221d0f2038

View File

@@ -216,10 +216,7 @@ class FunctionCreatorConfiguration {
Manifest manifest = getArchive().getManifest();
String mainClass = null;
if (manifest != null) {
mainClass = manifest.getMainAttributes().getValue("Function-Class");
if (mainClass == null) {
mainClass = manifest.getMainAttributes().getValue("Start-Class");
}
mainClass = manifest.getMainAttributes().getValue("Start-Class");
if (mainClass == null
// Not surefire or IntelliJ
&& !getArchive().getUrl().toString().endsWith(".jar!/")) {