当前位置: 首页 > Linux

Maven部署介绍

时间:2023-04-06 20:22:59 Linux

环境要求Linux环境Maven3.3+需要JDK1.7部署方式Mac部署Maven方式Mac部署方式是使用brew命令安装maven,命令为brewinstallmaven由于国内使用比较慢,需要更换国内源才能加快下载速度。下面更新homebrew-cask时,可能找不到文件。这是正常的,可以忽略~#替换国内镜像的方式git-C"$(brew--repo)"remoteset-urloriginhttps://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.gitgit-C"$(brew--repohomebrew/core)"remoteset-urloriginhttps://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.gitgit-C"$(brew--repohomebrew/cask)"remoteset-urloriginhttps://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.gitbrewupdate#恢复国外镜像的方法git-C"$(brew--repo)"远程设置url来源https://github.com/Homebrew/brew.gitgit-C"$(brew--repohomebrew/core)"远程设置url来源https://github.com/Homebrew/homebrew-core.gitgit-C"$(brew--repohomebrew/cask)"remoteset-urloriginhttps://github.com/Hoapache-maven-3.6.3-bin.tar.gzmebrew/homebrew-cask.gitbrewupdateLinux一般方法是通过Maven官方地址下载对应版本的压缩文件:http://maven.apache.org/downl...对应版本会有环境要求,例如Maven3.3+需要JDK1.7及以上版本。见下文。#下载Maven文件并存放在/usr/local/目录下cd/usr/local/#解压后删除源文件tar-zxvfapache-maven-3.6.3-bin.tar.gzrm-rfapache-maven-3.6.3-bin.tar.gz#为这个用户配置环境变量cat>>~/.bash_profile<