文章目录
  1. 1. Linux下安装Apache Maven攻略
    1. 1.1. 系统要求
    2. 1.2. 下载安装包
    3. 1.3. 解压及安装

Linux下安装Apache Maven攻略


系统要求

  • Java Development Kit (JDK)

    Maven 3.3 requires JDK 1.7 or above to execute it still allows you to build against 1.3 and other JDK versions by Using Toolchains

  • Memory

    No minimum requirement

  • Disk

    Approximately 10MB is required for the Maven installation itself. In addition to that, additional disk space will be used for your local Maven repository. The size of your local repository will vary depending on usage but expect at least 500MB.

  • Operating System

    No minimum requirement. Start up scripts are included as shell scripts and Windows batch files.

下载安装包

wget http://mirrors.cnnic.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz

解压及安装

tar xzvf apache-maven-3.3.9-bin.tar.gz

修改环境变量 – 把opt改为apache maven的当前路径

export PATH=/opt/apache-maven-3.3.9/bin:$PATH

安装确认

mvn -v

结果应显示为

Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T04:57:37-07:00)
Maven home: /opt/apache-maven-3.3.3
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.8.5", arch: "x86_64", family: "mac"
文章目录
  1. 1. Linux下安装Apache Maven攻略
    1. 1.1. 系统要求
    2. 1.2. 下载安装包
    3. 1.3. 解压及安装