slachiewicz opened a new issue, #1782:
URL: https://github.com/apache/maven-dependency-plugin/issues/1782

   ### Affected version
   
   3.11.0, master (6ea7f2f)
   
   ### Bug description
   
   With a split local repository (`-Daether.enhancedLocalRepository.split 
-Daether.enhancedLocalRepository.localPrefix=installed/tag-1`), 
`purge-local-repository` deletes nothing under `installed/<prefix>`, logs the 
deletion and the build succeeds.
   
   Manual include, after `mvn install` of a `pom` project 
`org.example.purge:purge-test:1.0-SNAPSHOT`:
   
   ```
   mvn dependency:purge-local-repository 
-DmanualInclude=org.example.purge:purge-test -DresolutionFuzziness=artifactId 
-DreResolve=false
   [INFO] Deleting 1 manual dependency from <local repository>
   ```
   
   All four files under `installed/tag-1/org/example/purge/purge-test/` remain. 
Without the split, the same command deletes the directory.
   
   Dependency path, from a project that depends on `purge-test`:
   
   ```
   mvn dependency:purge-local-repository -Dinclude=org.example.purge:purge-test 
-DreResolve=false
   [INFO] Deleting 1 transitive dependency for project consumer from <local 
repository> with artifact version resolution fuzziness
   [WARNING] Unable to purge local repository location immediately: <local 
repository>/org/example/purge/purge-test/1.0-SNAPSHOT
   ```
   
   The path has no `installed/tag-1/` segment. `PurgeLocalRepositoryMojo` 
builds delete targets from `ArtifactRepository` (`getBasedir()` + `gavToPath` 
in `manualPurge`, `pathOf(artifact)` in `findDeleteTargets`); 
`LocalRepositoryManager.getPathForLocalArtifact` / `getPathForRemoteArtifact` 
would honour the split prefixes.
   
   Verified: Maven 3.9.16, plugin 3.11.0 and a master snapshot built from 
6ea7f2f.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to