Maven installation and integration with eclipse

Maven settings

在  C:\Users\Administrator\.m2\repository ;

Eclipse-> Windows-> Preferences -> Maven-> User Settings, you can see under User Settings path \ .m2 \ settings.xml, but is not entered .m2 directory settings.xml file, you can not configure a local factory library;

 The reason is not found settings.xml file seems to be because this is a Maven plugin eclipse comes, he would not settings.xml file. Although you can write this file yourself, but not so safe after all

So it is best to install maven eclipse and then integrated, so that the local repository can be configured by modifying the settings.xml file (not wanting to the warehouse on the C drive)

 

Download and install Maven

Official website

http://maven.apache.org/download.cgi

To extract the installation path

Configuration environment variable

Check whether the installation is successful

Modify the local warehouse location

maven extracting file, conf directory, modify the settings.xml file (D: \ Maven \ apache-maven-3.6.2-bin \ apache-maven-3.6.2 \ conf)

Mirrored configuration may be selected central warehouse

So this is

<mirror>

      <id>mirrorId</id>

      <mirrorOf>repositoryId</mirrorOf>

      <name>Human Readable Name for this Mirror.</name>

      <url>http://my.repository.com/repo/path</url>

</mirror>

For stability can be replaced Ali

 

<mirror>     

  <id>nexus-aliyun</id>   

  <name>nexus-aliyun</name> 

  <url>http://maven.aliyun.com/nexus/content/groups/public</url>   

  <mirrorOf>central</mirrorOf>     

</mirror>

 

 

The next eclipse and integration

Modify the configuration file

Maven jar package being given search error: Index downloads are disabled, search result may be incomplete.

solution:

https://blog.csdn.net/gongxifacai_believe/article/details/54731383

 

Then you can put the original project into a maven project, because the cloud Ali recommended to add their dependencies with maven project

Download the SDK to a local warehouse unpacked

Pom.xml maven project to add two dependencies Ali cloud messaging services needed

The method relies above by adding

Then add. There is another common method is to simply click on FIG pom.xml, then add the following dependence by writing code.

You can then use these libraries depend on it!

Guess you like

Origin www.cnblogs.com/yr7950969/p/11600758.html