jib-extensions icon indicating copy to clipboard operation
jib-extensions copied to clipboard

Cause: extension configured but not discovered on Jib runtime classpath: com.google.cloud.tools.jib.gradle.extension.springboot.JibSpringBootExtension

Open thaarbach opened this issue 2 years ago • 3 comments

Added JibSpringBootExtension to a Spring Boot 3.1.2 Application as descripted in the docs

Execution fails with

> 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.springboot.JibSpringBootExtension

At the top of the gradle script i added

buildscript {
    dependencies {
        classpath('com.google.cloud.tools:jib-spring-boot-extension-gradle:0.1.0')
    }
}

Jib is configured as

jib {
    description """Creates an optimized docker images and push it do nexus
                   Usage: ./gradelew jib -Prepo=<docker-repository> -Pport=<exposedPort>
                  """
    from {
        image = "eclipse-temurin:17-jre"
    }
    to {
        image = "$repository/$project.name:$version"
        tags = ["latest"]
    }
    container {
        workingDirectory = "/"
        ports = [exposedPort]
        container.creationTime = "USE_CURRENT_TIMESTAMP"
        jvmFlags = [
            "-XX:+UseContainerSupport",
            "-XX:InitialRAMPercentage=50",
            "-XX:MaxRAMPercentage=100",
            "-XX:+ExitOnOutOfMemoryError",
            "-Djava.awt.headless=true",
            "-XX:+AlwaysPreTouch",
            "-Djava.security.egd=file:/dev/./urandom"
        ]
        environment = [
            SPRING_OUTPUT_ANSI_ENABLED: "ALWAYS",
            TZ                        : "Europe/Berlin"
        ]
    }
    pluginExtensions { 
        pluginExtension {
            implementation = 'com.google.cloud.tools.jib.gradle.extension.springboot.JibSpringBootExtension'
        }
    }
}

What is missing?

thaarbach avatar Oct 24 '23 09:10 thaarbach

as descripted in the docs

Would you add the URL of the document?

suztomo avatar Oct 24 '23 13:10 suztomo

@suztomo sorry, for my late answer. Found it in the readme of spring-boot-extension

https://github.com/GoogleContainerTools/jib-extensions/tree/master/first-party/jib-spring-boot-extension-gradle

thaarbach avatar Nov 24 '23 13:11 thaarbach

Can you verify if it's available in the build script by using this setup? Additionally, are you experiencing this when using particular gradlew version?

mpeddada1 avatar Dec 19 '23 18:12 mpeddada1

Closing due to lack of response; please reopen with additional info if this is still an issue. Thanks!

alicejli avatar Jun 18 '24 15:06 alicejli