不是第一次创建maven项目了,但是前面两次都没错,这次报错了
报错的截图类似于下图这个(当时我忘记截图了,抄的别人的图)
点开日志:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories. Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 failed to transfer from http://localhost:8081/repository/maven-public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of nexus has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to nexus (http://localhost:8081/repository/maven-public/): Failed to connect to localhost/0:0:0:0:0:0:0:1:8081 org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 failed to transfer from http://localhost:8081/repository/maven-public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of nexus has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to nexus (http://localhost:8081/repository/maven-public/): Failed to connect to localhost/0:0:0:0:0:0:0:1:8081
然后我就着急了,搞了好久
发现不管我怎么重启nexus也好,
反正是搞不定
好了 那我就彻底一点:
找到 maven-archetype-quickstart-1.1.jar的路径
然后直接进去这个路径
然后把C:Users用户名.m2repositoryorgapachemavenarchetypes下面的所有的包删掉了!
再次创建maven项目!
成功!!!!!
每天学一点Java,.年底达成初级



