Skip to content

[assemble] Escape line breaks in jvmOptions #1699

@bmarwell

Description

@bmarwell

Is your feature request related to a problem? Please describe.

Part of the feature assemble javaArchive:

assemble -> javaArchive -> $archiveName -> java -> jvmOptions

Currently, line breaks are preserved in jvmOptions -> universal.
Example:

                      <universal>
                        -Djdk.includeInExceptions=hostInfo
                        -Dfile.encoding=UTF-8
                        -Xms64m
                        -Xsoftmx=128m
                        -Xmx256m
                        -Xtune:virtualized
                        -Xcompressedrefs
                        -Xshareclasses:name=myapp
                        -Xshareclasses:nonfatal
                        -Xscmx=64m
                        -XX:SharedCacheHardLimit=128m
                        -XX:+IgnoreUnrecognizedVMOptions
                        -XX:+ExitOnOutOfMemoryError
                        -XX:ActiveProcessorCount=4
                      </universal>

Will result in:

# universal JVM options
JAVA_OPTS="$JAVA_OPTS -Djdk.includeInExceptions=hostInfo
                        -Dfile.encoding=UTF-8
                        -Xms64m
                        -Xsoftmx=128m
                        -Xmx256m
                        -Xtune:virtualized
                        -Xcompressedrefs
                        -Xshareclasses:name=myapp
                        -Xshareclasses:nonfatal
                        -Xscmx=64m
                        -XX:SharedCacheHardLimit=128m
                        -XX:+IgnoreUnrecognizedVMOptions
                        -XX:+ExitOnOutOfMemoryError
                        -XX:ActiveProcessorCount=4"

Describe the solution you'd like

I think that linebreaks are really not important for JAVA_OPTS.
Just replace them with banks.

Describe alternatives you've considered

Putting everything into one line, but that will usually exceed the maximum line length of my project.

Additional context

./.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions