IntelliJ IDEA生成jar包

【右键点击项目】-> 【Open Module Settings】 

 

或者

 

找到【Artifacts】 -> 【JAR】 -> 【From modules with dependences】 

 

 

Main Class就是JAR文件的主类

JAR files from libraries中的

extract to the target JAR的意思是提取依赖库的字节码文件到目标的JAR文件中

copy to the output directory and link via manifest的意思是把依赖库拷贝到输出的目录,并在manifest中添加对应的属性

Directory for META-INF/MANIFEST.MF会在填写的目录下生成META-INF/MANIFEST.MF文件

 

 

 

出现”META-INF/MANIFEST.MF” already exists in VFS的错误

说明”META-INF/MANIFEST.MF”已经在文件系统中存在了,我们把对应的文件删除即可,在重新配制即可成功。

$ rm -rf src/main/resources/META-INF/

猜你喜欢

转载自www.cnblogs.com/zengsong-restService/p/11278822.html