Class RequirementsHistory

java.lang.Object
org.apache.maven.plugin.plugin.report.RequirementsHistory

public class RequirementsHistory extends Object
Plugin requirements history.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private String
    The minimum version of the JDK to run this plugin.
    private String
    The minimum version of Maven to run this plugin.
    private String
    The plugin version.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    discoverJdkRequirement(org.apache.maven.project.MavenProject project, org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
    Tries to determine the JDK requirement from the following sources (until one is found) use JDK requirement from plugin descriptor use release configuration of org.apache.maven.plugins:maven-compiler-plugin use maven.compiler.release< property use target configuration of org.apache.maven.plugins:maven-compiler-plugin use maven.compiler.target property
    static String
    discoverMavenRequirement(org.apache.maven.project.MavenProject project, org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
    Tries to determine the Maven requirement from either the plugin descriptor or (if not set) from the Maven prerequisites element in the POM.
    discoverRequirements(org.apache.maven.project.MavenProject project)
     
    private static org.apache.maven.model.Plugin
    getCompilerPlugin(org.apache.maven.model.PluginContainer container)
     
     
     
    private static String
    getPluginParameter(org.apache.maven.model.Plugin plugin, String parameter)
     
     
    boolean
     
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • version

      private String version
      The plugin version.
    • maven

      private String maven
      The minimum version of Maven to run this plugin.
    • jdk

      private String jdk
      The minimum version of the JDK to run this plugin.
  • Constructor Details

    • RequirementsHistory

      public RequirementsHistory()
  • Method Details

    • getVersion

      public String getVersion()
    • getMaven

      public String getMaven()
    • getJdk

      public String getJdk()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • discoverRequirements

      public static RequirementsHistory discoverRequirements(org.apache.maven.project.MavenProject project)
    • discoverMavenRequirement

      public static String discoverMavenRequirement(org.apache.maven.project.MavenProject project, org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
      Tries to determine the Maven requirement from either the plugin descriptor or (if not set) from the Maven prerequisites element in the POM.
      Parameters:
      project - not null
      pluginDescriptor - the plugin descriptor (can be null)
      Returns:
      the Maven version or null if not specified
    • discoverJdkRequirement

      public static String discoverJdkRequirement(org.apache.maven.project.MavenProject project, org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
      Tries to determine the JDK requirement from the following sources (until one is found)
      1. use JDK requirement from plugin descriptor
      2. use release configuration of org.apache.maven.plugins:maven-compiler-plugin
      3. use maven.compiler.release< property
      4. use target configuration of org.apache.maven.plugins:maven-compiler-plugin
      5. use maven.compiler.target property
      Parameters:
      project - not null
      pluginDescriptor - the plugin descriptor (can be null)
      Returns:
      the JDK version
    • getCompilerPlugin

      private static org.apache.maven.model.Plugin getCompilerPlugin(org.apache.maven.model.PluginContainer container)
    • getPluginParameter

      private static String getPluginParameter(org.apache.maven.model.Plugin plugin, String parameter)
    • hasSameRequirements

      public boolean hasSameRequirements(RequirementsHistory other)