老项目打jar
1 非maven打包
2 maven打jar
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>XXXXXXXXXXXX</mainClass>
</manifest>
<!-- 给清单文件添加键值对(配置文件外置) -->
<manifestEntries>
<Class-Path>config/</Class-Path>
</manifestEntries>
</archive>
<excludes>
<!--以类路径目录为基础-->
<exclude>*</exclude>
<exclude>mappings/*</exclude>
</excludes>
</configuration>
</plugin>