Maven--project management tool
What is Maven? Maven is a project management tool that contains an object model. A set of standards, a dependency management system. and used to run plugin goals and logic defined in lifecycle stages. Core Function The core function of Maven is to reasonably describe the dependencies between projects. The popular point is to obtain the jar package through the configuration of the pom.xml file without adding the jar package manually.
As a novice student, I need to do course design and use ideas to design courses. After downloading the software, I need to be pointed to the maven environment in the first step. At the beginning, I didn’t know what maven was for. I learned it through step-by-step learning attempts. The usage and function of maven, in short, is a kind of dependency configuration.
I installed Maven first, then JDK, all operations are available, and I encourage you
1. Download and install maven
1. Open the official website to download (official website Maven – Download Apache Maven ), the download is a bit slow, please wait patiently.
2. After downloading and decompressing, you need to remember the decompression path and fill in the path when configuring environment variables ( you can create a new Maven folder, and then you need to create new files and put them together )
2. Configure environment variables
The configuration of environment variables is more important. When editing Maven system variables, the path filled in the variable value must be written correctly , otherwise the Maven configuration will be wrong.
1. First open the system properties ( this computer-->properties-->advanced system settings-->environment variables )
2. Create new system environment variables
Variable name: MAVEN_HOME
Variable value: E:\Maven\apache-maven-3.8.6 (subject to your own installation path)
3. Edit path (system variable-->path-->edit-->new)
Add %MAVEN_HOME%\bin
4. MAVEN has been configured before, and then check whether it is successful
Run cmd with win+R and enter mvn -version
Oops, something went wrong! ! ! , don't panic, this is not configured JDK, now configure JDK
(If you have already configured JDK, just look at the end, it looks like maven is installed successfully)
3. Configure JDK
1. Download jdk (official website Software Download | Oracle )
Click Java
Then click Java (JDK) for Developers
Choose Windows, you will have jdk19 directly, click to download, .exe is the installation package, .zip is the compressed package, consider downloading yourself, the effect is the same
I downloaded the compressed package and unzipped it on the E drive after downloading.
Friendly reminder: It is recommended to download the installation package directly, the compressed package is too troublesome! ! !
2. Install JDK;
Click Next
Change the installation path, I chose drive E
Close the installation
3. Configure JDK environment variables. The specific operation is roughly similar to configuring Maven environment variables.
Create a new system variable named: JAVA_HOME
The variable value is: E:\jdk-19
Add %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin; to path
4. The jdk has been successfully installed above.
Check if successful
Open the command prompt with win+r and enter Java -version to view the version number. The results of successful installation are as follows
Then enter Java to view Java information
Displaying the above information means that the JDK installation is successful, binggo! ! !
4. Check whether maven installation is successful
Win+r opens the command prompt and enter mvn -version
The Maven version number is successfully displayed, ok!!!