Ant任务无法删除某些文件

时间:2020-07-01 20:59:18

标签: maven pom.xml maven-ant-tasks

我无法使用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>

0 个答案:

没有答案
相关问题