Eclipse中创建Maven项目报错:Unable to create project from archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE
方法一:随便找一个Maven项目,在pom.xml中加入一个依赖,Maven自动会下载对应的Jar包进入local Repository,紧接着可以创建项目了。
<dependency> <groupId>org.apache.maven.archetypes</groupId> <artifactId>maven-archetype-quickstart</artifactId> <version>1.1</version> </dependency>
方法二:先下载jar包再手动将jar包install到local repository即可
mvn install:install-file -DgroupId=org.apache.maven.archetypes -DartifactId=maven-archetype-quickstart -Dversion=1.1 -Dpackaging=jar -Dfile=E:/Forscher/maven-archetype-quickstart-1.1.jar
C:Usersdsp>mvn install:install-file -DgroupId=org.apache.maven.archetypes -DartifactId=maven-archetype-quickstart -Dversion=1.1 -Dpackaging=jar -Dfile=E:/Forscher/maven-archetype-quickstart-1.1.jar [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 E:Forschermaven-archetype-quickstart-1.1.jar to E:LocalRepositoryorgapachemavenarchetypesmaven-archetype-quickstart1.1maven-archetype-quickstart-1.1.jar [INFO] Installing C:UsersdspAppDataLocalTempmvninstall1584876017385831744.pom to E:LocalRepositoryorgapachemavenarchetypesmaven-archetype-quickstart1.1maven-archetype-quickstart-1.1.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.255 s [INFO] Finished at: 2017-12-02T19:01:06+08:00 [INFO] Final Memory: 8M/243M [INFO] ------------------------------------------------------------------------
:)