往下看之前一定要先看

%MAVEN_HOME%/conf/settings.xml

配置文件的是否更改了,是否配置正确

<mirror>
<id>nexus</id>
<url>http://maven.xxxxxx.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!--
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
-->

转自:http://blog.sina.com.cn/s/blog_56d8ea9001013fz9.html
比如:
<parent>
<groupId>com.tenace</groupId>
<artifactId>tenace</artifactId>
<version>2.0.1</version>
<relativePath></relativePath> //刚开始无此句
</parent>
<groupId>com.joinspider</groupId>
<artifactId>spiderengine</artifactId>
<version>2.6.0-SNAPSHOT</version>

tenace作为pom项目已经发布至repo,如果没有指定relativapath。则mvn -X -e clean package可以看到如下警告信息:
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
com.joinspider:spiderengine:jar:2.6.0-SNAPSHOT
[WARNING] 'parent.relativePath' points at com.joinspider:joinspider instead of c
om.tenace:tenace, please verify your project structure @ line 4, column 10
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten t
he stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support buildin
g such malformed projects.

解决办法则是加上<relativePath></relativePath>。
说明见链接:http://maven.apache.org/ref/3.0.3/maven-model/maven.html#class_parent

说明如下:
The relative path of the parent pom.xml file within the check out. If not specified, it defaults to ../pom.xml. Maven looks for the parent POM first in this location on the filesystem, then the local repository, and lastly in the remote repo. relativePath allows you to select a different location, for example when your structure is flat, or deeper without an intermediate parent POM. However, the group ID, artifact ID and version are still required, and must match the file in the location given or it will revert to the repository for the POM. This feature is only for enhancing the development in a local checkout of that project. Set the value to an empty string in case you want to disable the feature and always resolve the parent POM from the repositories.
Default value is: ../pom.xml.

maven继承parent,relativePath warn信息的解决办法的更多相关文章

  1. Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.6 的解决办法

    eclipse导入mavn工程报Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.6 的解决办法: 错 ...

  2. sublime text3安装后html:5+Tab不能快速生成html头部信息的解决办法

    sublime text3安装后html:5+Tab不能快速生成html头部信息的解决办法: 需要下载Emmet插件,按网上写的步骤按ctrl+shift+P打开命令面板,输入install,鼠标点击 ...

  3. “maven编码gbk的不可映射字符”解决办法

    一.问题描述 Eclipse中使用Maven编译项目源代码时,如下的错误 java源代码在Eclipse中显示是没有任何错误的,可是执行"maven install"命令编译项目时 ...

  4. 使用Maven编译项目遇到——“maven编码gbk的不可映射字符”解决办法 ——转载

    一.问题描述 今天在MyEclipse中使用Maven编译项目源代码时,结果如下了如下的错误

  5. 转】使用Maven编译项目遇到——“maven编码gbk的不可映射字符”解决办法

    原博文出自于: http://www.cnblogs.com/xdp-gacl/p/4239006.html 感谢! 一.问题描述 今天在MyEclipse中使用Maven编译项目源代码时,结果如下了 ...

  6. 贡献你的代码,将jar包发布到Maven中央仓库以及常见错误的解决办法

    前几天将自己的日志工具发布到了Maven中央仓库中.这个工具本省没有多少技术含量,因为是修改别人的源代码实现的,但是将jar发布到Maven仓库却收获颇丰,因为网上有些教程过时了,在此分享下自己发布j ...

  7. Maven中 jar包冲突原理与解决办法

    Maven中jar包冲突是开发过程中比较常见而又令人头疼的问题,我们需要知道 jar包冲突的原理,才能更好的去解决jar包冲突的问题.本文将从jar包冲突的原理和解决两个方面阐述Maven中jar包冲 ...

  8. Maven Java EE Configuration Problem 的完美解决办法

    背景: 最近在修改项目的时候,发现修改了项目依赖以后会出现如下图:Maven Java EE Configuration Problem 的问题,对于有强迫症的我来说,看到项目上面有个很小的红色小叉号 ...

  9. 在eclipse中创建maven webapp项目时弹出错误-解决办法

    在eclipse中创建maven webapp项目时报错: Could not resolve archetype org.apache.maven.archetypes:maven-archetyp ...

随机推荐

  1. C++主要数据类型在计算机中所占字节大小

    遇到了数据存储的大端和小端问题,这你妹的看的一头雾水,发现我基本知识严重匮乏啊,先了解C++各数据类型在自己机子上占多少字节吧,以及这些数据类型所占字节大小与神马有关.各种查资料然后写代码检验,小结于 ...

  2. [linux] 更改目录显示颜色

    第一.创建配置文件 $dircolors -p>~/.dircolors 第二.编辑配置文件 打开文件: $vi ~/.dircolors 找到这一行: DIR ; # directory #可 ...

  3. python 生产者消费者模型

    import time def consumer(name): print("%s开始吃包子了"%name) while True: ret = yield time.sleep( ...

  4. AT91-PWM应用

    步骤1: make menuconfig配置内核, 开启PWM输出功能. Device Drivers ---> Misc devices  ---> <*>Atmel AT3 ...

  5. 分布式日志1 用c#的队列写日志

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...

  6. java中的内部类小结

    内部类不是很好理解,但说白了其实也就是一个类中还包含着另外一个类.如同一个人是由大脑.肢体.器官等身体结果组成,而内部类相当于其中的某个器官之一,例如心脏:它也有自己的属性和行为(血液.跳动).显然, ...

  7. UIView的剖析(转)

    转自:http://blog.csdn.net/mengtnt/article/details/6716289 前面说过UIViewController,但是UIView也是在MVC中非常重要的一层  ...

  8. JavaScript 设计模式 - 工具函数

    1.类式继承,模拟面向对象语言的继承方式 function extend(subClass, superClass) { var F = function() {}; F.prototype = su ...

  9. 解决cocos2dx在Xcode中运行时报:convert: iCCP: known incorrect sRGB profile 的问题

    解决cocos2dx在Xcode中运行时报:convert: iCCP: known incorrect sRGB profile 的问题 本文的实践来源是参照了两个帖子完成的: http://dis ...

  10. Robot Framework-Windows版本安装

    Robot Framework-Mac版本安装 Robot Framework-Windows版本安装 Robot Framework-工具简介及入门使用 Robot Framework-Databa ...