Transferred from: http://www.blogjava.net/fancydeepin/archive/2012/06/12/380605.html thanks!!
Maven is really a good thing, to manage the project is very convenient, but if it is through Maven to download the jar package remotely, my dorm bandwidth is 4 trillion, 4 people shared, sometimes with Maven to download the jar remotely can be very slow, generally I find the download speed is not obvious, I Ctrl + C to terminate its download. Then use manual to download, because the Thunderbolt a class of tools to download will be much faster. I have manually downloaded many JAR packages from Maven's local repository on my machine. A manual download brings up the question of how to manually add the downloaded JAR package to Maven's local repository. There is also a lot of information on the Internet. I'll say what I'm doing. First of all
recommend a few good Maven common warehouse URLs:
http://mvnrepository.com/
http://search.maven.org/
http://repository.sonatype.org/content/groups/public/
http://people.apache.org/repo/m2-snapshot-repository/
http://people.apache.org/repo/m2-incubating-repository/
The first one is my most used, then the second, then the third, and the last two is the private Apache warehouse, I have not used, but it should be able to feel it ... Next, it is a consistent style, the use of easy-to-understand way to explain:
If you have read my previous article:Spring Mail Service Html:maven + spring SMTP mail with Html article, inside need to use a Spring-context-support-3.1.0.release.jar jar package, I put it to the local warehouse when the picture was cut down, by the way write this article, for the needs of netizens reference. First, to
http://mvnrepository.com/ This web, in the search field to enter the JAR package you want to search for keywords to search, the following direct mapping:
@1 Chart
@2 Chart
@3 Chart
Take Spring-context-support-3.1.0.release.jar as an example, in the @3 diagram has given this jar package groupid,artifactid,version information, manual installation of this information do not change, otherwise If the Maven project is ported, the jar package download will fail. By the way, this information is posted below to facilitate comparison: <dependency> <groupId>org.springframework</groupId> <artifactid>spring-context-support& Lt;/artifactid> <version>3.1.0.RELEASE</version> </dependency>the commands for Maven install JAR packages are:MVN Install:install-file-dfile=jar The position of the package-dgroupid= above the groupid-dartifactid= above the artifactid-dversion= above the version- Dpackaging=jarFor example: The jar I downloaded was placed in the D:\MVN directory (D:\mvn\spring-context-support-3.1.0.RELEASE.jar) so the command I typed in cmd would be:
MVN install:install-file-dfile=d:\mvn\spring-context-support-3.1.0.release.jar-dgroupid=org.springframework -dartifactid=spring-context-support-dversion=3.1.0.release-dpackaging=jar Enter to display the installation success:
Local jar upload to local repository