- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我向我的父 pom 添加了一个来自开源社区的子模块。它有自己的 parent 。抛出以下内容:
[ERROR] Failed to read Maven project: 2 problems were encountered while building the effective model for com.offbytwo.jenkins:jenkins-client:0.2.1.302.1 [WARNING] 'parent.relativePath' points at com.verigreen:verigreen-root instead of org.sonatype.oss:oss-parent, please verify your project structure @ line 18, column 10 [FATAL] Non-resolvable parent POM: Failure to transfer org.sonatype.oss:oss-parent:pom:7 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.sonatype.oss:oss-parent:pom:7 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom and 'parent.relativePath' points at wrong local POM @ line 18, column 10 for project com.offbytwo.jenkins:jenkins-client:0.2.1.302.1 at C:\Verigreen\VG_test_branches\jenkins-client\pom.xml
我的父 pom 看起来像这样:
<artifactId>verigreen-root</artifactId>
<version>1.6.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>verigreen</name>
.
.
<modules>
<module>jenkins-client</module>
<module>vg-common</module>
jenkins-client pom 看起来像这样:
<name>Jenkins Client</name>
<url>http://github.com/RisingOak/jenkins-client</url>
<description>A Jenkins API client for Java</description>
<groupId>com.offbytwo.jenkins</groupId>
<artifactId>jenkins-client</artifactId>
<version>0.2.1.302.1</version>
<packaging>jar</packaging>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
如何指向父pom?
最佳答案
您的家长信息有误,请更改为:
<parent>
<groupId>com.verigreen</groupId>
<artifactId>verigreen-root</artifactId>
<version>1.6.1-SNAPSHOT</version>
</parent>
并将其添加到父 pom 上(如果它不存在):
<groupId>com.verigreen</groupId>
关于java - 如何在maven中添加到原始父级的相对路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30100942/
我是一名优秀的程序员,十分优秀!