转自: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.
发表评论
-
[转:]jQuery焦点中国地图
2013-04-17 11:05 1636转自:http://xiaoyaosr.blog.51cto ... -
一个轻量级的网页遮罩层jQuery插件
2012-11-14 17:48 6338一个轻量级的网页遮罩层jQuery插件 分 ... -
通过Spring Mail Api发送邮件
2012-11-14 17:47 1405通过Spring Mail Api发送邮件 ... -
jquery.validate
2012-11-09 16:51 1024jquery.validate 需要JQuery ... -
Hibernate commit() 和flush() 的区别(转)
2012-09-28 09:46 2590Hibernate commit() 和flush( ... -
maven3.0.2下settings.xml配置下(转)
2012-09-25 19:14 5899maven3.0.2下settings.xml配置下 ... -
hibernate中Qurey类的setDate方法自动截掉时分秒——setDate和setTimeStamp(转)
2012-09-03 10:30 3004原帖地址:http://www.iteye.com/to ... -
Maven3.0.3的环境变量配置
2012-07-19 11:22 2979转自http://hi.baidu.com/douxinchu ... -
转:org.apache.catalina.core.JreMemoryLeakPreventionListener解决办法
2012-07-18 15:38 5479转自:http://blog.csdn.net/ang ... -
eclipse中的java文件图标j成空心
2012-07-06 10:06 13460eclipse中的java文件图标j成空心 ... -
jQuery - Ajax - readyState获取请求操作的当前状态
2012-06-29 14:46 0jQuery - Ajax - readyState获取请求 ... -
Dom加载判断,兼容所有浏览器
2012-06-29 14:35 9115Dom加载判断,兼容所有浏览器 Dom 加载完毕,兼容 ... -
document.readyState几种状态及示例
2012-06-29 14:33 1908document.readySta ... -
DOM Ready 详解
2012-06-29 14:03 3054转自:http://www.cnblogs.com/zhang ... -
转】js实现另存为的方法
2012-06-29 13:42 2877转】js实现另存为的方法 本文转自http://www ... -
js添加和去除千分号
2012-06-22 11:41 2083利用js的replace方法和正则表达式实现 1 ... -
Hibernate的游离态与持久态转换(转)
2012-06-18 10:30 5166本文转自:http://blog.csdn.net/sdban ... -
使用Maven管理Eclipse Java项目
2012-06-11 17:10 1036转自:http://www.blogjava.net/lost ... -
The parent project must have a packaging type of POM
2012-06-11 17:09 25212The parent project must ha ... -
(转)利用eclipse构建和部署maven工程
2012-05-31 12:44 2304本文转自http://ll-feng.iteye.c ...
相关推荐
目的pom,其次在文件系统的这个位置(relativePath位置),然后在本地仓库,最后在远程仓库寻找父项目的pom。 --> <relativePath /> </parent> version。 --> <parent> <!--被继承的父项目的构件...
对于maven父子工程的创建,以maven父子工程商品查询的案例实现
这里是maven继承与聚合代码。
这是一个maven依赖+继承+聚合的小例子,用来参考和学习maven
maven-parent-pom-0.1.0.jar
一个简单的maven聚合,继承示例。parent为父目录,account-email,account-persist为子项目,继承了parent的pom.xml文件
maven项目pom.xml中parent标签的使用
maven-parent-config-0.2.0.jar
maven-parent-config-0.1.1.jar
maven-parent-config-0.1.0.jar
maven-parent-config-0.2.0-sources.jar
maven-parent-config-0.1.1-sources.jar
maven-parent-config-0.1.0-sources.jar
自己整理的maven打包出现错误的解决办法、含有截图等 附带maven搭建私服等资料
maven-parent:Apache Maven项目父POM
maven_parent用于创建项目父类,无需导入jar包,方便开发,提高效率
NULL 博文链接:https://yuhuiblog695685688425687986842568269.iteye.com/blog/2399946
maven常见问题及解决办法
maven工程拆分与聚合的思想 ,把web工程修改成maven拆分与聚合的形式的具体步骤 1. maven工程拆分与聚合的思想 2. 把第二阶段做好的web工程修改成maven拆分与聚合的形式
When you install this component you will be installing all of the core Wizards, the POM Editor, Maven Repository integration, and Maven integration m2eclipse Core Update Site: ...