In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains the "installation and configuration of maven in the windows environment", the content of the explanation is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "the installation and configuration of maven in the windows environment" bar!
Maven is a project management and integrated tool. Maven provides developers to build a complete lifecycle framework. The development team can automatically complete the basic tools of the project, and the developers can import the packages needed for program development without downloading the jar package, saving space and time to find and download the package.
1. Download maven: http://maven.apache.org/download.cgi
two。 Extract the resulting package to the target file, the folder and its parent folder cannot be in Chinese, otherwise some unpredictable errors will be reported.
3. Set up settings.xml
Open the settings.xml file in the conf folder under the maven folder, and enter the E:\ maven-repository tag under the settins tag, where E:\ maven-repository is the address of the local warehouse, and the local warehouse address is used to download the dependent packages from the central warehouse to this directory for reference by the project.
Enter the following under the mirrors tag to set the warehouse domestic mapping
Alimaven
Central
Aliyun maven
Http://maven.aliyun.com/nexus/content/repositories/central/
Repo1
Central
Human Readable Name for this Mirror.
Http://repo1.maven.org/maven2/
Repo2
Central
Human Readable Name for this Mirror.
Http://repo2.maven.org/maven2/
4. Set the M2_HOME and MAVEN_HOME environment variables
It is said that when configuring the maven environment variable, only M2_HOME can be configured, because maven2_home is configured after maven2, but in order to be compatible with maven1, we have to configure MAVEN_HOME at the same time. Their values are all the root directory of maven, that is, you can see the directory of bin (do not need to open bin).
Then configure path, add after the value of path; maven path\ bin, note that this value can also be written as% MAVEN_HOME%\ bin or% M2cm home%\ bin, using% XXX% can only change the value of MAVEN_HOME or M2_HOME when modifying or upgrading the version of the maven environment variable, and there is no need to re-modify the value of path, but some computers may not be able to find the value of this path, so it can only be written as an absolute path + bin.
At this point, the environment variable of maven has been configured. Open the terminal to test whether the configuration is successful: mvn-v, if the following appears
Prove that the configuration is successful.
In addition, when using eclipse as a development tool, you need to configure maven's environment on eclipse
Open eclipse window → prefences → maven → installations → add → directory, select the root directory where maven is located, finish, and then select apache-maven-3.6.1 and click OK.
Then configure user settings, find the user settings option, and set the file path where the settings.xml file is located (in the conf folder of the folder where maven is located). After setting up, update settings then apply, and finally close, so the maven environment for eclipse development has been configured.
Thank you for reading, the above is the content of the "installation and configuration tutorial of maven under the windows environment". After the study of this article, I believe you have a deeper understanding of the installation and configuration tutorial of maven under the windows environment, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.