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 ...
随机推荐
- Sql 中text类型字段判断是否为空
用 len关键字,字段=''会报错:数据类型 text 和 varchar 在 equal to 运算符中不兼容. 正确方法: 1. 字段 is null 2. datalength(字段)=0 注: ...
- ajaxSetup和普通的ajax方法.
我明明写了ajaxSetup()方法可是它有时候却不一定是会执行,因为比如我common.js里写的ajaxSetup()方法,然后index.js里写了ajax方法,可是有的时候ajaxSetup里 ...
- 咏南IOCP中间件支持海量并发方案(集群)
咏南IOCP中间件支持海量并发方案(集群) 支持D7~XE10.1.1开发 支持负载均衡,自动故障转移 可以在不停机的状态下,根据负载情况灵活增加中间件机器 中间件使用IOCP通信,单中间件支持并发数 ...
- Linux下apache日志分析与状态查看方法
假设apache日志格式为:118.78.199.98 – - [09/Jan/2010:00:59:59 +0800] “GET /Public/Css/index.css HTTP/1.1″ 30 ...
- [转]linux14.04下caffe的安装步骤
linux14.04下caffe的安装步骤 原文地址:http://blog.csdn.net/xiaoyang19910623/article/details/52997481?locatio ...
- RNN and LSTM saliency Predection Scene Label
http://handong1587.github.io/deep_learning/2015/10/09/rnn-and-lstm.html //RNN and LSTM http://hando ...
- 【动态规划】bzoj1664 [Usaco2006 Open]County Fair Events 参加节日庆祝
将区间按左端点排序. f(i)=max{f(j)+1}(p[j].x+p[j].y<=p[i].x && j<i) #include<cstdio> #incl ...
- Java将文本写入字符输出流,缓冲各个字符,从而提供单个字符、数组和字符串的高效写入。
java.io 类 BufferedWriter java.lang.Object java.io.Writer java.io.BufferedWriter BufferedWriter publi ...
- 注册表(regedit)
注册表(Registry,繁体中文版Windows称之为登录档)是Microsoft Windows中的一个重要的数据库,用于存储系统和应用程序的设置信息. 打开方式:1.开始>>运行.中 ...
- 不要手动StopWatch了,让BenchmarkDotNet帮你
Nuget: https://www.nuget.org/packages/BenchmarkDotNet/ Project Site: https://github.com/PerfDotNet/B ...