在运行干净的maven目标时获取错误

时间:2016-05-03 10:54:01

标签: java maven

我的Maven Netbeans项目存在问题,我并不理解。我在pom.xml文件中添加了所有插件,但在构建项目时仍然有相同的消息:

Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project MBFSMS: Failed to clean project: Failed to delete F:\NetbeansProject\MBFSMS\target -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

见下面我的pom文件:

     <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.2.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.4.1</version>
            </plugin>          
        </plugins>
    </build>

1 个答案:

答案 0 :(得分:0)

这可能是一些临时问题,请使用调试日志记录再次重新运行clean目标,即mvn -X clean还要确保其他程序未使用target目录中可用的文件。