当前位置:   article > 正文

maven的下载安装_maven tar.gz下载

maven tar.gz下载

maven的下载安装

Maven用于构建和管理任何基于 Java 的项目,主要目标是让开发人员在最短的时间内理解开发工作的完整状态。为了实现这一目标,Maven处理了几个关注的领域:
简化构建过程
提供统一的构建系统
提供优质的项目信息
鼓励更好的发展做法

1、浏览器中输入maven
在这里插入图片描述
2、点击下载
在这里插入图片描述
虚拟机下载linux版本
在这里插入图片描述下载完成后回到下载目录
在这里插入图片描述
主目录下新建目录opt目录

在这里插入图片描述
返回下载目录打开终端

在这里插入图片描述
解压缩到主目录下的opt目录
tar -zxvf apache-maven-3.8.5-bin.tar.gz
在这里插入图片描述
重命名maven
mv apache-maven-3.8.5 maven
在这里插入图片描述

2、配置环境变量

  1. 配置环境变量
  2. 在opt目录中打开终端
    终端中输入deepin-editor ~/.bashrc
    在这里插入图片描述

在文档最后追加以下内容并保存,保存后重启系统

export M2_HOME=/home/lhz/opt/maven
export PATH= P A T H : PATH: PATH:M2_HOME/bin

在这里插入图片描述

  1. 在终端中输入mvn -version进行验证
    在这里插入图片描述

  2. 修改配置文件 ,目录中打开conf/settings.xml配置文件
    在这里插入图片描述

<?xml version="1.0" encoding="UTF-8"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<!--
 | This is the configuration file for Maven. It can be specified at two levels:
 |
 |  1. User Level. This settings.xml file provides configuration for a single user,
 |                 and is normally provided in ${
   user.home}/.m2/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -s /path/to/user/settings.xml
 |
 |  2. Global Level. This settings.xml file provides configuration for all Maven
 |                 users on a machine (assuming they're all using the same Maven
 |                 installation). It's normally provided in
 |                 ${
   maven.conf}/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -gs /path/to/global/settings.xml
 |
 | The sections in this sample file are intended to give you a running start at
 | getting the most out of your Maven installation. Where appropriate, the default
 | values (values used when the setting is not specified) are provided.
 |
 |-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd">
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${
   user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->

  <
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/在线问答5/article/detail/1006394
推荐阅读
相关标签
  

闽ICP备14008679号