- maven maven official website to download archive (tar-gz mode) to the local address as
https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/ - Maven by introducing compressed software Xftp 6
- Decompression (tar -zxvf archive)
tar -zxvf apache-maven-3.5.4-bin.tar.gz
- File to the specified file decompression after moving the folder and rename (remember the path, with follow-up required environment variables)
- Enter / conf directory after extracting file, settings.xml configuration file (vim settings.xml)
- After entering the configuration file, first configure maven local repository, copy the 53 lines to 55 lines (: set nu show line numbers), the local repository path label configured for the individual
<localRepository>/opt/jarstore</localRepository>
- Ali cloud mirroring configuration, FIG lower position (<mirrors> disposed within the following code), save and exit
<mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url>https://maven.aliyun.com/repository/central</url> </mirror> <mirror> <id>aliyun-maven</id> <mirrorOf>*</mirrorOf> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> </mirror>
- Configuration environment variable
vim /etc/profile
- After entering the configuration file (path MAVEN_HOME write complete personal file compression) and finally adding the following two lines of code, save and exit
export MAVEN_HOME=/opt/inst/maven354 export PATH=$PATH:$MAVEN_HOME/bin
- Activation profile
source /etc/profile
- Often the installation is completed to see if maven
mvn -version
Linux installation and configuration Maven Ali cloud images
Guess you like
Origin blog.51cto.com/14497235/2430282
Ranking