Class RequirementsHistory
- java.lang.Object
-
- org.apache.maven.plugin.plugin.report.RequirementsHistory
-
public class RequirementsHistory extends Object
Plugin requirements history.- Author:
- Slawomir Jaranowski
-
-
Constructor Summary
Constructors Constructor Description RequirementsHistory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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 userelease
configuration oforg.apache.maven.plugins:maven-compiler-plugin
usemaven.compiler.release<
property usetarget
configuration oforg.apache.maven.plugins:maven-compiler-plugin
usemaven.compiler.target
propertystatic 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.static RequirementsHistory
discoverRequirements(org.apache.maven.project.MavenProject project)
String
getJdk()
String
getMaven()
String
getVersion()
boolean
hasSameRequirements(RequirementsHistory other)
String
toString()
-
-
-
Constructor Detail
-
RequirementsHistory
public RequirementsHistory()
-
-
Method Detail
-
getVersion
public String getVersion()
-
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
release
configuration oforg.apache.maven.plugins:maven-compiler-plugin
- use
maven.compiler.release<
property - use
target
configuration oforg.apache.maven.plugins:maven-compiler-plugin
- use
maven.compiler.target
property
- Parameters:
project
- not nullpluginDescriptor
- the plugin descriptor (can be null)- Returns:
- the JDK version
-
hasSameRequirements
public boolean hasSameRequirements(RequirementsHistory other)
-
-