Maven复制文件和文件夹插件无法处理linux [点]“.*";隐藏文件 [英] Maven Copy Files and Folders Plugin not copeying linux [dot] ".*" hidden files
问题描述
我有一个Maven代码
I have a maven code
<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参数.如何在这里使用?
This is working fine, but it is not copying .* linux files which are hidden. In normal linux we would use a parameter -a. How to use this here?
谢谢 耶万(Jeevan)
Thanks Jeevan
推荐答案
要禁用此行为,请将addDefaultExcludes
设置为false.
To disable this behaviour set addDefaultExcludes
to false.
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<addDefaultExcludes>false</addDefaultExcludes>
</configuration>
</plugin>
默认文件如.gitignore,.cvsignore等被排除在外 表示将不会被复制.如果您需要特定的它们 您可以通过将其设置为false来做到这一点.
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
这篇关于Maven复制文件和文件夹插件无法处理linux [点]“.*";隐藏文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!