How to deploy a Maven Project (on) and maven Project
|
How to deploy a Maven Project (I): how to install a Maven (** -bin.zip) in windows) |
Preface: |
I heard a lecture from a young teacher yesterday. I introduced Maven to us, but I learned it myself. I have time to test it myself today! Understand the advantages of maven: 1. maven can share the jar developed by java among multiple projects. [I see here] 2. Most racks can be obtained from the maven database (networking required) Du Niang also gave an explanation: du Mom told you Maven also needs JDK support and won't install JDK. |
Official Website: |
Http://mirror.bit.edu.cn/apache/maven/maven-3/3.3.1/binaries/apache-maven-3.3.1-bin.zip |
Installation steps: |
|
|
1. decompress the package to a full English path (preferably) 2. Create an environment variable: |
|
Variable name |
Variable value |
M_home |
C: \ Program Files \ Maven \ apache-maven-3.3.1. |
Path |
Add % m_home % \ bin at the end |
|
|
3. Open the dos window: Run mvn-version The success is as follows: |
|
4. Add a local repository to Maven [a friend who has used a version controller (github or something) should be familiar with it. This is a public jar library in a computer and where all maven projects will be taken]: |
|
A. Find the installation directory/conf/setting. xml and be granted the Administrator permission. B. Edit setting. xml. 1 <settings> 2 <! -- Specify path --> 3 <localRepository> D:/java/repository </localRepository> 4 5 </settings> |
Summary: |
After installing maven and configuring the local repository, A Maven project will be arranged. The next blog will describe it. |