Code Monkey home page Code Monkey logo

hellomaven's Introduction

Maven安装和配置

1.本地环境

1.jdk版本:jdk1.8.0_192;

2.编辑器:IntelliJ IDEA;

3.操作系统:Windows 10

2.安装

maven下载地址:http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.zip

新建环境变量MAVEN_HOME,赋值为解压该压缩包的地址,我的是:C:\Program Files\Apache\maven-3.6.1。

Path环境变量追加一条%MAVEN_HOME%\bin\。

然后在命令行中测试:mvn -v,能得到结果即可。

3.配置Maven本地仓库

建立目录:D:\Program Files\Apache\maven-repository。

打开C:\Program Files\Apache\maven\conf\settings.xml文件,查找下面这行代码:

<localRepository>/path/to/local/repo</localRepository>

修改为

<localRepository>D:\Program Files\Apache\maven-repository</localRepository>

在命令行中运行:

mvn help:system

如果配置成功,D:\Program Files\Apache\maven-repository将会出现一些新文件。

4.在Intellij IDEA中配置Maven

打开Setting -> Build, Execution, Deployment -> Build Tools -> Maven,

选择Maven home directory:C:/Program Files/Apache/maven-3.6.1

选择User setting file(勾选重载):C:\Program Files\Apache\maven-3.6.1\conf\settings.xml

选择Local repository(勾选重载):D:\Program Files\Apache\maven-repository

至此,Maven的安装和配置步骤结束。

hellomaven's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.