jib icon indicating copy to clipboard operation
jib copied to clipboard

Jib gradle plugin and Java modules?

Open hrstoyanov opened this issue 7 months ago • 4 comments

Environment:

  • Jib version:3.4.3
  • Build tool: Gradle 8.8
  • OS: MacOS Java 22.0.1

Description of the issue:

  1. How do prevent Jib gradle plugin from using/searching main class and instead make it use main module?
  2. How do I tell Jib gradle plugin to use module path?
  3. How do I tell it to stop extracting the content of the jar that has a my main class?

I would like to specify all of these mylsef:

java --module my.module/my.package.App. --module-path /app/libs

I have used the below configuration, but this plugin still tries to infer main class and unzip the jar with the main class.

container{
        entrypoint = [
                "java",
                '--module-path', '/app/libs',
                '--module', 'my.module/my.App'
        ]
    }

Expected behavior:

I want Jib to stop doing so opinionated and classpath-centric, and allow me to set up main module path and main module myself.

hrstoyanov avatar Jul 02 '24 05:07 hrstoyanov