GoogleContainerTools / jib-extensions

Apache License 2.0
117 stars 35 forks source link

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

Closed thaarbach closed 2 months ago

thaarbach commented 10 months ago

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?

suztomo commented 10 months ago

as descripted in the docs

Would you add the URL of the document?

thaarbach commented 9 months ago

@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

mpeddada1 commented 8 months ago

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?

alicejli commented 2 months ago

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