apache / apache/maven-dependency-plugin
[MDEP-819] Unable to delete with purge-local-repository
- Dominant language
- Java
- Stars
- 175
- Forks
- 196
- Avg merge
- 19h 30m
- Merged PRs (30d)
- 5
Description
**[Delany](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=delany)** opened **[MDEP-819](https://issues.apache.org/jira/browse/MDEP-819?redirect=false)** and commented
I cant use this goal. Resolve works fine.
```
15:11:36 java.io.IOException: File C:\Windows\system32\config\systemprofile\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar unable to be deleted.
15:11:36 at org.codehaus.plexus.util.FileUtils.forceDelete (FileUtils.java:1403)
15:11:36 at org.codehaus.plexus.util.FileUtils.cleanDirectory (FileUtils.java:1658)
15:11:36 at org.codehaus.plexus.util.FileUtils.deleteDirectory (FileUtils.java:1604)
15:11:36 at org.apache.maven.plugins.dependency.PurgeLocalRepositoryMojo.purgeArtifacts (PurgeLocalRepositoryMojo.java:649)
15:11:36 at org.apache.maven.plugins.dependency.PurgeLocalRepositoryMojo.purgeLocalRepository (PurgeLocalRepositoryMojo.java:384)
15:11:36 at org.apache.maven.plugins.dependency.PurgeLocalRepositoryMojo.execute (PurgeLocalRepositoryMojo.java:345)
15:11:36 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
15:11:36 at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
15:11:36 at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
15:11:36 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
15:11:36 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
15:11:36 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
15:11:36 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
15:11:36 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
15:11:36 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
15:11:36 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
15:11:36 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
15:11:36 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
15:11:36 at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
15:11:36 at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
15:11:36 at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
15:11:36 at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
15:11:36 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
15:11:36 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
15:11:36 at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
15:11:36 at java.lang.reflect.Method.invoke (Method.java:566)
15:11:36 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
15:11:36 at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
15:11:36 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
15:11:36 at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
15:11:36 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
15:11:36 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
15:11:36 at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
15:11:36 at java.lang.reflect.Method.invoke (Method.java:566)
15:11:36 at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:53)
15:11:36 at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:152)
15:11:36 at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:76)
```
---
**Affects:** 3.3.0
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the purge-local-repository goal and inspect PurgeLocalRepositoryMojo.purgeLocalRepository and purgeArtifacts, which appear in the stack trace. Reproduce the reported deletion failure on the affected Windows path and determine the expected behavior when the artifact cannot be deleted. Done means the issue has a confirmed, tested handling for this failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100