Apache-maven-3.5 安装

筅森魡賤 提交于 2020-07-23 21:38:45

两种方式

1. yum安装

  wget http://download.hkyh.net:28066/maven/epel-apache-maven.repo
  yum -y install apache-maven

2. 源码安装

  cd /usr/local/

  下载 https://share.weiyun.com/lWYvWb3R

  unzip apache-maven-3.5.3.zip

  ln -s /usr/local/apache-maven-3.5.3/bin/mvn /usr/local/bin/

  vim /etc/profile        #追加

  export MAVEN_HOME=/apache-maven-3.5.3
  export PATH=$PATH:$MAVEN_HOME/bin

  source /etc/profile

版本查询

  mvn -v

 

mvn 打包服务器本地仓库配置

 <server>
      <id>huan</id>
      <username>root</username>
      <password>123</password>
    </server>

<profile>
                  <id>nexus</id>
                  <repositories>
                        <repository>
                          <id>huan</id>
                          <name>huan</name>
                          <url>http://manshushahua.com:26666/repository/maven-public/</url>
                          <releases><enabled>true</enabled></releases>
                          <snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
                        </repository>
                  </repositories>
                <pluginRepositories>
                        <pluginRepository>
                                <id>huan</id>
                                <name>huan</name>
                                <url>http://manshushahua.com:26666/repository/maven-public/</url>
                        </pluginRepository>
                </pluginRepositories>
        </profile>
  </profiles>

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!