trygvis / unix-maven-plugin

My local copy of the unix-maven-plugin from the Codehaus Mojo project
MIT License
12 stars 24 forks source link

File attributes not set correctly? #17

Open bertfrees opened 11 years ago

bertfrees commented 11 years ago

I would like to set the mode on some files, but it seems to me like this feature isn't implemented yet. Am I right?

Changing this in the code did the trick for me (but I'm sure it's not the the way you intended):

In org.codehaus.mojo.unix.core.FsFileCollector.CopyFileIoEffect, on line 159, I added:

File toFile = root.resolve(adjustedTo.path).file;
Option<UnixFileMode> mode = adjustedTo.attributes.mode;
if (mode.isSome()) {
    UnixUtil.chmod(toFile, mode.some().toOctalString());

Also, when is a recent version going to be available in a public repository?

Thanks for this great plugin! Bert