java - 无法执行 objective-c om.spotify:docker-maven-plugin:1.2.1:build(build-image)

标签 java docker spotify

我正在尝试部署项目,但最后出现此错误,我不知道它是什么意思或如何解决

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>
请帮助以了解问题,谢谢。

最佳答案

我可以建议

  • 如果您想将 Artifact 部署到 Artifact 中,则需要具有distributionManagement标记(有关语法,请参见google)
  • 然后像运行mvn命令一样。 mvn clean deploy -Penable-docker-prod

  • 注意:这里将帮助您从配置的存储库下载依赖项jar,而与部署无关。
    要将 Artifact 部署到 Artifact (如 Artifact ,jfrog)中,您必须具有...我希望这些信息有用。

    关于java - 无法执行 objective-c om.spotify:docker-maven-plugin:1.2.1:build(build-image),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63256099/

    相关文章:

    ios - Spotify SDK 缺少 token 刷新服务?

    java - 获取嵌套属性时没有此类方法异常

    java - 如何使用 do 循环查找数组列表中 double 值的平均值?

    php - Docker-php-ext-install 与 apt install 比较?

    Docker 容器失去互联网连接,直到容器重新启动

    javascript - Spotify 应用程序 API - 播放列表订阅

    java - 当我在没有 .pdf 内容 webview 的情况下加载时没有可用的预览

    java - ArrayAdapter<String> 构造函数未定义

    linux - 如果内核库发生变化,Docker 如何允许可移植容器

    authentication - Spotify 身份验证中的重定向 URI 无效