Skip to content
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

args in runShadow are not added into start scripts #891

Closed
injecteer opened this issue Oct 12, 2023 · 1 comment
Closed

args in runShadow are not added into start scripts #891

injecteer opened this issue Oct 12, 2023 · 1 comment

Comments

@injecteer
Copy link

injecteer commented Oct 12, 2023

Please check the User Guide before submitting "how do I do 'x'?" questions!

Shadow Version 8.1.1

Gradle Version 8.4

Expected Behavior

The args config parameter should be used along with applicationDefaultJvmArgs and be written in scriptsShadow/* scripts

Actual Behavior

args are not to be found in run-scripts

Gradle Build Script(s)

plugins {
  id 'application'
  id 'com.github.johnrengelman.shadow' version '8.1.1'
}

applicationDefaultJvmArgs = [
  '-Djava.net.preferIPv4Stack=true', 
  '-Dfile.encoding=UTF-8',
  // hazelcast args for Java 9+
  '--add-modules', 'java.se', 
  '--add-exports', 'java.base/jdk.internal.ref=ALL-UNNAMED', 
  '--add-opens', 'java.base/java.lang=ALL-UNNAMED', 
  '--add-opens', 'java.base/java.nio=ALL-UNNAMED', 
  '--add-opens', 'java.base/sun.nio.ch=ALL-UNNAMED', 
  '--add-opens', 'java.management/sun.management=ALL-UNNAMED', 
  '--add-opens', 'jdk.management/com.sun.management.internal=ALL-UNNAMED'
]

runShadow {
  args '-Dvertxweb.environment=prod', '-cluster'
}

Content of Script files

scriptsShadow.zip

@Goooler Goooler changed the title shadowRun ignores the "args" parameter Honor applicationDefaultJvmArgs and write it in to start scripts Jan 26, 2025
@Goooler Goooler changed the title Honor applicationDefaultJvmArgs and write it in to start scripts args in runShadow are not added into start scripts Jan 26, 2025
@Goooler
Copy link
Member

Goooler commented Jan 26, 2025

args in runShadow can't be added into start scripts, you should call them like:

./unixStartScript.sh '-Dvertxweb.environment=prod', '-cluster'

@Goooler Goooler closed this as not planned Won't fix, can't repro, duplicate, stale Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants