本文共 2282 字,大约阅读时间需要 7 分钟。
Pom
maven-compiler-plugin org.apache.maven.plugins maven-dependency-plugin copy-dependencies package copy-dependencies target/lib false false runtime org.apache.maven.plugins maven-jar-plugin **/*.properties **/*.xml **/*.yml admin/** mapper/** excel/** excelXml/** org.springframework.boot spring-boot-maven-plugin ZIP non-exists non-exists repackage classes false org.apache.maven.plugins maven-antrun-plugin package run target/distribution target/distribution/tmp ${project.artifactId}-${project.version}
主要通过
<configuration>
<excludes> <exclude>**/*.properties</exclude> <exclude>**/*.xml</exclude> <exclude>**/*.yml</exclude> <exclude>admin/**</exclude> <exclude>mapper/**</exclude> <exclude>excel/**</exclude> <exclude>excelXml/**</exclude> </excludes> </configuration>分离静态资源,
<copy todir="${dist}">
<fileset dir="target/classes"> <include name="**/*.properties" /> <include name="**/*.xml" /> <include name="**/*.yml" /> <include name="admin/**" /> <include name="mapper/**" /> <include name="excel/**" /> <include name="excelXml/**" /> </fileset> </copy>复制静态资源
启动命令:java -jar -Dloader.path=.,3rd-lib xxx-0.0.1-SNAPSHOT-classes.jar
转载地址:http://wvbai.baihongyu.com/