Class RequirementsHistory

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

public class RequirementsHistory extends Object
Plugin requirements history.
Author:
Slawomir Jaranowski
  • Constructor Details

  • 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
    • hasSameRequirements

      public boolean hasSameRequirements(RequirementsHistory other)