Maven打包排除某个资源或者目录

论坛 期权论坛 脚本     
已经匿名di用户   2022-7-2 22:16   6055   0

排除某个资源文件

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <excludes>
                        <exclude>core-site.xml</exclude>
                        <exclude>hdfs-site.xml</exclude>
                    </excludes>
                </configuration>
            </plugin>

排除某个目录

<project>
  ...
  <build>
    <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>

参考:

https://www.cnblogs.com/xing901022/p/8080122.html(以上内容转自此篇文章)

https://www.cnblogs.com/zdz8207/p/java-maven-pom-resource-exclude.html

http://blog.csdn.net/sundenskyqq/article/details/49930387

http://blog.csdn.net/cyzero/article/details/8251643

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:81
帖子:4969
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP