【问题标题】:Failed to execute goal com.spotify:docker-maven-plugin:1.2.1:build (build-image)未能执行目标 com.spotify:docker-maven-plugin:1.2.1:build (build-image)
【发布时间】:2020-11-25 02:15:13
【问题描述】:

我正在尝试部署一个项目,但最后我得到了这个错误,我不知道这是什么意思或如何解决它

The requested profile "enable-docker-prod" could not be activated because it does not exist.

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:1.2.2:push (push-image) on project myalert-v2-backend: Exception caught: Get https://172.19.47.33:5000/v1/_ping: dial tcp 172.19.47.33:5000: getsockopt: no route to host -> [Help 1]

这是 pom.xml

中的配置文件
<profiles>
    <profile>
        <id>enable-docker-preprod</id>
        <properties>
            <docker.registry>10.75.6.44:5000</docker.registry>
            <skipDocker>false</skipDocker>
        </properties>
    </profile>
    <profile>
        <id>enable-docker-prod</id>
        <properties>
            <docker.registry>172.19.46.169:5000</docker.registry>
            <skipDocker>false</skipDocker>
        </properties>
        <repositories>
            <repository>
                <id>releases</id>
                <name>releases</name>
                <url>http://repo.jenkins-ci.org/releases/</url>
                <snapshots />
            </repository>
            <repository>
                <id>SRVDEV-ARTFAC-snapshots</id>
                <url>http://172.19.46.238:8081/artifactory/libs-snapshot-local</url>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>central</id>
                <name>plugins-release</name>
                <url>http://172.19.46.238:8081/artifactory/plugins-release</url>
            </pluginRepository>
            <pluginRepository>
                <id>jcenter-snapshots</id>
                <name>jcenter</name>
                <url>http://oss.jfrog.org/artifactory/oss-snapshot-local/</url>
            </pluginRepository>
            <pluginRepository>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
                <id>jcenter-releases</id>
                <name>jcenter</name>
                <url>http://jcenter.bintray.com</url>
            </pluginRepository>
        </pluginRepositories>
    </profile>
</profiles>

请帮助以了解问题所在,谢谢。

【问题讨论】:

  • 我可以建议如下:

标签: java docker spotify


【解决方案1】:

我可以建议,

  1. 如果你想将你的工件部署到工件中,你需要有 distributionManagement 标签(语法参考谷歌)

  2. 然后像运行 mvn 命令。 mvn clean deploy -Penable-docker-prod

注意:这里将帮助您从配置的存储库中下载依赖jar,它与部署无关。

要将您的工件部署到您的工件(如工件、jfrog)中,您必须拥有...我希望这些信息有用。

【讨论】:

    猜你喜欢
    • 2018-04-29
    • 2018-04-28
    • 1970-01-01
    • 2013-12-27
    • 1970-01-01
    • 2015-01-15
    • 2021-06-27
    • 1970-01-01
    • 2014-03-10
    相关资源
    最近更新 更多