First, create a Maven local repository in a folder
1:
Copy the setting. xml file in Maven in the same directory,
Let's modify the path of the downloaded file in a repository.
The default value is:
That is, place the JAR file configured in POM. xml under. m2/Repository/of the current user.
We customize the path we like:
<Localrepository> F: \ softwaredevelopment \ Java \ Maven \ repository </localrepository>
That is, the path in Figure 1.
Next, try to download the target jar from MVN and place it in the prepared local repository.
Create a Maven project:
Enter the MVN compile command in the created Maven project folder to compile and download the JAR file configured in POM. xml.
After entering the maven project in win7, press shift and right-click to quickly open the project path.
Finally, let's take a look at the jar package downloaded to the local repository.
Build a Maven Environment