Syria : I recorded how to install it on my computer before Maven The warehouse , And the configuration of the warehouse environment variables in the installation ,Maven The download 、 install , This chapter mainly records Maven And how to make jar Package folder ( There are all kinds of jar file ) Configuration to Maven Warehouse , Only will jar The package folder is in Maven It can only be used by the project after it is configured in ; Detailed as follows :



Maven And its local warehouse configuration to Macen in



1、Maven The classification of

Maven There are three kinds of warehouses , As shown below :

  • Local repository : Personal maintenance , Put it on your own computer for personal use ;
  • Remote warehouse : Company maintenance built by the company , Not used by more than one person Maven The warehouse maintained by the team , The remote warehouse is also called Private clothes ;
  • Central warehouse :Maven Team maintenance , The largest and most comprehensive in the world Maven Warehouse

The three warehouses are not unrelated , The relationship among the three is shown in the figure below :
 Picture description of three warehouse relationships


2、 Where is the local warehouse Maven Configuration in

Maven This warehouse mainly stores jar Files are folders , Click to open the installed Maven Folder , Generally, there are only two primary subfolders , Like the picture below :
Maven Folder picture description

The first folder ( The installed version number is different , The version number after the folder name is also different ) What's in it is Maven Various configuration files , And storage jar The warehouse of files is actually a folder , There's a lot of foundation in this jar package , When used Maven You must configure the path of the folder to a configuration file in , The reason is that folders can be put in other places , And project references Maven The location of the project is also not fixed , therefore , To configure the absolute path of a folder into a configuration file ;

The path configuration is shown in the following steps :

  • Find the folder ( It doesn't matter if the version number of the installation is different ) Folder in , Then find the file in the folder , Configure in this file , The path is shown in the figure below :
     Profile path picture description

  • Open the file and find the label , This tag is the default configuration jar Package warehouse Path , Just mask this segment or change the path value to the absolute path of your own folder , As shown in the figure below :
     modify jar The absolute path of the warehouse

After modification, it's OK ~
Later in use to Maven The warehouse just needs to introduce Maven The relevant configuration code of !


《END》