3

I have a UserManager.sh in test/resources.When I run mvn test, maven copy UserManager.sh to target/test-classes/ with incorrect permission.

My shell file permission is 705, but it was coped with 644.I have no special configuration about maven-resources-plugin.

zephyrdeiMac:Permission-Proxy zephyrguo$ ls -la src/test/resources/UserManager.sh 
-rwx---r-x  1 zephyrguo  staff  2232 May  6 17:11 src/test/resources/UserManager.sh

zephyrdeiMac:Permission-Proxy zephyrguo$ ls -la target/test-classes/UserManager.sh 
-rw-r--r--  1 zephyrguo  staff  2232 May 10 10:36 target/test-classes/UserManager.sh
Zephyr Guo
  • 1,083
  • 1
  • 8
  • 14
  • Everything in src/test/resources or src/main/resources is copied with the permissions the user under which Maven is running copied. Furthermore why are copying shell script as resources? What is the purpose of that? Creating a resulting distribution package ? – khmarbaise May 10 '16 at 07:42
  • i think here is the [answer](http://stackoverflow.com/questions/6521132/keep-permissions-on-files-with-maven-resourcestestresources) hope this helps – Hisham Khalil May 10 '16 at 10:47

0 Answers0