GoogleContainerTools / GoogleContainerTools/jib

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

Open
#4,400 1 comment 2 reactions 0 assignees View on GitHub
priority: p3 type:bug
Dominant language
Java
Stars
14.5k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

**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](https://repo1.maven.org/maven2/com/google/cloud/tools/jib-core/0.27.3/) although the POM contains a comment at the top saying that it has been published and should be used:
```xml





```

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](https://repo1.maven.org/maven2/com/google/cloud/tools/jib-core/0.27.3/).

**Steps to reproduce**:

1. Set up Gradle project with
* ` gradle/wrapper/gradle-wrapper.properties`:
```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`:
```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`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.