Executable files in the war file

We would like to send some helper scripts (shell scripts) as part of the app war. Unfortunately, it seems that our maven system discards permissions for all files, and the scripts end without the installed bit of the executable file.

Can this be done? Does the .war format support executable files? If yes: how could maven save permissions / fix them somewhere in the process?

+5
source share
4 answers

The problem is more likely that these bits are not supported in the basic zip format.

The execution bit does not need to be set if you explicitly execute / bin / sh with the name of the script.

, , script, "chmod + x script.sh" .

+4

AFAIK, war/jar ( Maven Assembly Plugin , ).

, :

  • ( ) script webapp ~ ~
  • , java.io.tmpdir, ~ ~
  • @Thorbjørn ( , , ); , .
+1

WAR. WAR.

0

You can also check and set the executable flag directly from your Java code. See http://docs.oracle.com/javase/6/docs/api/java/io/File.html#setExecutable%28boolean,%20boolean%29

0
source

All Articles