maven繼承parent,relativePath warn信息的解決辦法

好比:
    html

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.6.RELEASE</version>
    <relativePath></relativePath> // 後加的,就好使了
</parent>

以下警告信息:
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.siasun:cts-core:jar:1.0.0
[WARNING] 'parent.relativePath' of POM com.siasun:cts-core:1.0.0 (D:\CODES\cts-master\cts-core\pom.xml) points at com.siasun:cts-master instead of org.springframework.boot:spring-boot-starter-parent, please verify your project structure @ line 14, column 13
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] spring


解決辦法則是加上<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.apache

相關文章
相關標籤/搜索