maven的archetype:create时的错误

今天用以下面maven命令创建项目时,
mvn archetype:create -DgroupId=com.nuc.test -DartifactId=mytest

报了以下的一个错误:
Reason: Error getting POM for 'org.apache.maven.plugins:maven-archetype-plugin' from the repository: Unable to read local copy of metadata: Cannot read metadata from '/home/enjiex/repo/org/apache/maven/plugins/maven-archetype-plugin/maven-metadata-central.xml': end tag name </head> must be the same as start tag <META> from line 7 (position: TEXT seen ...<META HTTP-EQUIV="expires" CONTENT="0">\n</head>... @8:8) 
  org.apache.maven.plugins:maven-archetype-plugin:pom:LATEST


导致项目创建失败,但遗憾的是没有找到错误原因。
后来我把本地maven资源库中的/org/apache/maven/plugins/目录下的maven-archetype-plugin删除后,然后再重试上面命令,问题得以解决。

猜你喜欢

转载自enjiex.iteye.com/blog/1111640
今日推荐