Quarkus define jib extension error
See original GitHub issueEnvironment:
- Jib version: 3.2.1
- Build tool: Gradle 7.4.2
- OS: windows 11
Description of the issue: I get the following error when I run the jib plugin. Seems to be some kind of error that the jib kit is not found.
A problem occurred evaluating root project 'kafka-demo'.
> No signature of method: build_13fywf16j0dbj94mdj0di8vmt.jib() is applicable for argument types: (build_13fywf16j0dbj94mdj0di8vmt$_run_closure6) values: [build_13fywf16j0dbj94mdj0di8vmt$_run_closure6@6aedf396]
Possible solutions: is(java.lang.Object), wait(), run(), run(), find(), any()
Expected behavior: Can build image.
Steps to reproduce:
- import
id 'com.google.cloud.tools.jib' version '3.2.1'
- config
jib
plugin - run
jib
plugin
jib-gradle-plugin
Configuration:
buildscript {
dependencies {
classpath('com.google.cloud.tools:jib-quarkus-extension-gradle:0.1.1')
}
}
plugins {
id 'java'
id 'io.quarkus'
id 'com.google.cloud.tools.jib' version '3.2.1'
}
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
implementation enforcedPlatform("${quarkusPlatformGroupId}:quarkus-camel-bom:${quarkusPlatformVersion}")
implementation 'org.apache.camel.quarkus:camel-quarkus-core'
implementation 'org.apache.camel.quarkus:camel-quarkus-kafka'
implementation 'io.quarkus:quarkus-arc'
implementation 'org.apache.camel.quarkus:camel-quarkus-timer:2.9.0'
implementation 'org.apache.camel.quarkus:camel-quarkus-jackson:2.9.0'
testImplementation 'io.quarkus:quarkus-junit5'
}
group 'org.cch'
version '1.0.0-SNAPSHOT'
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs << '-parameters'
}
compileTestJava {
options.encoding = 'UTF-8'
}
jib {
from {
image = 'registry.access.redhat.com/ubi8/openjdk-11:1.11'
}
to {
image = "registry.hub.docker.com/xxx/${project.getName()}"
tags = of(version.toString(), "latest")
}
container {
jvmFlags = ['-Dquarkus.http.host=0.0.0.0','-Duser.timezone=UTC','-Xms128m', '-Xmx1g']
creationTime = Instant.now().toString()
format = 'OCI'
args = []
ports = ['8080/tcp']
labels = [maintainer: 'cch', app: 'kafka-producer']
user = '1001'
}
pluginExtensions {
pluginExtension {
implementation = 'com.google.cloud.tools.jib.gradle.extension.quarkus.JibQuarkusExtension'
}
}
}
Log output:
A problem occurred evaluating root project 'kafka-demo'.
> No signature of method: build_13fywf16j0dbj94mdj0di8vmt.jib() is applicable for argument types: (build_13fywf16j0dbj94mdj0di8vmt$_run_closure6) values: [build_13fywf16j0dbj94mdj0di8vmt$_run_closure6@6aedf396]
Possible solutions: is(java.lang.Object), wait(), run(), run(), find(), any()
Additional Information: I wish there was a Quarkus example using jib.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Container Images - Quarkus
The extension quarkus-container-image-jib is powered by Jib for performing ... When multiple container image extensions are present, an error will be raised ...
Read more >Kubernetes extension - Quarkus
The name of the image is controlled by the Jib extension and can be customized using the usual application.properties . For example with...
Read more >All configuration options - Quarkus
AWS Lambda Type Default
AWS Lambda Common Type Default
AWS Lambda Gateway REST API Type Default
Agroal ‑ Database connection pool Type Default
Read more >Building a Native Executable - Quarkus
If you see the following invalid path error for your application JAR when trying to create a native executable using a container build,...
Read more >Testing Your Application - Quarkus
Now we have defined our profile we need to include it on our test class. ... the quarkus-container-image-jib or quarkus-container-image-docker extensions ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @CCH0124 Sometimes this
unauthorized
error can be caused by credential misconfiguration. As mentioned in the error message, a good starting point could be to verify with this FAQ section if your setup matches any of these scenarios. Also make sure that the same credentials work withdocker push
after logging in withdocker login
.It’s a Gradle usage issue. This should work:
Note
tags
mean additional tags (yes, we regret the current naming choice) andregistry.hub.docker.com/xxx/${project.getName()}
impliesregistry.hub.docker.com/xxx/${project.getName()}:latest
, so no need to put"latest"
intags
.