michael-o commented on code in PR #878:
URL: https://github.com/apache/maven/pull/878#discussion_r1582075040


##########
apache-maven/src/assembly/shared/init.ps1:
##########
@@ -0,0 +1,83 @@
+# ==== END VALIDATION ====
+
+$CLASSWORLDS_CONF = "$MAVEN_HOME\bin\m2.conf"
+
+# Find the project basedir, i.e., the directory that contains the directory 
".mvn".
+# Fallback to current working directory if not found.
+
+$WDIR = Get-Location
+
+# Look for the --file switch and start the search for the .mvn directory from 
the specified
+# POM location, if supplied.
+
+$i = 0
+$file_flag_found = $false
+foreach ($arg in $args) {
+  if (($arg -ceq "-f") -or ($arg -ceq "--file")) {
+    $file_flag_found = $true
+    break
+  }
+  $i += 1
+}
+
+function IsNotRoot {
+  param (
+    [String] $path
+  )
+  $root_path_base_name = ((get-item $path).Root.BaseName
+  $path_base_name = ((get-item $path).BaseName
+
+  return $root_path_base_name -ne $path_base_name
+}
+
+function RetrieveContentsJvmConfig {
+  param (
+    [String] $path
+  )
+
+  $jvm_config = $path + "\.mvn\jvm.config"
+
+  if (Test-Path $jvm_config) {
+    return $env:MAVEN_OPTS + " " + -Join (Get-Content $jvm_config)
+  }
+  return $env:MAVEN_OPTS

Review Comment:
   You are joining the content of the `jvm.config` file with `MAVEN_OPTS` 
variable in one guy. From a caller's perspective that should not be done and it 
is not obvious from where the config comes. Look at the original files, they do 
not merge them.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to