gpt4 book ai didi

maven - 不可解决的父 POM 问题

转载 作者:行者123 更新时间:2023-12-02 03:35:50 25 4
gpt4 key购买 nike

您好,我在我的机器上构建 Maven 项目时遇到了一个奇怪的问题。

它们似乎不是 pom 文件或代码的问题,因为完全相同的项目可以在另一个工作站上成功构建。

我收到的错误是这样的

The project com.jonney:jon-app-parent:1.3.9 (/Users/me/Work/jon-app-paren/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Failure to find com.jonney-parent:pom:3 in 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 and 'parent.relativePath' points at wrong local POM @ line 6, column 13 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

这是我的 pom 文件的片段

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>com.jonney-parent</artifactId>
<name>Jon SDK java</name>
<packaging>jar</packaging>

<parent>
<groupId>com.jonney</groupId>
<artifactId>com.jonney-parent</artifactId>
<version>1.3.9</version>
<relativePath>../pom.xml</relativePath>
</parent>

最佳答案

尝试使用“-U”选项调用 Maven(强制更新依赖项)。

关于maven - 不可解决的父 POM 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23546169/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com