• CentOS 安装 maven


    [root@localhost local]# wget http://mirror.bit.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
    --2019-04-02 04:19:21--  http://mirror.bit.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
    Resolving mirror.bit.edu.cn (mirror.bit.edu.cn)... 114.247.56.117
    Connecting to mirror.bit.edu.cn (mirror.bit.edu.cn)|114.247.56.117|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 8491533 (8.1M) [application/octet-stream]
    Saving to: ‘apache-maven-3.3.9-bin.tar.gz’
    
    100%[=========================================>] 8,491,533   1.23MB/s   in 5.6s   
    
    2019-04-02 04:19:27 (1.46 MB/s) - ‘apache-maven-3.3.9-bin.tar.gz’ saved [8491533/8491533]
    
    [root@localhost local]# ll
    
    total 8300
    -rw-r--r--. 1 root root 8491533 Nov 18  2015 apache-maven-3.3.9-bin.tar.gz
    drwxr-xr-x. 2 root root     107 Mar  3 15:00 bin
    drwxr-xr-x. 2 root root    4096 Apr  2 00:55 deploy
    drwxr-xr-x. 2 root root       6 Apr 11  2018 etc
    drwxr-xr-x. 2 root root       6 Apr 11  2018 games
    drwxr-xr-x. 2 root root       6 Apr 11  2018 include
    drwxr-xr-x. 3 root root      52 Apr  1 21:17 java
    drwxr-xr-x. 3 root root      19 Mar  3 14:59 lib
    drwxr-xr-x. 2 root root       6 Apr 11  2018 lib64
    drwxr-xr-x. 2 root root       6 Apr 11  2018 libexec
    drwxr-xr-x. 2 root root       6 Apr 11  2018 sbin
    drwxr-xr-x. 5 root root      46 Apr 11  2018 share
    drwxr-xr-x. 2 root root       6 Apr 11  2018 src
    
    [root@localhost local]# tar -zvxf apache-maven-3.3.9-bin.tar.gz
    apache-maven-3.3.9/boot/plexus-classworlds-2.5.2.jar
    apache-maven-3.3.9/lib/maven-embedder-3.3.9.jar
    apache-maven-3.3.9/lib/maven-settings-3.3.9.jar
    apache-maven-3.3.9/lib/plexus-utils-3.0.22.jar
    apache-maven-3.3.9/lib/maven-core-3.3.9.jar
    apache-maven-3.3.9/lib/maven-model-3.3.9.jar
    apache-maven-3.3.9/lib/commons-lang3-3.4.jar
    apache-maven-3.3.9/lib/maven-settings-builder-3.3.9.jar
    apache-maven-3.3.9/lib/maven-builder-support-3.3.9.jar
    apache-maven-3.3.9/lib/plexus-interpolation-1.21.jar
    apache-maven-3.3.9/lib/plexus-component-annotations-1.6.jar
    apache-maven-3.3.9/lib/plexus-sec-dispatcher-1.3.jar
    apache-maven-3.3.9/lib/plexus-cipher-1.7.jar
    apache-maven-3.3.9/lib/maven-repository-metadata-3.3.9.jar
    apache-maven-3.3.9/lib/maven-artifact-3.3.9.jar
    apache-maven-3.3.9/lib/maven-plugin-api-3.3.9.jar
    apache-maven-3.3.9/lib/org.eclipse.sisu.plexus-0.3.2.jar
    apache-maven-3.3.9/lib/cdi-api-1.0.jar
    apache-maven-3.3.9/lib/jsr250-api-1.0.jar
    apache-maven-3.3.9/lib/javax.inject-1.jar
    apache-maven-3.3.9/lib/org.eclipse.sisu.inject-0.3.2.jar
    apache-maven-3.3.9/lib/maven-model-builder-3.3.9.jar
    apache-maven-3.3.9/lib/guava-18.0.jar
    apache-maven-3.3.9/lib/maven-aether-provider-3.3.9.jar
    apache-maven-3.3.9/lib/aether-api-1.0.2.v20150114.jar
    apache-maven-3.3.9/lib/aether-spi-1.0.2.v20150114.jar
    apache-maven-3.3.9/lib/aether-util-1.0.2.v20150114.jar
    apache-maven-3.3.9/lib/aether-impl-1.0.2.v20150114.jar
    apache-maven-3.3.9/lib/guice-4.0-no_aop.jar
    apache-maven-3.3.9/lib/aopalliance-1.0.jar
    apache-maven-3.3.9/lib/maven-compat-3.3.9.jar
    apache-maven-3.3.9/lib/wagon-provider-api-2.10.jar
    apache-maven-3.3.9/lib/slf4j-api-1.7.5.jar
    apache-maven-3.3.9/lib/commons-cli-1.2.jar
    apache-maven-3.3.9/lib/wagon-http-2.10-shaded.jar
    apache-maven-3.3.9/lib/wagon-http-shared-2.10.jar
    apache-maven-3.3.9/lib/jsoup-1.7.2.jar
    apache-maven-3.3.9/lib/commons-lang-2.6.jar
    apache-maven-3.3.9/lib/commons-io-2.2.jar
    apache-maven-3.3.9/lib/wagon-file-2.10.jar
    apache-maven-3.3.9/lib/aether-connector-basic-1.0.2.v20150114.jar
    apache-maven-3.3.9/lib/aether-transport-wagon-1.0.2.v20150114.jar
    apache-maven-3.3.9/lib/slf4j-simple-1.7.5.jar
    apache-maven-3.3.9/README.txt
    apache-maven-3.3.9/LICENSE
    apache-maven-3.3.9/NOTICE
    apache-maven-3.3.9/lib/
    apache-maven-3.3.9/lib/aether-api.license
    apache-maven-3.3.9/lib/aether-connector-basic.license
    apache-maven-3.3.9/lib/aether-impl.license
    apache-maven-3.3.9/lib/aether-spi.license
    apache-maven-3.3.9/lib/aether-transport-wagon.license
    apache-maven-3.3.9/lib/aether-util.license
    apache-maven-3.3.9/lib/cdi-api.license
    apache-maven-3.3.9/lib/commons-lang3.license
    apache-maven-3.3.9/lib/jsoup.license
    apache-maven-3.3.9/lib/jsr250-api.license
    apache-maven-3.3.9/lib/maven-aether-provider.license
    apache-maven-3.3.9/lib/maven-artifact.license
    apache-maven-3.3.9/lib/maven-builder-support.license
    apache-maven-3.3.9/lib/maven-compat.license
    apache-maven-3.3.9/lib/maven-core.license
    apache-maven-3.3.9/lib/maven-embedder.license
    apache-maven-3.3.9/lib/maven-model-builder.license
    apache-maven-3.3.9/lib/maven-model.license
    apache-maven-3.3.9/lib/maven-plugin-api.license
    apache-maven-3.3.9/lib/maven-repository-metadata.license
    apache-maven-3.3.9/lib/maven-settings-builder.license
    apache-maven-3.3.9/lib/maven-settings.license
    apache-maven-3.3.9/lib/org.eclipse.sisu.inject.license
    apache-maven-3.3.9/lib/org.eclipse.sisu.plexus.license
    apache-maven-3.3.9/lib/plexus-cipher.license
    apache-maven-3.3.9/lib/plexus-sec-dispatcher.license
    apache-maven-3.3.9/lib/slf4j-api.license
    apache-maven-3.3.9/lib/slf4j-simple.license
    apache-maven-3.3.9/lib/wagon-file.license
    apache-maven-3.3.9/lib/wagon-http-shared.license
    apache-maven-3.3.9/lib/wagon-http.license
    apache-maven-3.3.9/lib/wagon-provider-api.license
    apache-maven-3.3.9/bin/m2.conf
    apache-maven-3.3.9/bin/mvn.cmd
    apache-maven-3.3.9/bin/mvnDebug.cmd
    apache-maven-3.3.9/bin/mvn
    apache-maven-3.3.9/bin/mvnDebug
    apache-maven-3.3.9/bin/mvnyjp
    apache-maven-3.3.9/conf/
    apache-maven-3.3.9/conf/logging/
    apache-maven-3.3.9/conf/logging/simplelogger.properties
    apache-maven-3.3.9/conf/settings.xml
    apache-maven-3.3.9/conf/toolchains.xml
    apache-maven-3.3.9/lib/ext/
    apache-maven-3.3.9/lib/ext/README.txt
    
    [root@localhost local]# mv apache-maven-3.3.9 maven
    [root@localhost local]# ll
    total 4
    drwxr-xr-x. 2 root root  107 Mar  3 15:00 bin
    drwxr-xr-x. 2 root root 4096 Apr  2 00:55 deploy
    drwxr-xr-x. 2 root root    6 Apr 11  2018 etc
    drwxr-xr-x. 2 root root    6 Apr 11  2018 games
    drwxr-xr-x. 2 root root    6 Apr 11  2018 include
    drwxr-xr-x. 3 root root   52 Apr  1 21:17 java
    drwxr-xr-x. 3 root root   19 Mar  3 14:59 lib
    drwxr-xr-x. 2 root root    6 Apr 11  2018 lib64
    drwxr-xr-x. 2 root root    6 Apr 11  2018 libexec
    drwxr-xr-x. 6 root root   92 Apr  2 04:19 maven
    drwxr-xr-x. 2 root root    6 Apr 11  2018 sbin
    drwxr-xr-x. 5 root root   46 Apr 11  2018 share
    drwxr-xr-x. 2 root root    6 Apr 11  2018 src
    [root@localhost local]# vi /etc/profile
    [root@localhost local]# source /etc/profile
    [root@localhost local]# mvn -version
    Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T11:41:47-05:00)
    Maven home: /usr/local/maven
    Java version: 1.8.0_202, vendor: Oracle Corporation
    Java home: /usr/local/java/jdk1.8/jre
    Default locale: en_US, platform encoding: UTF-8
    OS name: "linux", version: "3.10.0-862.14.4.el7.x86_64", arch: "amd64", family: "unix"
    
    ERLANG_HOME=/usr/local/lib/erlang
    JAVA_HOME=/usr/local/java/jdk1.8
    JRE_HOME=/usr/local/java/jdk1.8/jre
    MAVEN_HOME=/usr/local/maven
    PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$ERLANG_HOME/bin:$MAVEN_HOME/bin
    CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
    export ERLANG_HOME JAVA_HOME JRE_HOME PATH CLASSPATH
    
  • 相关阅读:
    什么是JAVA内容仓库(Java Content Repository)(3)
    Documentum 中 Type定义与存储
    洛谷 P1421 小玉买文具
    校内 第一届ACM校赛——热身赛
    洛谷 P1307 数字反转
    洛谷P1579 哥德巴赫猜想(升级版)
    51单片机 第三节 独立按键
    51单片机 第四节 数码管
    校内 第一届ACM校赛——正赛
    51单片机 第二节 点亮LED
  • 原文地址:https://www.cnblogs.com/panzi/p/10652433.html
Copyright © 2020-2023  润新知