Today to create a new MAVEN project, just wrote a dependency after the Pom file error,
-Missing Artifact javax:javaee-api:jar:7.0
-Missing Artifact junit:junit:jar:3.8.1
Maven comes with the ability to automatically download some of the usual jar packages from the central repository to the local repository, but often the network does not force or otherwise cause MAVEN to fail to connect to the central warehouse,
You can download the jar locally and then manually install the jar to the local repository by using CMD to enter the following command
Example: Installing the Javaee-api-7.0.jar in the Jar folder of the local C drive into this warehouse
MVN Install:install-file-dfile=c:\jar\javaee-api-7.0.jar-dgroupid=javax-dartifactid=javaee-api-dversio N=7.0-dpackaging=jar
Note:-dfile = "Input here is the local path of your jar package"
[INFO] Scanning for projects ...
[INFO]
[INFO]------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO]------------------------------------------------------------------------
[INFO]
[INFO]---maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom
---
[INFO] Installing C:\jar\javaee-api-7.0.jar to C:\Users\zhanghai123\.m2\reposit
Ry\javax\javaee-api\7.0\javaee-api-7.0.jar
[INFO] Installing c:\users\zhangh~1\appdata\local\temp\mvninstall57834341258817
8637.pom to C:\Users\zhanghai123\.m2\repository\javax\javaee-api\7.0\javaee-api
7.0.pom
[INFO]------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]------------------------------------------------------------------------
[INFO] Total time:0.631 S
[INFO] Finished at:2015-11-15t13:14:54+08:00
[INFO] Final memory:7m/109m
[INFO]------------------------------------------------------------------------
Open the local repository after successful installation find the folder where the jar package can see maven generated a maven file, this time indicates that the jar installed successfully