maven parent.relativePath指向错误的问题

 <parent>
      <artifactId>stormartifactId>
      <groupId>org.apache.stormgroupId>
      <version>1.0.4version>
      <relativePath>../../pom.xmlrelativePath>
  parent>

测试storm时输入命令

1 mvn test

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

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

 1 <mirror>
 2     <id>nexus-aliyunid>
 3     <mirrorOf>*mirrorOf>
 4     <name>Nexus aliyunname>
 5     <url>http://maven.aliyun.com/nexus/content/groups/publicurl>
 6 mirror>
 7 <mirror>
 8     <id>centralid>
 9     <name>Maven Repository Switchboardname>
10     <url>http://repo1.maven.org/maven2/url>
11     <mirrorOf>centralmirrorOf>
12 mirror>
13 <mirror>
14     <id>repo2id>
15     <mirrorOf>centralmirrorOf>
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

你可能感兴趣的:(maven parent.relativePath指向错误的问题)