Linux install maven

  1. View distributions

    lsb_release -a

    My machine was bought by Ali Yun of Centos8.3.2011
  2. To the maven website to download the corresponding version (Linux) http://maven.apache.org/downl… If the website not go [open source image, tsinghua university] download (https://mirrors.tuna.tsinghua…
  3. Maven: /mydata/maven: /mydata/maven: /mydata/maven: /mydata/maven



    Decompression of the

    The tar ZXVF - apache maven - 3.6.3 - bin. Tar. Gz
  4. Configure the environment variables after unzipping

    /mydata/maven/apache-maven-3.6.3 export PATH=$MAVEN_HOME/bin:$PATH # Reload the configuration file source /etc/profile
  5. MVN-V will see the following output for success

    [root @ aliyun maven] # MVN -v Apache maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) maven home: /mydata/maven/apache-maven-3.6.3 Java version: 1.8.0_292, vendor: Red Hat, Inc., runtime: /usr/lib/ JVM/java-1.8.0-OpenJDK-1.8.0.292.b10-1.el8_4.x86_64 / JRE Default Locale: en_US, Platform Encoding: UTF-8 OS name: "Linux ", version:" 4.18.0-240.22.1.el83.x86_64 ", arch: "amd64", family: "UNIX"

6. Configure the Maven Settings file:

Configure the LocalRepository TAB in the conf/settings.xml file in the Maven installation path

 <localRepository>/mydata/maven/repository</localRepository>

Configure the image source address

<mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
       <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>
</mirror>

Save the file and exit wq

Execute the command:mvn help:system



See the results above for success

Maven related

Linux install maven


Linux Maven installation and configuration


Some common images and domestic Maven repositories are recommended


To be honest | the maven command, you will be a few