Linux-Centos 安装Maven
Linux安装Maven下载Maven上传并解压配置settings.xml配置环境变量下载Mavenhttp://maven.apache.org/download.cgi官网自行下载压缩包。往下划拉划拉找到 files上传并解压下载之后 上传maven到linux系统解压命令tar -zxvf apache-maven-3.6.3-bin.tar.gz配置settings.xml进入解压后的文
·
Linux安装Maven
下载Maven
http://maven.apache.org/download.cgi
官网自行下载压缩包。往下划拉划拉找到 files
上传并解压
下载之后 上传maven到linux系统
解压命令tar -zxvf apache-maven-3.6.3-bin.tar.gz
配置settings.xml
进入解压后的文件夹,将settings.xml原始文件进行备份。
自行修改镜像,私服,JDK,仓库的信息
自定义仓库位置
<localRepository>/usr/local/zhzhouq9/repository</localRepository>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
配置环境变量
先执行命令 vim /etc/profile
export MAVEN_HOME=/usr/local/zhzhouq9/apache-maven-3.5.0
export PATH=$MAVEN_HOME/bin:$PATH
运行source /etc/profile,使/etc/profile文件刷新生效,或者重启;
运行 mvn -version 如果能输出maven的版本信息即安装成功
更多推荐
已为社区贡献1条内容
所有评论(0)