【Maven】用maven后台打包报错Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (def

1.问题:
使用maven后台打包报错,报错结果如下:

"C:\Program Files\Java\jdk1.8.0_91\bin\java" -Dmaven.multiModuleProjectDirectory=E:\projects\fxrj\fxrj-admin "-Dmaven.home=D:\Program Files\IntelliJ IDEA 2016.3.2\plugins\maven\lib\maven3" "-Dclassworlds.conf=D:\Program Files\IntelliJ IDEA 2016.3.2\plugins\maven\lib\maven3\bin\m2.conf" -Didea.launcher.port=7534 "-Didea.launcher.bin.path=D:\Program Files\IntelliJ IDEA 2016.3.2\bin" -Dfile.encoding=UTF-8 -classpath "D:\Program Files\IntelliJ IDEA 2016.3.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar;D:\Program Files\IntelliJ IDEA 2016.3.2\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=2016.3.2 clean
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.platform:fxrj-admin:war:1.0.0
[WARNING] 'dependencies.dependency.systemPath' for com.oracle:ojdbc14:jar should not point at files within the project directory, ${project.basedir}/lib/ojdbc14-10.2.0.4.0.jar will be unresolvable by dependent projects @ line 75, column 16
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.jsoup:jsoup:jar -> duplicate declaration of version 1.10.2 @ line 234, column 15
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building fxrj-admin 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ fxrj-admin ---
[INFO] Deleting E:\projects\fxrj\fxrj-admin\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.868 s
[INFO] Finished at: 2017-07-27T10:58:22+08:00
[INFO] Final Memory: 8M/150M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project fxrj-admin: Failed to clean project: Failed to delete E:\projects\fxrj\fxrj-admin\target\classes\config\ehcache-shiro.xml -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Process finished with exit code 1

原因及解决办法:
因为后台运行了,所以导致,解决办法就是关掉后台跑的debug或者run,然后运行就OK了;
【Maven】用maven后台打包报错Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (def_第1张图片

正常运行截图:
【Maven】用maven后台打包报错Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (def_第2张图片

你可能感兴趣的:(【报错】)