Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在通过maven创建zip文件时排除一些文件夹 箱子 / 拉链 总工程师/总工程师 / src/main/dml_Maven_Maven Assembly Plugin - Fatal编程技术网

如何在通过maven创建zip文件时排除一些文件夹 箱子 / 拉链 总工程师/总工程师 / src/main/dml

如何在通过maven创建zip文件时排除一些文件夹 箱子 / 拉链 总工程师/总工程师 / src/main/dml,maven,maven-assembly-plugin,Maven,Maven Assembly Plugin,这是我的assembly.xmlsrc/main包含多个文件夹。我想排除一些文件夹,如src/main/dml,但它没有被排除。尝试以下排除方法: <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="htt

这是我的assembly.xmlsrc/main包含多个文件夹。我想排除一些文件夹,如src/main/dml,但它没有被排除。

尝试以下排除方法:

<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>

src/main/dml/**
匹配文件夹及其子文件夹的所有内容

更新:哦,对不起,你的排除是相对于你的目录的,所以你想要的是

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

dml/**
  <excludes>
            <exclude>dml/**</exclude>
  </excludes>