Class RequirementsHistory
java.lang.Object
org.apache.maven.plugin.plugin.report.RequirementsHistory
Plugin requirements history.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdiscoverJdkRequirement(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 usereleaseconfiguration oforg.apache.maven.plugins:maven-compiler-pluginusemaven.compiler.release<property usetargetconfiguration oforg.apache.maven.plugins:maven-compiler-pluginusemaven.compiler.targetpropertystatic StringdiscoverMavenRequirement(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.static RequirementsHistorydiscoverRequirements(org.apache.maven.project.MavenProject project) private static org.apache.maven.model.PlugingetCompilerPlugin(org.apache.maven.model.PluginContainer container) getJdk()getMaven()private static StringgetPluginParameter(org.apache.maven.model.Plugin plugin, String parameter) booleantoString()
-
Field Details
-
version
The plugin version. -
maven
The minimum version of Maven to run this plugin. -
jdk
The minimum version of the JDK to run this plugin.
-
-
Constructor Details
-
RequirementsHistory
public RequirementsHistory()
-
-
Method Details
-
getVersion
-
getMaven
-
getJdk
-
toString
-
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 nullpluginDescriptor- 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)- use JDK requirement from plugin descriptor
- use
releaseconfiguration oforg.apache.maven.plugins:maven-compiler-plugin - use
maven.compiler.release<property - use
targetconfiguration oforg.apache.maven.plugins:maven-compiler-plugin - use
maven.compiler.targetproperty
- Parameters:
project- not nullpluginDescriptor- 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
-
hasSameRequirements
-