在Nexus信息库中找不到工件快照

问题描述

我在笔记本中安装了Nexus存储库,然后在其中上传一个快照项目。看起来是这样:

enter image description here

现在,我正在尝试构建Docker映像,并使用另一个项目将以前的项目作为依赖项。这是我的Dockerfile:

FROM maven:3.5.2-jdk-8-alpine AS MAVEN_BUILD
copY settings.xml /usr/share/maven/ref/
copY pom.xml /build/
RUN echo $(route -n | awk '/UG[ \t]/{print $2}')
RUN sed -i "s/localhost/$(route -n | awk '/UG[ \t]/{print $2}')/g" /build/pom.xml
copY src /build/src/
workdir /build/
RUN mvn package -DskipTests=true

# Other stuff that doesn't matter...

我已将以下行添加到pom.xml中,以解决Nexus的依赖关系(locahost已被docker网关IP替换(请参阅Dockerfile)):

<repositories>
    <repository>
        <id>maven-group</id>
        <url>http://localhost:8081/repository/maven-group/</url>
    </repository>
</repositories>

它一直按预期运行,直到maven需要下载我自己的库依赖项(一个上传到Nexus的库),失败并显示以下消息:

[ERROR] Failed to execute goal on project springboot-servicio-producto: Could not resolve dependencies for project com.abarazal.springboot.app.producto:springboot-servicio-producto:jar:0.0.1-SNAPSHOT: Could not find artifact com.abarazal.springboot.app.commons:springboot-servicio-commons:jar:0.0.1-SNAPSHOT in maven-group (http://172.17.0.1:8081/repository/maven-group/) -> [Help 1]

在pom.xml中,依赖项声明为:

<dependency>
    <groupId>com.abarazal.springboot.app.commons</groupId>
    <artifactId>springboot-servicio-commons</artifactId>
    <version>0.0.1-SNAPSHOT</version>
</dependency>

要使它正常工作,我缺少什么?

解决方法

检查可用磁盘空间是否超过10%。 这可能是弹性搜索引起的问题。