[Commented] (MRESOURCES-236) Copying of files with permissions broken

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Commented] (MRESOURCES-236) Copying of files with permissions broken

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MRESOURCES-236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16396960#comment-16396960 ]

Jonas Jurczok commented on MRESOURCES-236:

I thought this would be a good start to contribute to the maven ecosystem. But after reading the source for a while I'm actually confused regarding the best approach here :)


The resource plugin itself calls a [MavenResourcesFiltering|https://maven.apache.org/shared/maven-filtering/apidocs/org/apache/maven/shared/filtering/MavenResourcesFiltering.html] at [this line|[https://github.com/apache/maven-resources-plugin/blob/master/src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java#L342].]


This Filtering object is part of a [shared filtering library|http://svn.apache.org/viewvc/maven/shared/tags/maven-filtering-3.1.1/]  and under the hood calls an [IOUtils|http://svn.apache.org/viewvc/maven/shared/tags/maven-shared-utils-3.2.0/src/main/java/org/apache/maven/shared/utils/io/IOUtil.java?view=markup#l172] method to actually copy the data. So in fact what we are doing is a simple binary copy of the source object somewhere deep down in a shared library (maybe I'm just repeating stuff that was obvious to everyone.. in this case sorry :) ).


What is the best solution for this problem? Because copying files with permissions seems reasonable, on the other hand having a shared library that actually focuses on filtering also know about file permissions (which are not part of the content but mere metadata to the filesystem node) seems to be the wrong place.


Initially I thought about adding a flag to the resource plugin ('ignoreFilePermissions', defaulting to false for compatibility purposes). But the actual problem has to be fixed somewhere else.

Question to the people who are much more familiar with this lib/plugin: What would be your preferred solution?

> Copying of files with permissions broken
> ----------------------------------------
>                 Key: MRESOURCES-236
>                 URL: https://issues.apache.org/jira/browse/MRESOURCES-236
>             Project: Maven Resources Plugin
>          Issue Type: Bug
>          Components: copy
>    Affects Versions: 2.4.3
>            Reporter: Gili
>            Priority: Major
> Please reopen MRESOURCES-132 as multiple reporters indicate that the bug still exists (some provided more concrete repro steps).

This message was sent by Atlassian JIRA