Long time do not write code, suddenly need to write a small program, Rusty, Record knowledge Points Memo:
Performance: After importing the project into the workspace, the compile-time display maven is downloading resources, but the speed is too slow to endure.
Modify Maven Central warehouse in Eclipse: 2 ways
Mode 1: (tested)
Works on all workspaces:
1. Open each item: Eclipse->preference->maven->user Settings. Follow the path shown in the User settings text box in the window, create a settings.xml file, or create a file after modifying the path.
2, close the window and reopen, click on "Open File", open the configuration file in the IDE, "could not read settings.xml" do not need to.
3, copy the following to the configuration file, where the <mirror></mirror> part is a domestic mirror.
<settings xsi:schemalocation= "http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/ Settings-1.0.0.xsd "> <mirrors> <!--Mirror | Specifies a repository mirror site to use instead of a given repository. The Repository that | This mirror serves have an ID, that matches, the mirrorof element of this mirror. IDs is used | For inheritance and direct lookup purposes, and must is unique across the set of mirrors. | -<mirror> <id>alimaven</id> <name>aliyun maven</name> <url> Http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </m irror> <mirror> <id>uk</id> <mirrorOf>central</mirrorOf> &L
T;name>human readable name for this mirror.</name> <url>http://uk.maven.org/maven2/</url> </mirror> <mirror> <ID>CN</id> <name>oschina central</name> <url>http://maven.oschina.net/content/groups/public /</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>nex Us</id> <name>internal Nexus repository</name> <url>http://repo.maven.apache.org/maven 2</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> <profiles> &L t;profile> <id>default</id> <repositories> <repository> <ID>NEXUS</ID&G
T <name>local Private nexus</name> <url>http://maven.oschina.net/content/groups/public/</url > <releases> <enabled>true</enabled> </releases> <snapshots> & lt;enabled>false</enabled> </snapshots> </repository> </repositories> <plugin Repositories> <pluginrepository> <id>nexus</id> <name>local Private nexus</name> <url> Http://maven.oschina.net/content/groups/public/</url> <releases> <enabled>true</enabled>
; </releases> <snapshots> <enabled>false</enabled> </snapshots> </plugi nrepository> </pluginRepositories> </profile> </profiles> </settings>
4, "Apply" after the configuration takes effect, recompile can.