如何知道哪些Windows进程在执行" mvn clean"导致失败?
我怀疑某些未知进程正在抓住我的目标"文件夹,这阻止我继续前进
有没有办法找到那个未知的过程?
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-clean-plugin:2.5:clean from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-clean-plugin:2.5, parent: sun.misc.Launcher$AppClassLoader@2d4b1fda]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-clean-plugin:2.5:clean' with basic configurator -->
[DEBUG] (f) directory = C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target
[DEBUG] (f) excludeDefaultDirectories = false
[DEBUG] (f) failOnError = true
[DEBUG] (f) followSymLinks = false
[DEBUG] (f) outputDirectory = C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target\classes
[DEBUG] (f) reportDirectory = C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target\site
[DEBUG] (f) retryOnError = true
[DEBUG] (f) skip = false
[DEBUG] (f) testOutputDirectory = C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target\test-classes
[DEBUG] -- end configuration --
[INFO] Deleting C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target
[INFO] Deleting directory C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26.290 s
[INFO] Finished at: 2017-08-21T15:16:16+05:30
[INFO] Final Memory: 14M/124M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project quality-manager: Failed to clean project: Failed to delete C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project quality-manager: Failed to clean project: Failed to delete C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to clean project: Failed to delete C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target
at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:215)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.io.IOException: Failed to delete C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target
at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:249)
at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:191)
at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:117)
at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:193)
答案 0 :(得分:2)
当我在运行调试器或在本地网络服务器上运行项目时,我倾向于这样做。有时它会变得有点滑稽,即使你认为你已经停止了它也会闲逛。
当发生这种情况时,我通常倾向于去任务管理器并杀死在我的机器上运行的任何java进程,它通常会修复它。
答案 1 :(得分:1)
使用 Handle ,来自Mark Russinovitch,Sysinternals(现为Microsoft): https://docs.microsoft.com/en-us/sysinternals/downloads/handle
这将帮助您找到罪犯(它通常是您自己的Java进程,或Explorer.exe,甚至是您运行Maven的CMD.EXE)。