-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Description
Apologies if this has been raised and answered, I tried searching for past issues and found some slightly tangential issues but hoping to get an firm answer on this unusual behavior.
I have a spring-boot project which uses gradle and the spring-boot plugin: which generates two WAR files to build/lib
. If I have the springBoot executable property set to true in the gradle task configuration, then the fat WAR file (the one that is not marked with .original suffix), cannot be expanded using jar -xvf
. It just returns immediately with no obvious error and nothing is expanded.
Setting the executable flag to false results in a WAR file that can be expanded with jar -xvf
.
I have tested and found that using the unzip
command will expand the WAR successfully, regardless of the executable flag.
Also have observed that the .original
WAR file expands successfully regardless of executable flag.
This unusual behavior seems to be the cause other issues we have been encountering, such as unable to deploy the fat WAR to jetty (jetty fails to expand the WAR), while Tomcat expands the WAR without any trouble.
This also causes issues in a part of our build script where we try to unpack the WAR to insert additional assets. The unpack part fails if exectuable = true. Setting executable to false enables the build script to work fine.
I am not sure if this is a known issue but the extremely silent way it fails is causing a lot of issues in our build and deployment process that all immediately goes away if we set exectuable=false.
We are on spring-boot-gradle plugin 1.5.1 currently, we have observed this issue on older 1.4.x plugins as well.
If any additional questions or further info desired, be happy to answer.