Skip to content

Commit ec0aebd

Browse files
committed
[OPENJDK-2009] Move JAVA_OPTIONS specification to s2i/bash module
JAVA_OPTIONS is an old deprecated variable that was replaced by JAVA_OPTS. If JAVA_OPTS is unset, but JAVA_OPTIONS set, it should be used to populate JAVA_OPTS, for the images that support it. The definition of JAVA_OPTIONS was in modules/jvm/api, but the implementation is in modules/s2i/bash. The former module is included by the runtime images, that don't use the latter; thus, at the moment documentation for the runtime images includes JAVA_OPTIONS but they have never supported it. Move the definition of JAVA_OPTIONS into the module that implements it. This removes the definition/documentation from the runtime images. Rework the descriptions. Signed-off-by: Jonathan Dowland <[email protected]>
1 parent 45c5da2 commit ec0aebd

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

modules/jvm/api/module.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
schema_version: 1
2+
23
name: jboss.container.java.jvm.api
34
version: '1.0'
45
description: ^
@@ -16,7 +17,6 @@ envs:
1617
description: User specified Java options to be appended to the generated options.
1718
This variable has no effect if `JAVA_OPTS` has been defined.
1819
example: "-Dsome.property=foo"
19-
example: "-Dsome.property=foo"
2020
- name: JAVA_MAX_MEM_RATIO
2121
description:
2222
Specify the maximum heap memory. Corresponds to the JVM argument
@@ -73,8 +73,3 @@ envs:
7373
- name: GC_CONTAINER_OPTIONS
7474
description: specify Java GC to use. The value of this variable should contain the necessary JRE command-line options to specify the required GC, which will override the default of `-XX:+UseParallelGC`.
7575
example: -XX:+UseG1GC
76-
# deprecated
77-
- name: JAVA_OPTIONS
78-
description: JVM options passed to the `java` command. Use **JAVA_OPTS**.
79-
example: "-verbose:class"
80-

modules/s2i/bash/module.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ description: Customization of common Maven S2I for Java S2I image.
66
envs:
77
- name: JBOSS_CONTAINER_JAVA_S2I_MODULE
88
value: /opt/jboss/container/java/s2i
9+
# deprecated
10+
- name: JAVA_OPTIONS
11+
description:
12+
If defined and `JAVA_OPTS` is not defined, use this value to
13+
populate `JAVA_OPTS`, overriding any JVM tuning parameters
14+
generated by the container run scripts.
15+
Deprecated. Please use `JAVA_OPTS` instead.
16+
example: "-verbose:class"
917

1018
execute:
1119
- script: configure.sh

0 commit comments

Comments
 (0)