@@ -44,12 +44,12 @@ set TEST_SKIP=true
4444goto parse_args
4545
4646:print_help
47- echo Usage: %0 [options]
47+ echo Usage: %~n0 [options]
4848echo Fast local compilation with incremental build and caching
4949echo Options:
5050echo -c Execute clean goal (removes build artifacts)
51- echo -i Execute install goal (builds and installs the project)
5251echo -p Execute compile goal (compiles the source code)
52+ echo -i Execute install goal (builds and installs the project)
5353echo -t Execute test goal (runs the tests)
5454echo -s Execute spotless:apply (format the code)
5555echo -d Execute dependency:tree (displays the dependency tree)
@@ -58,44 +58,48 @@ echo -f Specify profiles, default is %PROFILES%
5858echo -h Display this help message
5959echo .
6060echo Examples:
61- echo %0 -c -i Execute clean, install goals
62- echo %0 -s Execute spotless:apply
63- echo %0 -t -m dubbo-config Execute test goal for dubbo-config module
64- echo %0 -c -p -m dubbo-common Execute clean, compile the dubbo-common module
65- echo %0 -d Display the dependency tree
61+ echo %~n0 Execute install goal compilation
62+ echo %~n0 -m Execute a minimal compilation
63+ echo %~n0 -c -i Execute clean, install goals compilation
64+ echo %~n0 -s Execute spotless:apply
65+ echo %~n0 -d Display the dependency tree
66+ echo %~n0 -t -m dubbo-config Execute test goal for dubbo-config module
67+ echo %~n0 -c -p -m dubbo-common Execute clean, compile the dubbo-common module
6668exit /b
6769
6870:parse_args
6971set ARG = %~1
7072if " %ARG% " == " " goto check_args
71- if " %ARG% " == " -c" set ARGS = %ARGS% clean
72- if " %ARG% " == " -i" set ARGS = %ARGS% install
73- if " %ARG% " == " -p" set ARGS = %ARGS% compile
74- if " %ARG% " == " -t" (
73+ if " %ARG% " == " -c" (
74+ set ARGS = %ARGS% clean
75+ ) else if " %ARG% " == " -p" (
76+ set ARGS = %ARGS% compile
77+ ) else if " %ARG% " == " -i" (
78+ set ARGS = %ARGS% install
79+ ) else if " %ARG% " == " -t" (
7580 set ARGS = %ARGS% test
7681 set TEST_SKIP = false
77- )
78- if " %ARG% " == " -s" (
82+ ) else if " %ARG% " == " -s" (
7983 set ARGS = %ARGS% spotless:apply
8084 set PROFILES = sources
81- )
82- if " %ARG% " == " -d " set ARGS = %ARGS% dependency:tree
83- if " %ARG% " == " -m" (
85+ ) else if " %ARG% " == " -d " (
86+ set ARGS = %ARGS% dependency:tree
87+ ) else if " %ARG% " == " -m" (
8488 if " %~2 " == " " (
8589 set MODULES = -pl %DEFAULT_MODULES% -am
8690 ) else (
8791 set MODULES = -pl %~2 -am
8892 shift
8993 )
90- )
91- if " %ARG% " == " -f" (
94+ ) else if " %ARG% " == " -f" (
9295 set PROFILES = %~2
9396 shift
94- )
95- if " %ARG% " == " -h " goto print_help
96- if " %ARG:~ 0 , 1 % " neq " - " (
97+ ) else if " %ARG% " == " -h " (
98+ goto print_help
99+ ) else (
97100 set ARGS = %ARGS% %ARG%
98101)
102+
99103shift
100104goto parse_args
101105
0 commit comments