【发布时间】:2016-06-05 17:31:07
【问题描述】:
我正在尝试使用“maven-clean-plugin”删除位于 /my/path 文件夹中的其他文件。
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>clean-on-cleaning</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>target/dart</directory>
</fileset>
<fileset>
<directory>src/main/dart/.pub</directory>
</fileset>
<fileset>
<directory>src/main/dart/build</directory>
</fileset>
<fileset>
<directory>${env.APPDATA}/Pub/Cache</directory>
</fileset>
<fileset>
<directory>src/main/dart/packages</directory>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
"src/main/dart/packages" 包含链接。其中一个链接指向“src/main/dart/lib”文件夹。我已经设置:
<followSymlinks>false</followSymlinks>
所以它不应该删除 lib 目录中的文件。但不幸的是,它确实如此。问题可能出在哪里?
环境配置:
- Maven:apache-maven-3.3.3
- Java 版本:1.7.0_55(也在 1.8.0_51 上尝试过)
- 操作系统名称:windows 7
- 版本:6.1
- 拱门:amd64
【问题讨论】:
-
我也有同样的问题(尝试过 2.6.1 和 3.0.0 版本)。使用 maven 3.3.9、java 1.8.0_112、Windows 10。
-
连接点与 Windows 上的符号链接不同:Determine whether a file is a junction (in Windows) or not?