Maven打包排除某个资源或者⽬录最近在spark streaming本地调试的时候,引⼊了⼀些资源⽂件,打包的时候需要给排除掉。所以就考虑使⽤maven的⽅式
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<excludes>
<exclude&l</exclude>
<exclude&l</exclude>
</excludes>
</configuration>
</plugin>
<project>
...
<build>
maven打包本地jar包<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<includes>
<include>**/service/*</include>
</includes>
</configuration>
</plugin>
...
</plugins>
</build>
...
</project>

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。