在intellij中将项目导出到jar文件时, META-INF / MANIFEST.MF 文件的内容会被更改,并且不再包含入口点(主类),即使 source / main / java / META-INF / MANIFEST.MF 包含一个有效的入口点:
$ cat META-INF/MANIFEST.MF
Manifest-Version: 1.0
Main-Class: org.fiware.kiara.generator.kiaragen
项目目录如下:
其中MANIFEST.MF是(有效)清单文件。创建工件后,将选择正确的元目录:
解压缩导出的.jar文件会显示包含完全不同内容的清单文件:
$ jar xf kiaragen.jar
cat META-INF/MANIFEST.MF
Manifest-Version: 1.0
Implementation-Title: Some Vendor
Implementation-Version: 1.0.1
Archiver-Version: Plexus Archiver
Built-By: ub
Specification-Vendor: Some Vendor
Specification-Title: Some Vendor
Implementation-Vendor-Id:
Created-By: Apache Maven
Build-Jdk: 1.6.0_29
Specification-Version: 1.0.1
Implementation-Vendor: Some Vendor
Intellij在哪里找到这些信息,为什么它会删除Main-Class入口点?