maven继承parent,relativePath warn信息的解决办法
往下看之前一定要先看
%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信息的解决办法的更多相关文章
- 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 的解决办法: 错 ...
- sublime text3安装后html:5+Tab不能快速生成html头部信息的解决办法
sublime text3安装后html:5+Tab不能快速生成html头部信息的解决办法: 需要下载Emmet插件,按网上写的步骤按ctrl+shift+P打开命令面板,输入install,鼠标点击 ...
- “maven编码gbk的不可映射字符”解决办法
一.问题描述 Eclipse中使用Maven编译项目源代码时,如下的错误 java源代码在Eclipse中显示是没有任何错误的,可是执行"maven install"命令编译项目时 ...
- 使用Maven编译项目遇到——“maven编码gbk的不可映射字符”解决办法 ——转载
一.问题描述 今天在MyEclipse中使用Maven编译项目源代码时,结果如下了如下的错误
- 转】使用Maven编译项目遇到——“maven编码gbk的不可映射字符”解决办法
原博文出自于: http://www.cnblogs.com/xdp-gacl/p/4239006.html 感谢! 一.问题描述 今天在MyEclipse中使用Maven编译项目源代码时,结果如下了 ...
- 贡献你的代码,将jar包发布到Maven中央仓库以及常见错误的解决办法
前几天将自己的日志工具发布到了Maven中央仓库中.这个工具本省没有多少技术含量,因为是修改别人的源代码实现的,但是将jar发布到Maven仓库却收获颇丰,因为网上有些教程过时了,在此分享下自己发布j ...
- Maven中 jar包冲突原理与解决办法
Maven中jar包冲突是开发过程中比较常见而又令人头疼的问题,我们需要知道 jar包冲突的原理,才能更好的去解决jar包冲突的问题.本文将从jar包冲突的原理和解决两个方面阐述Maven中jar包冲 ...
- Maven Java EE Configuration Problem 的完美解决办法
背景: 最近在修改项目的时候,发现修改了项目依赖以后会出现如下图:Maven Java EE Configuration Problem 的问题,对于有强迫症的我来说,看到项目上面有个很小的红色小叉号 ...
- 在eclipse中创建maven webapp项目时弹出错误-解决办法
在eclipse中创建maven webapp项目时报错: Could not resolve archetype org.apache.maven.archetypes:maven-archetyp ...
随机推荐
- VS快捷键设置
设置VS快捷键,这里以关闭当前窗口为例子: 步骤: 1.tool=>option=>environment=>keyboard 2.百度关闭当前窗口的command是什么,百度出来是 ...
- Python学习第八天(os)
os主要是实现文件夹的创建和管理功能 os.mkdir(path) 创建目录 os.chdir(path)改变当前工作目录 os.fchdir() 通过文件描述符改变工作目录 os.chroot() ...
- django 创建项目
django-admin startproject project-name 启动服务器 python manage.py runserver 0.0.0.0:8000 配置ALLOW_HOST
- oracle 干掉连接
最初由 lutheran 发布 [B]进程超出最大连接数,数据库不能连接,查看v$session里只有80多个会话,但是在v$process里有350个数据库进程,数据库使用的是专用服务器,有大部分的 ...
- Schema约束
Schema约束(*xml中如何引入schema约束)(看懂Schema:能根据Schema写出XML文档来:)1.Schema约束文档本身就是一个XML文档.2.Schema对名称空间支持很好3.S ...
- Jungle Roads
Description The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid ...
- 文件与base64二进制转换
/// <summary> /// 文件转换为Base64二进制流 /// </summary> /// <param name="FilePath" ...
- Restful风格API接口开发springMVC篇
Restful风格的API是一种软件架构风格,设计风格而不是标准,只是提供了一组设计原则和约束条件.它主要用于客户端和服务器交互类的软件.基于这个风格设计的软件可以更简洁,更有层次,更易于实现缓存等机 ...
- fancybox iframe 刷新父页面(项目经验)
<script type="text/javascript"> $(document).ready(function() { $(".fancybox&quo ...
- wordnet的一些入门性介绍
关于wordnet的介绍很多,中英文都有,我这里主要是参考了别人的.自己组织了一下. 1.简介 1.1关于词典 Wordnet是一个由普林斯顿大学认识科学实验室在心理学教授乔治·A·米勒的指导下建立和 ...