zoukankan      html  css  js  c++  java
  • 安装篇-Linux安装maven3.5.2

    CentOS 7 安装 maven3.5.2

    笔者觉得,在Linux系统上,能用yum安装的软件或者服务最好用yum安装。如果可以的话rpm也可以。所以在自己服务器上或者是开了一个虚拟机上直接用yum装。废话不多说,开始安装:

    下载

    wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
    

    安装

    yum -y install apache-maven
    

    配置

    查找包路径

    rpm -qa|grep apache-maven
    

    找到配置文件的路径位置:/etc/maven/settings.xml

    把下面的配置,覆盖掉原先的配置即可:

    <?xml version="1.0" encoding="UTF-8"?>
    
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
     
      <!--<localRepository>${user.home}/.m2/repository</localRepository>-->
      <pluginGroups></pluginGroups>
      <proxies></proxies>
      <servers></servers>
    
      <mirrors>
    	 <mirror>
              <id>alimaven</id>
              <mirrorOf>central</mirrorOf>
              <name>aliyun maven</name>
              <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
    	</mirror>
    	<mirror>
            <id>nexus-aliyun</id>
            <mirrorOf>central</mirrorOf>
            <name>Nexus aliyun</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public</url>
        </mirror>
        <mirror>
            <id>central</id>
            <name>Maven Repository Switchboard</name>
            <url>http://repo1.maven.org/maven2/</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
        <mirror>
            <id>repo2</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://repo2.maven.org/maven2/</url>
        </mirror>
        <mirror>
            <id>ibiblio</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
        </mirror>
        <mirror>
            <id>jboss-public-repository-group</id>
            <mirrorOf>central</mirrorOf>
            <name>JBoss Public Repository Group</name>
            <url>http://repository.jboss.org/nexus/content/groups/public</url>
        </mirror>
      </mirrors>
    
      <profiles></profiles>
    
    </settings>
    
  • 相关阅读:
    mybatis Column 'XXX' in where clause is ambiguous 错误
    IDEA 代码提示不区分大小写
    接口安全问题
    spring 事务问题
    js问题: is not a function
    Uncaught TypeError: form.attr is not a function 解决办法
    springmvc 跳转页面或者返回json
    ajax 跳转页面时添加header
    maven工程 添加本地jar依赖
    mysql 创建备份表
  • 原文地址:https://www.cnblogs.com/zhaoxxnbsp/p/12675989.html
Copyright © 2011-2022 走看看