apache / apache/maven-resources-plugin
[MRESOURCES-237] Resource plugin's handling of symbolic links changed in 3.0.x, broke existing behavior
- Dominant language
- Java
- Stars
- 61
- Forks
- 36
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 3
Description
**[Brian D. Johnson](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=brianjohnson)** opened **[MRESOURCES-237](https://issues.apache.org/jira/browse/MRESOURCES-237?redirect=false)** and commented
It looks like the handling of symbolic links in the `maven-resources-plugin` has changed in version 3.0.x. I'm submitting a JIRA because it breaks the previous behavior and I have not been able to find this documented anywhere as an intended change.
**Use case:** Multi-module maven project. We have a custom log4j2 configuration file we use during testing. Instead of maintaining this file in multiple `src/test/resources` directories, we instead maintain a single copy of the file at the project's root level and create symbolic links from each module's `src/test/resources` directory to the file using relative paths.
**2.7 Behavior:** the symlink was evaluated and the target file was copied to `target/test-classes/`.
**3.0.x Behavior:** the symlink is copied to `target/test-classes/` verbatim. The symlink's relative path results in the symlink pointing to the wrong file location. The log4j2 configuration is not found.
**Requested Change:** Either revert to the original 2.7 behavior, or document the change and provide a configuration parameter to allow the legacy behavior.
---
**Affects:** 3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.2.0
**Attachments:**
- [a.tgz](https://issues.apache.org/jira/secure/attachment/13009459/a.tgz) (_1.05 kB_)
**Issue Links:**
- [MSHARED-1004](https://issues.apache.org/jira/browse/MSHARED-1004) Two (2) issues with symbolic links
- [MRESOURCES-212](https://issues.apache.org/jira/browse/MRESOURCES-212) maven resource plugin does not preserve symlinks
11 votes, 20 watchers
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.