From f50de4ce9edf333e844ddd3af92e34f3eac90606 Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Sun, 19 Sep 2021 21:01:48 +0200 Subject: [PATCH] [MNG-7210] Deprecate mavenrc_{pre,post}.{bat,cmd} scripts This closes #545 --- apache-maven/src/assembly/shared/run.cmd | 2 ++ apache-maven/src/assembly/shared/validate.cmd | 2 ++ 2 files changed, 4 insertions(+) diff --git a/apache-maven/src/assembly/shared/run.cmd b/apache-maven/src/assembly/shared/run.cmd index 2ce22acaeb..04c1dffdc3 100755 --- a/apache-maven/src/assembly/shared/run.cmd +++ b/apache-maven/src/assembly/shared/run.cmd @@ -19,7 +19,9 @@ set ERROR_CODE=1 if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost @REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_post.bat" echo Warning: The mavenrc_post.bat script is deprecated and will be removed in a future version. >&2 if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" +if exist "%USERPROFILE%\mavenrc_post.cmd" echo Warning: The mavenrc_post.cmd script is deprecated and will be removed in a future version. >&2 if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" :skipRcPost diff --git a/apache-maven/src/assembly/shared/validate.cmd b/apache-maven/src/assembly/shared/validate.cmd index 90c5fde2a8..dc68027bfe 100644 --- a/apache-maven/src/assembly/shared/validate.cmd +++ b/apache-maven/src/assembly/shared/validate.cmd @@ -38,7 +38,9 @@ title %0 if not "%MAVEN_SKIP_RC%"=="" goto skipRc if exist "%PROGRAMDATA%\mavenrc.cmd" call "%PROGRAMDATA%\mavenrc.cmd" %* @REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_pre.bat" echo Warning: The mavenrc_pre.bat script is deprecated and will be removed in a future version. >&2 if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* +if exist "%USERPROFILE%\mavenrc_pre.cmd" echo Warning: The mavenrc_pre.cmd script is deprecated and will be removed in a future version. >&2 if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* if exist "%USERPROFILE%\mavenrc.cmd" call "%USERPROFILE%\mavenrc.cmd" %* :skipRc