idea创建项目失败

错误信息:

Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:
generate (default-cli) on project standalone-pom: Execution default-cli of goal 
org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate failed:
 Plugin org.apache.maven.plugins:maven-archetype-plugin:RELEASE or one of its dependencies could not be resolved: 
 The following artifacts could not be resolved: org.codehaus.groovy:groovy:jar:2.4.16, 
 org.apache.ivy:ivy:jar:2.4.0: Failure to find org.codehaus.groovy:groovy:jar:2.4.16 
 in http://localhost:8081/nexus/content/groups/public/ was cached in the local repository, 
 resolution will not be reattempted until the update interval of public has elapsed or updates are forced -> [Help 1]
解决办法:

把本地仓库对应的架包删掉

idea创建项目失败

 再报错误再删掉对应的本地仓库中的架包就可以了