Package com.google.cloud.tools.jib.maven
Class MojoCommon
- java.lang.Object
-
- com.google.cloud.tools.jib.maven.MojoCommon
-
public class MojoCommon extends java.lang.ObjectCollection of common methods to share between Maven goals.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringREQUIRED_VERSION_PROPERTY_NAMEDescribes a minimum required version or version range for Jib.static java.lang.StringVERSION_URL
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcheckJibVersion(org.apache.maven.plugin.descriptor.PluginDescriptor descriptor)Check that the actual version satisfies required Jib version range when specified.static booleanshouldSkipJibExecution(JibPluginConfiguration jibPluginConfiguration)Determines if Jib goal execution on this project/module should be skipped due to configuration.
-
-
-
Field Detail
-
REQUIRED_VERSION_PROPERTY_NAME
public static final java.lang.String REQUIRED_VERSION_PROPERTY_NAME
Describes a minimum required version or version range for Jib.- See Also:
- Constant Field Values
-
VERSION_URL
public static final java.lang.String VERSION_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
checkJibVersion
public static void checkJibVersion(org.apache.maven.plugin.descriptor.PluginDescriptor descriptor) throws org.apache.maven.plugin.MojoExecutionExceptionCheck that the actual version satisfies required Jib version range when specified. No check is performed if the provided Jib version isnull, which should only occur during debug.- Parameters:
descriptor- the plugin version- Throws:
org.apache.maven.plugin.MojoExecutionException- if the version is not acceptable
-
shouldSkipJibExecution
public static boolean shouldSkipJibExecution(JibPluginConfiguration jibPluginConfiguration)
Determines if Jib goal execution on this project/module should be skipped due to configuration.- Parameters:
jibPluginConfiguration- usuallythis, the Mojo this check is applied in.- Returns:
trueif Jib should be skipped (should not execute goal), orfalseif it should continue with execution.
-
-