Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Maven Installer for Debian

A bash script that installs the latest stable release of Apache Maven on Debian and its derivatives (Ubuntu, Linux Mint, etc.).

What it does

  1. Installs missing dependencies (curl, unzip, libxml2-utils) via apt-get if needed
  2. Queries Maven Central repository metadata to determine the latest stable version, excluding alpha, beta, and rc releases
  3. Downloads the binary ZIP archive from the official Apache Maven release mirror
  4. Extracts it to /opt/maven-X.Y.Z
  5. Creates a symlink /opt/maven pointing to /opt/maven-X.Y.Z
  6. Creates /etc/profile.d/maven.sh to set M2_HOME, MAVEN_HOME, and add Maven's bin directory to PATH

If the target directory already exists, the download and extraction steps are skipped.

Usage

sudo ./install-maven.sh

After installation, either log out and back in or source the environment file manually:

source /etc/profile.d/maven.sh

Then verify the installation:

mvn --version

Prerequisites

The script must be run as root (via sudo). It will automatically install any missing dependencies.

License

This project is licensed under the Apache License 2.0.

About

Install the latest stable version of Maven on Debian and its derivatives (Ubuntu, Linux Mint, etc.)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages