-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gradlew.bat/mvnw.bat should NOT be executable #923
gradlew.bat/mvnw.bat should NOT be executable #923
Conversation
@@ -60,7 +60,7 @@ public void apply(GeneratorContext generatorContext) { | |||
generatorContext.addTemplate("gradleWrapperJar", new BinaryTemplate(WRAPPER_JAR, classLoader.getResource(WRAPPER_JAR))); | |||
generatorContext.addTemplate("gradleWrapperProperties", new URLTemplate(WRAPPER_PROPS, classLoader.getResource(WRAPPER_PROPS))); | |||
generatorContext.addTemplate("gradleWrapper", new URLTemplate("gradlew", classLoader.getResource("gradle/gradlew"), true)); | |||
generatorContext.addTemplate("gradleWrapperBat", new URLTemplate("gradlew.bat", classLoader.getResource("gradle/gradlew.bat"), true)); | |||
generatorContext.addTemplate("gradleWrapperBat", new URLTemplate("gradlew.bat", classLoader.getResource("gradle/gradlew.bat"), false)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last argument that is changed to false
- executable
Does this not impact Windows users? They would now have to manually set the file to be executable, correct? |
@jameskleeh no, it does not affect Windows users. Windows does not have executable flag in file system.
No, they will not notice anything |
Thanks |
If the gradle project is generated, the root directory listing has these gradle-wrapper related files:
The problem is that the second one, the bat file should not be executable, because it is auto-suggested in the shell to be executed, it raises inconvenience and requires manual fixing (via chmod). You can ensure and just list e.g. root directory of micronaut-starter:
The first file for *nix has the executable flag, the second file for Windows - does not.
This PR addresses the issue.
How to check: e.g. run Application in
starter-web-netty
module, then executecurl "http://localhost:8080/create/DEFAULT/example?build=gradle" -o example.zip
and unpack the archive.The same for maven wrapper bat executable.