Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jib does not provide meaningful exception message jib:build #4263

Open
shershen0 opened this issue Jun 1, 2024 · 0 comments
Open

Jib does not provide meaningful exception message jib:build #4263

shershen0 opened this issue Jun 1, 2024 · 0 comments

Comments

@shershen0
Copy link

Environment:

  • Jib version: 3.3.1
  • Build tool: Maven:3.6
  • OS: "linux", version: "2.6.32-754.41.5.el6.x86_64", arch: "amd64", family: "unix"

Description of the issue:
Got exception during jib:build plugin job, and exception does not represent meaningful output, since it says that map value is null, but does not specify the key

labels map contains null values

Expected behavior:
Output message like this:

labels map contains null values for key {//key name//}

Steps to reproduce:

  1. mvn clean -U install

jib-maven-plugin Configuration:

	<plugin>
		<groupId>com.google.cloud.tools</groupId>
		<artifactId>jib-maven-plugin</artifactId>
		<configuration>
			<extraDirectories>
				<paths>
					<path>
						<from>target/mosek</from>
						<into>/deployments/mosek</into>
					</path>
					<path>
						<from>../mosek</from>
						<into>/deployments/mosek</into>
						<includes>mosek.lic</includes>
					</path>
				</paths>
				<permissions>
					<permission>
						<file>/deployments/mosek</file>
						<mode>755</mode>
					</permission>
					<permission>
						<file>/deployments/mosek/*</file>
						<mode>755</mode>
					</permission>
				</permissions>
			</extraDirectories>
		</configuration>
	</plugin>

Log output: Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.3.1:build (default) on project tradefinance-optimizer: Execution default of goal com.google.cloud.tools:jib-maven-plugin:3.3.1:build failed: labels map contains null values

Full exception trace:

[16:09:19] : [Step 10/15] Caused by: java.lang.IllegalArgumentException: labels map contains null values
[16:09:19] : [Step 10/15] at com.google.common.base.Preconditions.checkArgument (Preconditions.java:145)
[16:09:19] : [Step 10/15] at com.google.cloud.tools.jib.configuration.ContainerConfiguration$Builder.setLabels (ContainerConfiguration.java:241)
[16:09:19] : [Step 10/15] at com.google.cloud.tools.jib.api.JibContainerBuilder.setLabels (JibContainerBuilder.java:462)
[16:09:19] : [Step 10/15] at com.google.cloud.tools.jib.plugins.common.PluginConfigurationProcessor.processCommonConfiguration (PluginConfigurationProcessor.java:441)
[16:09:19] : [Step 10/15] at com.google.cloud.tools.jib.plugins.common.PluginConfigurationProcessor.processCommonConfiguration (PluginConfigurationProcessor.java:490)
[16:09:19] : [Step 10/15] at com.google.cloud.tools.jib.plugins.common.PluginConfigurationProcessor.createJibBuildRunnerForRegistryImage (PluginConfigurationProcessor.java:309)
[16:09:19] : [Step 10/15] at com.google.cloud.tools.jib.maven.BuildImageMojo.execute (BuildImageMojo.java:110)
[16:09:19] : [Step 10/15] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
[16:09:19] : [Step 10/15] at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
[16:09:19] : [Step 10/15] at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
[16:09:19] : [Step 10/15] at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
[16:09:19] : [Step 10/15] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
[16:09:19] : [Step 10/15] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
[16:09:19] : [Step 10/15] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
[16:09:19] : [Step 10/15] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
[16:09:19] : [Step 10/15] at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
[16:09:19] : [Step 10/15] at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
[16:09:19] : [Step 10/15] at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
[16:09:19] : [Step 10/15] at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
[16:09:19] : [Step 10/15] at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
[16:09:19] : [Step 10/15] at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
[16:09:19] : [Step 10/15] at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
[16:09:19] : [Step 10/15] at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
[16:09:19] : [Step 10/15] at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
[16:09:19] : [Step 10/15] at java.lang.reflect.Method.invoke (Method.java:498)
[16:09:19] : [Step 10/15] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
[16:09:19] : [Step 10/15] at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
[16:09:19] : [Step 10/15] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
[16:09:19] : [Step 10/15] at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants