0

这是我的build.gradle

plugins {
    id: 'java'
}

dependencies {
    implementation 'com.kumuluz.ee:kumuluzee-core:3.1.0'
    implementation 'com.kumuluz.ee:kumuluzee-servlet-jetty:3.1.0'
    implementation 'com.kumuluz.ee:kumuluzee-microProfile-1.2:3.1.0'
    implementation 'com.kumuluz.ee:kumuluzee-jpa-hibernate:3.1.0'
    implementation 'com.kumuluz.ee:kumuluzee-bean-validation-hibernate-validator:3.1.0'
}

我运行gradle build成功,但是:

在此处输入图像描述

如您所见,我得到了:

没有主要清单属性,在 build/libs/frontoffice.jar

有任何想法吗?

4

1 回答 1

0

默认情况下,jar任务不会生成清单。将此添加到您的build.gradle

jar {
    manifest {
        attributes(
            'Main-Class': 'package.of.YourMainClass'
        )
    }
}
于 2019-03-27T15:17:36.737 回答