项目之前打包是通过idea配置进行打包的。
操作步骤:
1. Project Structure => Artifacts => "+" => JAR => Empty
2. 配置好Name 和 Output directory
3. Output Layout => "+" => Module Output => "OK"
4. 点选jar => create manifest => 配置 Main class => "OK"
5. 打包 ===> Build Artifacts
最后会在指令的路径得到jar包。解压后的jar包结构如下:
- license.xml
- application.yml
- application.properties
- application-quartz.yml
- application-multipart.yml
- META-INF
- xml
- word
- templates
- template
- static
- reportTemplate
- phantomjs-windows
- phantomjs-linux
- com
即 配置文件和com同级, 同时是个可执行的jar,并且排除了依赖包。
我希望能通过mvn package 指令进行打包得到相同效果。