当前位置: 动力学知识库 > 问答 > 编程问答 >

maven - how to set file permissions on files in my deployment?

问题描述:

i have seen this question, but the answer doesn't quite explain the technique.

I run my application from the target directory after maven is run on the server.

I have a folder (/src/main/webapp/WEB-INF/scripts) which once after maven is run is copied to the target directory (/target/[project]/WEB-INF/scripts).

I need to make sure all of the files within this directory (recursively) receive executable permissions.

How can I achieve this without ant?

网友答案:

You can try to do the put the assembly-plugin into the pre-package phase and copy the files to the target/classes/... folder (i'm not sure about the exact name of the folder) and during the copy via the assembly-plugin you can change the permissions. Tha the war plugin will pickup the files and will package them into the war. I'm not sure if this works perfectly. I never tried that.

分享给朋友:
您可能感兴趣的文章:
随机阅读: