gpt4 book ai didi

maven - 如何在通过 maven 创建 zip 文件时排除某些文件夹

转载 作者:行者123 更新时间:2023-12-04 02:53:01 29 4
gpt4 key购买 nike

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembl/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>bin</id>
<baseDirectory>/</baseDirectory>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>src/main</directory>
<outputDirectory>/</outputDirectory>
<excludes>
<exclude>src/main/dml</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>

这是我的 assemble.xml。 源/主 包含几个文件夹。我要 排除 一些文件夹,如 src/main/dml ,但它并没有被排除在外。

最佳答案

试试这个排除:

  <excludes>
<exclude>src/main/dml/**</exclude>
</excludes>

匹配文件夹及其子文件夹的所有内容

更新:哦,对不起,你的排除是相对于你的目录,所以你想要的是
  <excludes>
<exclude>dml/**</exclude>
</excludes>

关于maven - 如何在通过 maven 创建 zip 文件时排除某些文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16214086/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com