apache / apache/maven-dependency-plugin
[MDEP-949] enhancedLocalRepository.split=true causes enhancedLocalRepository.localPrefix to be included as top level directory in copy-dependencies with useRepositoryLayout=true
- Dominant language
- Java
- Stars
- 175
- Forks
- 196
- Avg merge
- 19h 30m
- Merged PRs (30d)
- 5
Description
**[Eduardo Rodrigues](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER295435)** opened **[MDEP-949](https://issues.apache.org/jira/browse/MDEP-949?redirect=false)** and commented
After upgrading from Maven 3.8.7 to {**}3.9.8{**}, we decided to take advantage of local repository split feature in our CI/CD pipeline. However, we noticed an unexpected behavior in the copy-dependencies goal.
```java
-Daether.enhancedLocalRepository.split=true
```
```java
maven-dependency-plugin
3.7.1
copy-libs
prepare-package
copy-dependencies
${project.build.directory}/libs
true
false
false
true
runtime
jar
false
```
**Before split local repository enabled:**
```java
target
∟libs
∟org
∟commons
∟commons-collections4
∟4.4
∟commons-collections4-4.4.jar
```
**After:**
```java
target
∟libs
∟installed
∟org
∟commons
∟commons-collections4
∟4.4
∟commons-collections4-4.4.jar
```
Note additional directory `{}installed{`}, which is the default value of property `-Daether.enhancedLocalRepository.localPrefix`
**Expected:**
Neither `aether.enhancedLocalRepository.localPrefix` nor `aether.enhancedLocalRepository.remotePrefix` should appear as top level directory in the outputDirectory.
---
**Affects:** 3.7.1
1 votes, 1 watchers
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with Maven 3.9.8, enhancedLocalRepository.split=true, and the copy-dependencies configuration using useRepositoryLayout=true. Trace how the copy-dependencies goal derives its output path; done means the generated layout contains org/commons/... directly under libs, without the installed or remote prefix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100