Skip to content

jib-core-0.27.3.module isn't available on Maven Central #4400

@kiwi-oss

Description

@kiwi-oss

Environment:

  • Jib version: jib-core 0.27.3
  • Build tool: Gradle 8.14.3
  • OS: Doesn't matter, fails on CI and on different developer systems

Description of the issue:

With the move to Artifact Registry as our company's artefact manager, we get the following issue in our builds:

* What went wrong:
Execution failed for task ':my-application:quarkusGenerateAppModel'.
> Could not resolve all files for configuration ':my-application:quarkusProdRuntimeClasspathConfigurationDeployment'.
   > Could not resolve com.google.cloud.tools:jib-core:0.27.3.
     Required by:
         project :my-application > io.quarkus:quarkus-bom:3.21.3
         project :my-application > io.quarkus:quarkus-container-image-jib-deployment:3.24.1
      > Could not resolve com.google.cloud.tools:jib-core:0.27.3.
         > Could not get resource 'https://artifact-registry/project/virtual-maven/com/google/cloud/tools/jib-core/0.27.3/jib-core-0.27.3.module'.
            > Could not GET 'https://artifact-registry/project/virtual-maven/com/google/cloud/tools/jib-core/0.27.3/jib-core-0.27.3.module'. Received status code 502 from server: Bad Gateway

virtual-maven is a Maven artefact repository where the Maven Central remote repository has the highest priority, followed by a remote repository for our old artefact manager that's been shut down. It seems that since the file isn't found in Maven Central, the latter repository is tried, and that fails because it's offline.

So the root cause seems to be that file, supposedly a Gradle metadata module file, not being available on Maven Central. Indeed, it's not listed there although the POM contains a comment at the top saying that it has been published and should be used:

  <!-- This module was also published with a richer model, Gradle metadata,  -->
  <!-- which should be used instead. Do not delete the following line which  -->
  <!-- is to indicate to Gradle or any Gradle module metadata file consumer  -->
  <!-- that they should prefer consuming it instead. -->
  <!-- do_not_remove: published-with-gradle-metadata -->

Do I understand correctly that this file is unintentionally missing? If so, I'd like to request either providing it or removing the hint in the POM. Hopefully, this would then allow Artifact Registry to fetch the dependency which is available itself.

Expected behavior:

Either no mention to a Gradle metadata module file in the published POM, or jib-core-0.27.3.module available in the dependency's folder on Maven Central.

Steps to reproduce:

  1. Set up Gradle project with
    • gradle/wrapper/gradle-wrapper.properties:
      distributionBase=GRADLE_USER_HOME
      distributionPath=wrapper/dists
      distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
      networkTimeout=10000
      validateDistributionUrl=true
      zipStoreBase=GRADLE_USER_HOME
      zipStorePath=wrapper/dists
    • build.gradle:
      plugins {
        id 'io.quarkus'
        id 'com.google.cloud.artifactregistry.gradle-plugin'
      }
      
      dependencies {
        implementation platform('io.quarkus:quarkus-bom:3.21.3')
        implementation 'io.quarkus:quarkus-container-image-jib'
      }
      
      repositories {
        mavenLocal()
        // Virtual repository for Maven artefacts in Artifact Registry
        // where the Maven Central remote repository has the highest priority
        maven {
          url = 'artifactregistry://artifact-registry/project/virtual-maven'
        }
      }
  2. Run ./gradlew build

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions