maven 环境变量设置_设置Maven环境

maven 环境变量设置

Maven is one of the handy tool which can be set up quickly and can be made it ready for any java projects within a max of 10 minutes. Also, the maven downloadable package is also very light weight. Follow the below mentioned steps in order to download and set up the maven in the windows environment.

Maven是一种方便的工具,可以快速设置,并且可以在最多10分钟的时间内准备好用于任何Java项目。 另外,maven可下载软件包的重量也很轻。 请遵循以下提到的步骤,以便在Windows环境中下载并设置Maven。

步骤1设置Maven (STEP 1 to setup Maven)

Download the latest version of the maven from http://maven.apache.org website.

http://maven.apache.org网站下载最新版本的Maven。

Download Apache Maven Project

NOTE : Any version of the maven which is above 3.2 requires JDK version to be 1.6 and above.

注意:任何高于3.2的Maven版本都需要JDK 1.6和更高版本。

第2步设置Maven (STEP 2 to setup Maven)

Once the download is successful. Unzip the downloaded maven zip and place it in a drive containing all the java related artifacts. E.g. D:\Java\apache-maven-3.2.5 , in case you have downloaded any other latest release than the version may differ, but thats not a problem.

一旦下载成功。 解压缩下载的maven zip并将其放入包含所有与Java相关的工件的驱动器中。 例如D:\ Java \ apache-maven-3.2.5 ,如果您下载的其他最新版本与该版本可能有所不同,那不是问题。

Apache Maven Project Folder on PC

第3步设置Maven (STEP 3 to setup Maven)

Now we need to set up the class path Java (JAVA_HOME) and Maven (M2_HOME). If you already have JAVA_HOME set, then you only need to set M2_HOME for Maven. Kindly ensure that the required version of the jdk has been installed.

现在,我们需要设置类路径Java (JAVA_HOME)和Maven (M2_HOME) 。 如果已经设置了JAVA_HOME,则只需为Maven设置M2_HOME。 请确保已安装所需版本的jdk。

Setting Maven Environment Variable

Now edit the variable Path in the System variables to include the JAVA_HOME and M2_HOME.

现在,在系统变量中编辑变量Path ,以包括JAVA_HOME和M2_HOME。

Adding to Path System Variable

第4步设置Maven (STEP 4 to setup Maven)

If the above steps are carried out successfully, then we are done with the installation and setup process of the maven tool. Now in this final step, we would be verifying for the same and ensure things are fine accordingly.

如果上述步骤成功完成,那么我们就完成了maven工具的安装和设置过程。 现在,在最后一步中,我们将进行验证,并确保一切正常。

Just open up the command prompt from the Start -> Command Prompt and in the command prompt just type the maven command mvn -version and press enter. It will display the results as shown below and confirms that our maven setup is successful and completed.

只需从“ 开始” ->“ 命令提示符 ”中打开 命令提示符,然后在命令提示符中键入maven命令mvn -version并按Enter。 它将显示结果,如下所示,并确认我们的Maven安装成功完成。

Checking Whether Maven is installed Successfully or not

翻译自: https://www.studytonight.com/maven/setting-up-maven

maven 环境变量设置

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值