Skip to content

Instantly share code, notes, and snippets.

@FlorianLatapie
Last active November 7, 2023 13:10
Show Gist options
  • Save FlorianLatapie/3c3125a2a371dc08991313401f04db65 to your computer and use it in GitHub Desktop.
Save FlorianLatapie/3c3125a2a371dc08991313401f04db65 to your computer and use it in GitHub Desktop.
Apache Maven 3.8.6 auto install script for Windows *run the script with admin privileges*
@ECHO off
REM @Author Florian Latapie
echo Apache Maven auto install script for Windows & echo. & echo Downloading the zip file & echo.
curl -o tmp.zip https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.zip
echo Installation & echo.
powershell -command "Expand-Archive tmp.zip 'C:\Program Files\apache'"
setx /M PATH "%PATH%;C:\Program Files\apache\apache-maven-3.8.6\bin"
del tmp.zip
echo. & echo Installation complete, you can now use Maven from a new shell
timeout 10
@schtritoff
Copy link

Thanks for the script. I made powershell version for non-admin (aka user installation) if somebody needs - available at https://gist.github.com/schtritoff/60a468d30707801510fd5c36d851550f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment