logo Jib

A Maven plugin for building container images for your Java applications.

homepage:
fresh index:
last release: 5 months ago, first release: 4 years ago
packaging: maven-plugin
get this artifact from: central
see this artifact on: search.maven.org


Display vulnerabilities (snyk): Vulnerability check

This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
jib:_skaffold-fail-if-jib-out-of-date (phase: initialize)

This internal Skaffold-related goal checks that the Jib plugin version is within some specified range. It is only required so that older versions of Jib (prior to the introduction of the {@code jib.requiredVersion} property) will error in such a way that it indicates the jib version is out of date. This goal can be removed once there are no users of Jib prior to 1.4.0. Expected use: {@code mvn jib:_skaffold-fail-if-jib-out-of-date -Djib.requiredVersion='[1.4,2)' jib:build -Dimage=xxx}

jib:_skaffold-files-v2

Print out changing source dependencies on a module. In multimodule applications it should be run by activating a single module and its dependent modules. Dependency collection will ignore project level snapshots (sub-modules) unless the user has explicitly installed them (by only requiring dependencyCollection). For use only within skaffold. Expected use: "./mvnw jib:_skaffold-files-v2 -q" or "./mvnw jib:_skaffold-files-v2 -pl module -am -q"

jib:_skaffold-init

Prints out to.image configuration and project name, used for Jib project detection in Skaffold. Expected use: {@code ./mvnw jib:_skaffold-init -q}

jib:_skaffold-package-goals

Print out all jib goals tied to the package phase. Useful in multimodule situations to determine if the correct jib goals are configured when running skaffold. For use only within skaffold. It is intended to be used from the root project and only in multimodule situations: ./mvnw jib:_skaffold-package-goals -q -pl module [-Pprofile]

jib:_skaffold-sync-map
jib:build

Builds a container image.

jib:buildTar

Builds a container image and exports to disk at the configured location ({@code ${project.build.directory}/jib-image.tar} by default).

jib:dockerBuild

Builds a container image and exports to the default Docker daemon.

Often used code snippets:

<plugin>
  <groupId>com.google.cloud.tools</groupId>
  <artifactId>jib-maven-plugin</artifactId>
  <version>${docker.jib-maven-plugin.version}</version>
  <configuration>
    <to>
      <image>docker.io/${docker.image.prefix}/${project.artifactId}</image>
      <tags>
        <tag>${project.version}</tag>
        <tag>latest</tag>
      </tags>
    </to>
  </configuration>
</plugin>
<plugin>
  <groupId>com.google.cloud.tools</groupId>
  <artifactId>jib-maven-plugin</artifactId>
  <version>${jib.version}</version>
  <configuration>
    <from>
      <image>${baseImage}</image>
    </from>
    <to>
      <image>${talend.server.image.name}</image>
    </to>
    <container>
      <extraClasspath>${imageWorkDir}/custom/*</extraClasspath>
      <useCurrentTimestamp>true</useCurrentTimestamp>
      <mainClass>org.apache.meecrowave.runner.Cli</mainClass>
      <appRoot>${imageWorkDir}</appRoot>
      <workingDirectory>${imageWorkDir}</workingDirectory>
      <environment>
        <MEECROWAVE_HOME>${imageWorkDir}</MEECROWAVE_HOME>
        <MEECROWAVE_BASE>${imageWorkDir}</MEECROWAVE_BASE>
        <MEECROWAVE_PID>${imageWorkDir}/conf/starter.pid</MEECROWAVE_PID>
        <LANG>en_US.UTF-8</LANG>
      </environment>
      <jvmFlags>
        <jvmFlag>-Djava.security.egd=file:/dev/./urandom</jvmFlag>
        <jvmFlag>-Dtalend.component.exit-on-destroy=true</jvmFlag>
        <jvmFlag>-Dmeecrowave.home=${imageWorkDir}</jvmFlag>
        <jvmFlag>-Dmeecrowave.base=${imageWorkDir}</jvmFlag>
        <jvmFlag>-Djava.io.tmpdir=${imageWorkDir}/temp</jvmFlag>
      </jvmFlags>
      <ports>
        <port>${boundPort}</port>
      </ports>
      <labels>
        <com.talend.maintainer>Talend &amp;lt;support@talend.com&amp;gt;</com.talend.maintainer>
        <com.talend.build-date>${maven.build.timestamp}</com.talend.build-date>
        <com.talend.git.repositories>${project.scm.url}</com.talend.git.repositories>
        <com.talend.git.branches>${git.branch}</com.talend.git.branches>
        <com.talend.git.commits>${git.commit.id}</com.talend.git.commits>
        <com.talend.name>Talend Component Kit Starter Server</com.talend.name>
        <com.talend.application>component-starter-server</com.talend.application>
        <com.talend.service>component-starter-server</com.talend.service>
        <com.talend.description>Talend Component Kit Starter Server</com.talend.description>
        <com.talend.url>https://www.talend.com</com.talend.url>
        <com.talend.vendor>Talend</com.talend.vendor>
        <com.talend.version>${talend.image.version}</com.talend.version>
        <com.talend.docker.cmd>docker run -d -p ${boundPort}:${boundPort} tacokit/component-server:${talend.image.version}_${maven.build.timestamp}</com.talend.docker.cmd>
        <com.talend.docker.params>_JAVA_OPTIONS=&amp;lt;JVM options (system properties etc)&amp;gt;</com.talend.docker.params>
        <com.talend.docker.healthcheck>curl --fail http://localhost:${boundPort}/api/environment</com.talend.docker.healthcheck>
      </labels>
    </container>
  </configuration>
</plugin>
<plugin>
  <groupId>com.google.cloud.tools</groupId>
  <artifactId>jib-maven-plugin</artifactId>
  <version>${jib.version}</version>
  <executions>
    <execution>
      <id>build</id>
      <phase>none</phase>
      <configuration>
        <extraDirectories>
          <paths>
            <path>${additionalDockerFiles}
                  </path>
          </paths>
        </extraDirectories>
        <from>
          <image>${baseImage}</image>
        </from>
        <to>
          <image>${talend.server.image.name}</image>
        </to>
        <container>
          <extraClasspath>${imageWorkDir}/custom/*</extraClasspath>
          <useCurrentTimestamp>true</useCurrentTimestamp>
          <mainClass>org.apache.meecrowave.runner.Cli</mainClass>
          <appRoot>${imageWorkDir}</appRoot>
          <workingDirectory>${imageWorkDir}</workingDirectory>
          <environment>
            <MEECROWAVE_HOME>${imageWorkDir}</MEECROWAVE_HOME>
            <MEECROWAVE_BASE>${imageWorkDir}</MEECROWAVE_BASE>
            <MEECROWAVE_PID>${imageWorkDir}/conf/server-vault-proxy.pid</MEECROWAVE_PID>
            <LANG>en_US.UTF-8</LANG>
            <LOGGING_LAYOUT>TEXT</LOGGING_LAYOUT>
            <LD_LIBRARY_PATH>/opt/talend/component-kit/sigar</LD_LIBRARY_PATH>
          </environment>
          <args>
            <arg>--http=${boundPort}</arg>
          </args>
          <jvmFlags>
            <jvmFlag>-Djava.security.egd=file:/dev/./urandom</jvmFlag>
            <jvmFlag>-Djava.io.tmpdir=${imageWorkDir}/temp</jvmFlag>
            <jvmFlag>-Dmeecrowave.home=${imageWorkDir}</jvmFlag>
            <jvmFlag>-Dmeecrowave.base=${imageWorkDir}</jvmFlag>
            <jvmFlag>-Dlog4j.configurationFile=log4j2-${env:LOGGING_LAYOUT}.xml</jvmFlag>
            <jvmFlag>-Dgeronimo.metrics.sigar.refreshInterval=0</jvmFlag>
          </jvmFlags>
          <ports>
            <port>${boundPort}</port>
          </ports>
          <labels>
            <com.talend.maintainer>Talend &amp;lt;support@talend.com&amp;gt;</com.talend.maintainer>
            <com.talend.build-date>${maven.build.timestamp}</com.talend.build-date>
            <com.talend.git.repositories>${project.scm.url}</com.talend.git.repositories>
            <com.talend.git.branches>${git.branch}</com.talend.git.branches>
            <com.talend.git.commits>${git.commit.id}</com.talend.git.commits>
            <com.talend.name>Talend Component Kit Server Vault Proxy</com.talend.name>
            <com.talend.application>component-server-vault-proxy</com.talend.application>
            <com.talend.service>component-server-vault-proxy</com.talend.service>
            <com.talend.description>Talend Component Kit Server Vault Proxy</com.talend.description>
            <com.talend.url>https://www.talend.com</com.talend.url>
            <com.talend.vendor>Talend</com.talend.vendor>
            <com.talend.version>${image.currentVersion}</com.talend.version>
            <com.talend.docker.cmd>docker run -d -p ${boundPort}:${boundPort} tacokit/component-server-vault-proxy:${image.currentVersion}</com.talend.docker.cmd>
            <com.talend.docker.params>_JAVA_OPTIONS=&amp;lt;JVM options&amp;gt; ex:
                    -Dtalend.vault.cache.vault.url=http://vault:8200
                    -Dtalend.vault.cache.vault.decrypt.endpoint=v1/something/decrypt/00000001
                    -Dtalend.vault.cache.vault.auth.roleId=myrole
                    -Dtalend.vault.cache.talendComponentKit.url=https://componentkitserver:8080
                  </com.talend.docker.params>
            <com.talend.docker.healthcheck>curl --fail http://localhost:${boundPort}/api/v1/proxy/environment</com.talend.docker.healthcheck>
          </labels>
        </container>
      </configuration>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>com.google.cloud.tools</groupId>
  <artifactId>jib-maven-plugin</artifactId>
  <version>${jib.version}</version>
  <executions>
    <execution>
      <id>build</id>
      <phase>none</phase>
      <configuration>
        <extraDirectories>
          <paths>
            <path>${additionalDockerFiles}</path>
          </paths>
        </extraDirectories>
        <from>
          <image>${baseImage}</image>
        </from>
        <to>
          <image>${talend.server.image.name}</image>
        </to>
        <container>
          <extraClasspath>${imageWorkDir}/custom/*</extraClasspath>
          <useCurrentTimestamp>true</useCurrentTimestamp>
          <mainClass>org.apache.meecrowave.runner.Cli</mainClass>
          <appRoot>${imageWorkDir}</appRoot>
          <workingDirectory>${imageWorkDir}</workingDirectory>
          <environment>
            <MEECROWAVE_HOME>${imageWorkDir}</MEECROWAVE_HOME>
            <MEECROWAVE_BASE>${imageWorkDir}</MEECROWAVE_BASE>
            <MEECROWAVE_PID>${imageWorkDir}/conf/server.pid</MEECROWAVE_PID>
            <LANG>en_US.UTF-8</LANG>
            <LOGGING_LAYOUT>TEXT</LOGGING_LAYOUT>
            <LD_LIBRARY_PATH>/opt/talend/component-kit/sigar</LD_LIBRARY_PATH>
          </environment>
          <jvmFlags>
            <jvmFlag>-Djdk.serialFilter=${TALEND_JDK_SERIAL_FILTER:-!*}</jvmFlag>
            <jvmFlag>-Djava.security.egd=file:/dev/./urandom</jvmFlag>
            <jvmFlag>-Djava.io.tmpdir=${imageWorkDir}/temp</jvmFlag>
            <jvmFlag>-Dmeecrowave.home=${imageWorkDir}</jvmFlag>
            <jvmFlag>-Dmeecrowave.base=${imageWorkDir}</jvmFlag>
            <jvmFlag>-Dlog4j.configurationFile=${imageWorkDir}/conf/log4j2-component-server-${env:LOGGING_LAYOUT}.xml</jvmFlag>
            <jvmFlag>-Dgeronimo.metrics.sigar.refreshInterval=0</jvmFlag>
            <jvmFlag>-Dtalend.component.exit-on-destroy=true</jvmFlag>
          </jvmFlags>
          <args>
            <arg>--http=${boundPort}</arg>
          </args>
          <ports>
            <port>${boundPort}</port>
          </ports>
          <labels>
            <com.talend.maintainer>Talend &amp;lt;support@talend.com&amp;gt;</com.talend.maintainer>
            <com.talend.build-date>${maven.build.timestamp}</com.talend.build-date>
            <com.talend.git.repositories>${project.scm.url}</com.talend.git.repositories>
            <com.talend.git.branches>${git.branch}</com.talend.git.branches>
            <com.talend.git.commits>${git.commit.id}</com.talend.git.commits>
            <com.talend.name>Talend Component Kit Server</com.talend.name>
            <com.talend.application>component-server</com.talend.application>
            <com.talend.service>component-server</com.talend.service>
            <com.talend.description>Talend Component Kit Backend Server</com.talend.description>
            <com.talend.url>https://www.talend.com</com.talend.url>
            <com.talend.vendor>Talend</com.talend.vendor>
            <com.talend.version>${image.currentVersion}</com.talend.version>
            <com.talend.docker.cmd>docker run -d -p ${boundPort}:${boundPort} tacokit/component-server:${image.currentVersion}</com.talend.docker.cmd>
            <com.talend.docker.params>_JAVA_OPTIONS=&amp;lt;JVM options (system properties etc), ex:
                    -Dtalend.component.server.component.registry=/path/to/component-registry.propertes
                    -Dtalend.component.server.maven.repository=/path/to/m2&amp;gt;
                  </com.talend.docker.params>
            <com.talend.docker.healthcheck>curl --fail http://localhost:${boundPort}/api/v1/environment
                  </com.talend.docker.healthcheck>
          </labels>
        </container>
      </configuration>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>com.google.cloud.tools</groupId>
  <artifactId>jib-maven-plugin</artifactId>
  <version>${jib.version}</version>
  <configuration>
    <containerizingMode>packaged</containerizingMode>
    <from>
      <image>${baseImage}</image>
    </from>
    <to>
      <image>${talend.server.image.name}</image>
    </to>
    <container>
      <extraClasspath>${imageWorkDir}/custom/*</extraClasspath>
      <useCurrentTimestamp>true</useCurrentTimestamp>
      <mainClass>org.talend.sdk.component.remoteengine.customizer.Cli</mainClass>
      <appRoot>${imageWorkDir}</appRoot>
      <workingDirectory>${imageWorkDir}</workingDirectory>
      <environment>
        <LANG>en_US.UTF-8</LANG>
      </environment>
      <jvmFlags>
        <jvmFlag>-Djava.security.egd=file:/dev/./urandom</jvmFlag>
      </jvmFlags>
      <labels>
        <com.talend.maintainer>Talend &amp;lt;support@talend.com&amp;gt;</com.talend.maintainer>
        <com.talend.build-date>${maven.build.timestamp}</com.talend.build-date>
        <com.talend.git.repositories>${project.scm.url}</com.talend.git.repositories>
        <com.talend.git.branches>${git.branch}</com.talend.git.branches>
        <com.talend.git.commits>${git.commit.id}</com.talend.git.commits>
        <com.talend.name>Talend Remote Engine Component Customizer</com.talend.name>
        <com.talend.application>remote-engine-customizer</com.talend.application>
        <com.talend.service>remote-engine-customizer</com.talend.service>
        <com.talend.description>Talend Remote Engine Component Customizer (unsupported)</com.talend.description>
        <com.talend.url>https://www.talend.com</com.talend.url>
        <com.talend.vendor>Talend</com.talend.vendor>
        <com.talend.version>${image.currentVersion}</com.talend.version>
        <com.talend.docker.cmd>docker run -v tacokit/remote-engine-customizer:${image.currentVersion}</com.talend.docker.cmd>
        <com.talend.docker.params>_JAVA_OPTIONS=&amp;lt;JVM options (system properties etc)&amp;gt;</com.talend.docker.params>
      </labels>
    </container>
  </configuration>
</plugin>

© Jiri Pinkas 2015 - 2022. All rights reserved! Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.