-
如题,目前公司在做前后分离开发,打包时需要不包含某些文件
-
开发使用Spring boot ,前端使用 Vue
-
pom如下
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<!--注意从编译结果目录开始算目录结构-->
<exclude>/config/**</exclude>
<exclude>**/CommonRouteController.class</exclude>
</excludes>
</configuration>
</plugin>
- 打包为ZIP格式
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<!-- not append assembly id in release file name -->
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/build/package.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>