Class MojoCommon


  • public class MojoCommon
    extends java.lang.Object
    Collection of common methods to share between Maven goals.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String REQUIRED_VERSION_PROPERTY_NAME
      Describes a minimum required version or version range for Jib.
      static java.lang.String VERSION_URL  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void checkJibVersion​(org.apache.maven.plugin.descriptor.PluginDescriptor descriptor)
      Check that the actual version satisfies required Jib version range when specified.
      static boolean shouldSkipJibExecution​(JibPluginConfiguration jibPluginConfiguration)
      Determines if Jib goal execution on this project/module should be skipped due to configuration.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
    • Method Detail

      • checkJibVersion

        public static void checkJibVersion​(org.apache.maven.plugin.descriptor.PluginDescriptor descriptor)
                                    throws org.apache.maven.plugin.MojoExecutionException
        Check that the actual version satisfies required Jib version range when specified. No check is performed if the provided Jib version is null, 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 - usually this, the Mojo this check is applied in.
        Returns:
        true if Jib should be skipped (should not execute goal), or false if it should continue with execution.