Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/368.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Maven在Central搜索本地可用的工件_Java_Maven - Fatal编程技术网

Java Maven在Central搜索本地可用的工件

Java Maven在Central搜索本地可用的工件,java,maven,Java,Maven,无法理解为什么Maven在中央Maven存储库中查找工件,尽管它在本地存储库中可用 以下是错误输出: [FATAL] Non-resolvable parent POM for a.b.c:app:1.23-SNAPSHOT: Failure to find a.b.c:parent:pom:1.16.52 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not

无法理解为什么Maven在中央Maven存储库中查找工件,尽管它在本地存储库中可用

以下是错误输出:

[FATAL] Non-resolvable parent POM for a.b.c:app:1.23-SNAPSHOT: Failure to find a.b.c:parent:pom:1.16.52 in https://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
a.b.c:parent:pom:1.16.52
在我的本地Maven回购协议中提供

下面是我的设置。xml

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <localRepository/>
    <interactiveMode/>
    <usePluginRegistry/>
    <offline>false</offline>
    <pluginGroups/>
    <mirrors/>
    <proxies/>
</settings>
怎么会这样?我想通过使用公司Nexus中的一些依赖项来构建应用程序。当有关Nexus的信息位于settings.xml中时,构建工作正常。在构建之后,我从settings.xml中删除了Nexus配置,并希望在不依赖Nexus的情况下构建应用程序

嗯。答案有帮助。 问题出在所有
\u remote.repositories
文件中。删除它们后,构建在没有Nexus的情况下成功


我想我的问题可以标记为重复。

您使用的是快照,因此maven会尝试找出是否有具有相同快照的较新版本 (快照)版本。考虑使用Maven选项:

 -o,--offline                           Work offline


我将根据你的建议更新这个问题
 -o,--offline                           Work offline