maven parent.relativePath指向错误的问题

 <parent>
      <artifactId>storm</artifactId>
      <groupId>org.apache.storm</groupId>
      <version>1.0.4</version>
      <relativePath>../../pom.xml</relativePath>
  </parent>

测试storm时输入命令

1 mvn test

总是报  maven parent.relativePath指向错误的问题:

通过更换maven镜像可以解决此问题,在maven安装目录下的conf/settings.xml文件内<mirrors>增加一段

 1 <mirror>
 2     <id>nexus-aliyun</id>
 3     <mirrorOf>*</mirrorOf>
 4     <name>Nexus aliyun</name>
 5     <url>http://maven.aliyun.com/nexus/content/groups/public</url>
 6 </mirror>
 7 <mirror>
 8     <id>central</id>
 9     <name>Maven Repository Switchboard</name>
10     <url>http://repo1.maven.org/maven2/</url>
11     <mirrorOf>central</mirrorOf>
12 </mirror>
13 <mirror>
14     <id>repo2</id>
15     <mirrorOf>central</mirrorOf>
16     <name>Human Readable Name for this Mirror.</name>
17     <url>http://repo2.maven.org/maven2/</url>
18 </mirror>

更改镜像地址为阿里云的maven,在mvn test可解决此问题

参考:https://www.cnblogs.com/codingcheng/p/8598027.html

原文地址:https://www.cnblogs.com/veryvalley/p/10025999.html