[英]How to fix Intellij idea not adding manifest to Artifact?
我遇到了一个问题,我既无法通过清洁也无法通过删除工件/重新创建来解决。 我坚持了几天,谷歌搜索不知道这样的问题。
因此,我在Intellij Idea中有一个Gradle java项目,它没有将清单提取到Artifact的jar中。
它在另一个项目中执行此操作,但此处不包含清单,因此我的jar no main manifest attribute, in txtadventureserver_main.jar
说no main manifest attribute, in txtadventureserver_main.jar
这是工件屏幕-清单不存在,我看不到如何添加它
这是我的礼物:
group 'com.vladdrummer.txtadventureserver'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'idea'
sourceCompatibility = 1.8
jar {
manifest {
attributes 'Main-Class': 'TextAdventureServer'
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile group: 'junit', name: 'junit', version: '4.12'
compile "com.sparkjava:spark-core:2.7.2"
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.