Skip to content

spring-boot-gradle-plugin-2.0.0.M2 : Output Jar not executable (Permission denied error) #9632

@nklmish

Description

@nklmish

As per gradle-plugin-2.0.0.M2-docs , we can produce executable jars by adding

bootJar {
	launchScript {
		included = true
	}
}

but after applying those setting I am still receiving permission denied: ./non-working-executable-0.0.1-SNAPSHOT.jar

But if I downgrade to version 1.5.4 and add springBoot { executable = true }

the produced jar is executed without any errors

How to Reproduce ?
I have attached two projects (generated via start.spring.io using different spring version).
non-working-executable.zip
working-executable.zip

  1. cd to project directory
  2. execute ./gradlew clean build
  3. execute ./build/libs/*.jar

In non-working-executable we receive permission denied error.

Current work-around
Need to manually set the executable bit on the jar file by executing chmod +x ./build/libs/*.jar

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions