Packaging excutables

In our current project, we package 2 executable scripts as part of the final application deliverable. The purpose of these scripts are to pull down the correct version of the application to install from a s3 bucket, set splunk forwarders amongst other things.
When on gradle 2.3, everything works just fine. I upgraded to 2.4 today, and it seems something has changed with how gradle is packaging the executables that is causing the install process to run through completion when starting the application on our boxes. The build runs fine, but not the install.

We are getting things like:

inflating: foobar-service-0.1.0-1430847499/lib/jackson-annotations-2.5.0.jar
inflating: foobar-service-0.1.0-1430847499/lib/stax2-api-3.1.4.jar
inflating: foobar-service-0.1.0-1430847499/lib/aws-java-sdk-core-1.9.18.jar
inflating: foobar-service-0.1.0-1430847499/bin/foobar-service
replace foobar-service-0.1.0-1430847499/bin/ [y]es, [n]o, [A]ll, [N]one, [r]ename: NULL
(EOF or read error, treating as “[N]one” …)
inflating: foobar-service-0.1.0-1430847499/bin/foobar-service.bat

The bolded line is what seems to be causing the issue. When I revert back to 2.3, the same packaged archive and install scripts work just fine.

I can’t find anything in the release notes pointing at this sort of behavior between 2.3 and 2.4.

Can you please point me in the right direction?


How are you creating the installer? Are you using a third party plugin to accomplish this?

Yes, sorry I should have mentioned that. We are using Makeself ( to package the installer.

Can you elaborate on how you are integrating your Gradle build with Makeself? Are you just using an Exec task to call out to the Makeself CLI? Perhaps an example of what your build script looks like?

The app uses the application plugin to build a standard zip distribution for the application. Our CI server then takes that distribution along with a script which provisions a bare metal box with the needed elements to run the application (e.g. installs java 8, configures heap size, boots up the application, sets up splunk forwarders, etc) and runs that through makeself to deliver a single executable script which can then be run on any box to install the application.

We don’t call makeself from within the build. It is called by the CI server with the final zip archive created by the gradle as explained above.

I am trying to come up with a minimalistic example to share with you for further debugging.

What is baffling is that this all works pre gradle 2.4.

Does the application (generated by the application plugin) work properly if you run it on your local machine?

Yes, we have tested that. It works. In fact, I built the app using both 2.3 & 2.4 and extracted out the generated to compare each file by diff-ing them and there were no differences