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


##########
apache-maven/src/assembly/maven/bin/mvnDebug.ps1:
##########
@@ -0,0 +1,42 @@
+<#
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+-----------------------------------------------------------------------------
+Apache Maven Debug Script
+
+Environment Variable Prerequisites
+
+JAVA_HOME           (Optional) Points to a Java installation.
+MAVEN_OPTS          (Optional) Java runtime options used when Maven is 
executed.
+MAVEN_SKIP_RC       (Optional) Flag to disable loading of mavenrc files.
+MAVEN_DEBUG_ADDRESS (Optional) Set the debug address. Default value is 
localhost:8000
+-----------------------------------------------------------------------------
+#>

Review Comment:
   Maybe license hedader and description should be separate comment blocks...



##########
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_location = $path + "\.mvn\jvm.config"

Review Comment:
   The name of this var is weird, this is not about the JVM location, but 
rather `$jvm_config`?



##########
apache-maven/src/assembly/shared/mvnvalidate.ps1:
##########
@@ -0,0 +1,7 @@
+# check mvn home
+$MAVEN_HOME = (Get-Item $PSScriptRoot).Parent
+
+# check if maven command exists
+if (-not (Test-path "$MAVEN_HOME\bin\mvn.ps1")) {
+    Write-Error -Message "maven command (\bin\mvn.ps1) cannot be found" 
-ErrorAction Stop

Review Comment:
   Why not `($MAVEN_HOME \bin\mvn.ps1)`?
   Do we have such a message with the other scripts?



##########
apache-maven/src/assembly/shared/mvnvalidate.ps1:
##########
@@ -0,0 +1,7 @@
+# check mvn home
+$MAVEN_HOME = (Get-Item $PSScriptRoot).Parent
+
+# check if maven command exists
+if (-not (Test-path "$MAVEN_HOME\bin\mvn.ps1")) {
+    Write-Error -Message "maven command (\bin\mvn.ps1) cannot be found" 
-ErrorAction Stop

Review Comment:
   Maven...



##########
apache-maven/src/assembly/shared/run.ps1:
##########
@@ -0,0 +1,13 @@
+& $JAVACMD `
+  $MAVEN_OPTS `
+  $MAVEN_DEBUG_OPTS `
+  -classpath $LAUNCHER_JAR `

Review Comment:
   Will this handle spaces in `$LAUNCHER_JAR`?



##########
apache-maven/src/assembly/maven/bin/mvnDebug.ps1:
##########
@@ -0,0 +1,42 @@
+<#
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+-----------------------------------------------------------------------------
+Apache Maven Debug Script
+
+Environment Variable Prerequisites
+
+JAVA_HOME           (Optional) Points to a Java installation.
+MAVEN_OPTS          (Optional) Java runtime options used when Maven is 
executed.
+MAVEN_SKIP_RC       (Optional) Flag to disable loading of mavenrc files.
+MAVEN_DEBUG_ADDRESS (Optional) Set the debug address. Default value is 
localhost:8000
+-----------------------------------------------------------------------------
+#>
+
+# set title
+$Host.UI.RawUI.WindowTitle = $MyInvocation.MyCommand
+
+if (-not $env:MAVEN_DEBUG_ADDRESS ) {
+  $env:MAVEN_DEBUG_ADDRESS = "8000"

Review Comment:
   This does not correspond to the description



##########
apache-maven/src/assembly/shared/validate.ps1:
##########
@@ -0,0 +1,52 @@
+<#
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+-----------------------------------------------------------------------------
+Apache Maven Startup Script
+
+Environment Variable Prerequisites
+
+  JAVA_HOME       (Optional) Points to a Java installation.
+  MAVEN_ARGS      (Optional) Arguments passed to Maven before CLI arguments.
+  MAVEN_OPTS      (Optional) Java runtime options used when Maven is executed.
+  MAVEN_SKIP_RC   (Optional) Flag to disable loading of mavenrc files.
+-----------------------------------------------------------------------------
+#>

Review Comment:
   Same here



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to