ubuntu_maven

来源:互联网 发布:用什么相机拍淘宝衣服 编辑:程序博客网 时间:2024/06/06 17:12

ubuntu环境设置maven


   sudo gedit /etc/profile  


 #set maven environmentM2_HOME=/fushihua/dev/soft/java/maven/apache-maven-3.3.3export MAVEN_OPTS="-Xms256m -Xmx512m"export PATH=$M2_HOME/bin:$PATH 

要使配置生效必须重启机器或者在命令行输入:

. /etc/profile

查看maven是否安装成功:

mvn -version


配置用户范围setting.xml:

sudo cp /fushihua/dev/soft/java/maven/apache-maven-3.3.3/conf/settings.xml ~/.m2 sudo gedit ~/.m2/settings.xml

  <!-- localRepository   | The path to the local repository maven will use to store artifacts.   |   | Default: ${user.home}/.m2/repository  <localRepository>/path/to/local/repo</localRepository>  --><localRepository>/fushihua/dev/workspaces/maven/localRepository</localRepository>


0 0
原创粉丝点击