Hi folks,

I’ve been looking at MRESOURCES-236 (Copying of files with permissions broken) 
and it looks like it should be solvable using Java 7’s 
Files.getPosixFilePermission() and Files.setPostixFilePermission(). In 
particular I propose that the various copyFile() methods in 
maven-resources-plugin and maven-shared-utils be made to copy the posix file 
permissions from source to target. I’m happy to open a pull request to that 
effect.

Obviously all this could be carefully built into maven-shared-utils’ 
Java7Support class using reflection but I suspect that the minimum supported 
java version is already 7, and there’s talk of other components bumping minimum 
to 8 anyway.

So my questions are:

1. Have people tried the get/set posix file permissions approach before and 
found it lacking? - are there email threads I should be reading about previous 
failed attempts?
2. Is it reasonable to assume that maven-shared-utils and 
maven-resources-plugin require at least Java 7 anyway, and that I can rely on 
the above functionality without reflection?
3. Assuming that the minimum is Java 7 or higher already, is there any reason 
for the Java7Support class to be powered by reflection? (I can understand that 
the class itself may need to stick around for backwards compatibility but 
surely there’s a few milliseconds of performance improvement available by 
calling the target functionality directly!)

Thanks,

Rob
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to