我无法使用Maven上的ant任务删除文件。我遇到的问题是,当我尝试进行编译(删除生成的所有内容)时,删除任务无法删除文件。 Ant仍然无法删除它们。 我该怎么办?
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>auto-clean</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<target>
<delete>
<fileset dir="${basedir}/src/main/resources/config/config.properties" includeemptydirs="true"/>
</delete>
<copy file="src/main/resources/config/${path}.properties"
tofile="src/main/resources/config/config.properties"/>
</target>
</tasks>
</configuration>
</execution>
</executions>