<build>
<!-- exclude all files in resources-->
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>**/**</exclude>
</excludes>
<filtering>false</filtering>
</resource>
</resources>
<!-- other configurations/plugins in the pom.xml-->
</build>
或者我们可以 用途包括只打包一些文件或文件夹。
但这种方法有副作用。IDE 还将排除 target/classes文件夹中的资源文件。Maven-jar-plugin只影响 jar 文件。