首页 > 系统相关 >linux yum安装maven

linux yum安装maven

时间:2023-10-19 15:35:28浏览次数:40  
标签:repos 1.8 maven etc yum linux apache

安装maven

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

查看maven home

mvn -v

 配置环境变量

vi /etc/profile

重载环境变量

source /etc/profile

替换maven源,阿里云的源

vim /etc/maven/settings.xml

找到<mirrors></mirrors>标签对,添加一下代码:

<mirror>
     <id>alimaven</id>
     <name>aliyun maven</name>
     <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
     <mirrorOf>central</mirrorOf>
</mirror>

指定下载资源位置

<localRepository>/usr/local/maven/repository</localRepository>

指定JDK版本

<profile>    
     <id>jdk-1.8</id>    
     <activation>    
       <activeByDefault>true</activeByDefault>    
       <jdk>1.8</jdk>    
     </activation>    
       <properties>    
         <maven.compiler.source>1.8</maven.compiler.source>    
         <maven.compiler.target>1.8</maven.compiler.target>    
         <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>    
       </properties>    
</profile>

 

标签:repos,1.8,maven,etc,yum,linux,apache
From: https://www.cnblogs.com/void--main/p/17774811.html

相关文章

  • linux centos7 部署 nodejs 的 express
      链接:https://www.youtube.com/watch?v=oGbLL1_0q64 yuminstallgcc-c++openssl-develmake-ycd/tmpcurl-sLhttps://rpm.nodesource.com/setup|bash-yuminstall-ynodejsnpminstall-gexpress-generatoruseraddusernamepasswdusernamemkdirfirst_project......
  • 将达梦数据库的JDBC驱动包 DmJdbcDriver18.jar 安装到本地 Maven 仓库
    将达梦数据库的JDBC驱动包DmJdbcDriver18.jar安装到本地Maven仓库 一、问题背景在博客《SpringBootMyBatisPlus整合达梦数据库》中写道,从 https://eco.dameng.com/download/ 中下载达梦JDBC驱动包,如下: JDK1.8 对应的JDBC驱动包为:DmJdbcDriver18.jar ......
  • Linux 软连接 ln -s 简单使用看这篇就够了
    全网很多文章讲源文件和目标文件,或者target和source哪个连到哪个完全没有讲清楚,一个不小心操作失误很容易造成源数据直接丢失!!! 1ln-s/A/B 这里A和B的路径要用绝对路径,执行这个命令就是在当前目录下把B指向A,也就是A是实际存在的,B是虚拟的假的......
  • Linux shell编程学习笔记8:使用字符串
    一、前言字符串是大多数编程语言中最常用最有用的数据类型,这在Linuxshell编程中也不例外。本文讨论了LinuxShell编程中的字符串的三种定义方式的差别,以及字符串拼接、取字符串长度、提取字符串、查找子字符串等常用字符串操作,,以及反引号在echo和expr命令联合使用时的作用。二......
  • Linux shell编程学习笔记4:修改命令行提示符格式(内容和颜色)
    一、命令行提示符格式内容因shell类型而异Linux终端命令行提示符内容格式则因shell的类型而异,例如CoreLinux默认的shell是sh,其命令行提示符为黑底白字,内容为:tc@box:/$其中,tc为当前用户名,box为主机名,/为当前目录路径,$表示当前用户类型是普通用户 。 二、环境变量PS1存储了命令行提......
  • Linux账号密码安全策略设置
    前言随着云计算厂商的兴起,云资源如ECS不再只有企业或者公司才会使用,普通人也可以自己买一台ECS来搭建自己的应用或者网站。虽然云计算厂商帮我们做了很多安全相关的工作,但并不代表我们的机器资源就绝对是安全的。要知道有很多事情是云计算厂商不能为我们做的,就比如账号密码的安全......
  • Linux I/O schedulers类型简介
    I/Oschedulersattempttoimprovethroughputbyreorderingrequestaccessintoalinearorderbasedonthelogicaladdressesofthedataandtryingtogroupthesetogether.WhilethismayincreaseoverallthroughputitmayleadtosomeI/Orequestswaitin......
  • Linux的Namespace,cgroup,chroot和docker的本质
    Linux的Namespace,cgroup,chroot和docker的本质-陈映峤的博客|LerkoBlog(chenyingqiao.github.io)chroot,即changerootdirectory(更改root目录)。在linux系统中,系统默认的目录结构都是以 /,即是以根(root)开始的。而在使用chroot之后,系统的目录结构将以指定的位......
  • Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:res
    Failedtoexecutegoalorg.apache.maven.plugins:maven-resources-plugin:3.2.0:resources 一、问题背景在SpringBoot工程编译过程中,出现报错信息:“Failedtoexecutegoalorg.apache.maven.plugins:maven-resources-plugin:3.2.0:resources”。 效果如下: 二、解......
  • Linux-expect(以交互形式输入命令,实现交互通信)
    1.expect简介expect是一种脚本语言,它能够代替人工实现与终端的交互,主要应用于执行命令和程序时,系统以交互形式要求输入指定字符串,实现交互通信。安装命令:yuminstallexpect; 2.expect使用场景(1)并根据预定标准回答其问题,回答“是”、“否”或将控制权交还给您(2)远程连接设备......