Tarun4201 commented on code in PR #13277:
URL: https://github.com/apache/maven/pull/13277#discussion_r4115552074


##########
apache-maven/src/assembly/maven/bin/mvn.cmd:
##########
@@ -379,26 +381,65 @@ if "%~1"=="--debug" (
 )
 exit /b 0
 
+:readClappMainClass
+if not exist "%~1" exit /b 0
+for /f "usebackq tokens=1,* delims==" %%a in ("%~1") do (
+    if "%%a"=="mainClass" set "MAVEN_CLAPP_MAIN_CLASS=%%b"
+)
+exit /b 0
+
 :processArgs
 if "%~1"=="" exit /b 0
+set "_PROC_ARG=%~1"
+if "%_PROC_ARG%"=="--clapp" (
+    if "%~2"=="" (
+        echo Error: --clapp requires a tool name argument ^(e.g. --clapp 
mvnfoo^) >&2
+        goto error
+    )
+    set "MAVEN_MAIN_CLASS=org.apache.maven.cling.MavenClappCling"
+    set "MAVEN_CLAPP_NAME=%~2"
+    shift
+    shift
+    goto processArgs
+)
+if "%_PROC_ARG:~0,8%"=="--clapp=" (
+    set "MAVEN_MAIN_CLASS=org.apache.maven.cling.MavenClappCling"
+    set "MAVEN_CLAPP_NAME=%_PROC_ARG:~8%"
+    if "%MAVEN_CLAPP_NAME%"=="" (

Review Comment:
   Resolved in commit 11ba5409 (checked %_PROC_ARG:~8% directly instead of 
%MAVEN_CLAPP_NAME% inside the parenthesized block to avoid delayed expansion 
pitfall).



-- 
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