File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -172,10 +172,14 @@ find_file_argument_basedir() {
172172)
173173}
174174
175- # concatenates all lines of a file
175+ # concatenates all lines of a file and replaces variables
176176concat_lines () {
177177 if [ -f " $1 " ]; then
178- echo " ` tr -s ' \r\n' ' ' < " $1 " ` "
178+ # First transform line endings to spaces
179+ content=$( tr -s ' \r\n' ' ' < " $1 " )
180+ # Handle both ${var} and $var formats, only substitute MAVEN_PROJECTBASEDIR
181+ echo " $content " | sed -e " s|\$ {MAVEN_PROJECTBASEDIR}|$MAVEN_PROJECTBASEDIR |g" \
182+ -e " s|\$ MAVEN_PROJECTBASEDIR|$MAVEN_PROJECTBASEDIR |g"
179183 fi
180184}
181185
Original file line number Diff line number Diff line change @@ -165,7 +165,13 @@ set "jvmConfig=\.mvn\jvm.config"
165165if not exist " %MAVEN_PROJECTBASEDIR%%jvmConfig% " goto endReadAdditionalConfig
166166
167167@ setlocal EnableExtensions EnableDelayedExpansion
168- for /F " usebackq delims=" %%a in (" %MAVEN_PROJECTBASEDIR% \.mvn\jvm.config" ) do set JVM_CONFIG_MAVEN_PROPS = !JVM_CONFIG_MAVEN_PROPS! %%a
168+ set JVM_CONFIG_MAVEN_OPTS =
169+ for /F " usebackq delims=" %%a in (" %MAVEN_PROJECTBASEDIR% \.mvn\jvm.config" ) do (
170+ set " line = %%a "
171+ set " line = !line:$MAVEN_PROJECTBASEDIR =%MAVEN_PROJECTBASEDIR% ! "
172+ set " line = !line:${MAVEN_PROJECTBASEDIR} =%MAVEN_PROJECTBASEDIR% ! "
173+ set JVM_CONFIG_MAVEN_OPTS = !JVM_CONFIG_MAVEN_OPTS! !line!
174+ )
169175@ endlocal & set JVM_CONFIG_MAVEN_PROPS = %JVM_CONFIG_MAVEN_PROPS%
170176
171177:endReadAdditionalConfig
You can’t perform that action at this time.
0 commit comments