Closed asheshsaraf closed 2 years ago
We are planning a release of all Jib modules in the next two weeks.
Thanks for the prompt reply. I do have some counter questions though:
Yes, we've tested when accepting the contribution. No, the extension won't change unless bugs are found.
Getting the below error while using jib-native-image-extension-gradle
library and running ./gradlew jib
command. Any idea on the issue?
error running extension 'com.google.cloud.tools.jib.plugins.extension.NullExtension': extension configured but not discovered on Jib runtime classpath: com.google.cloud.tools.jib.gradle.extension.nativeimage.JibNativeImageExtension
Note: I have published the library locally. Here are the changes done in build.gradle.kts file:
buildscript {
dependencies {
classpath("com.google.cloud.tools:jib-native-image-extension-gradle:0.1.0-SNAPSHOT")
}
}
plugins {
....
id("org.springframework.experimental.aot") version "0.12.1"
id("org.graalvm.buildtools.native") version "0.9.13"
}
tasks.withType<BootBuildImage> {
builder = "paketobuildpacks/builder:tiny"
environment = mapOf(
"BP_NATIVE_IMAGE" to "true")
buildpacks = listOf("gcr.io/paketo-buildpacks/graalvm:7.5.1","gcr.io/paketo-buildpacks/java-native-image:7.26.0")
imageName = ***
}
jib {
.....
pluginExtensions {
pluginExtension {
implementation = "com.google.cloud.tools.jib.gradle.extension.nativeimage.JibNativeImageExtension"
properties = mapOf("imageName" to imageName)
}
}
}
Can you verify if the class is available in the build script, e.g., like the folloiwng?
buildscript {
dependencies {
classpath("com.google.cloud.tools:jib-native-image-extension-gradle:0.1.0-SNAPSHOT")
}
}
plugins {
...
}
import com.google.cloud.tools.jib.gradle.extension.nativeimage.JibNativeImageExtension
println(JibNativeImageExtension::class.toString())
...
Yes, the full class name is getting printed. "class com.google.cloud.tools.jib.gradle.extension.nativeimage.JibNativeImageExtension"
But still getting the same error: error running extension 'com.google.cloud.tools.jib.plugins.extension.NullExtension': extension configured but not discovered on Jib runtime classpath: com.google.cloud.tools.jib.gradle.extension.nativeimage.JibNativeImageExtension
The only explanation I can think of is that your SNAPSHOT jar has a missing/old/incorrect service provider configuration. I'd manually open the jar file published to ~/.m2/repository
and check if the file is on the correct path and there's no typo.
From what I can see jib-native-image-extension-gradle
has still not been released yet. Or am I mistaken?
You are correct; we are looking to release it this week.
jib-native-image-extension-gradle
is released now!
It should show up in maven repository in a few hours.
Hi,
Please release the submodule
jib-native-image-extension-gradle
as it is not yet released.Thanks, Ashesh Saraf