gpt4 book ai didi

linux - Maven 复制文件和文件夹插件不复制 linux [dot] ".*"隐藏文件

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:07:17 25 4
gpt4 key购买 nike

我有一个maven代码

    <plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources-from-parent</id>
<phase>initialize</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>./target/aut-ws</outputDirectory>
<resources>
<resource>
<directory>/prj//workspace-Fm-aut-Testing/</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>

这工作正常,但它没有复制隐藏的 .* linux 文件。在普通的 linux 中,我们会使用一个参数 -a。这里怎么用这个?

谢谢杰文

最佳答案

要禁用此行为,请将 addDefaultExcludes 设置为 false。

<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<addDefaultExcludes>false</addDefaultExcludes>
</configuration>
</plugin>

By default files like .gitignore, .cvsignore etc. are excluded which means they will not being copied. If you need them for a particular reason you can do that by settings this to false.

文档:https://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html#addDefaultExcludes

关于linux - Maven 复制文件和文件夹插件不复制 linux [dot] ".*"隐藏文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31961775/

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