public class EnforcerRuleUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) org.apache.maven.artifact.factory.ArtifactFactory |
factory
The factory.
|
private EnforcerRuleHelper |
helper |
(package private) org.apache.maven.plugin.logging.Log |
log
The log.
|
(package private) org.apache.maven.project.ProjectBuildingRequest |
projectBuildingRequest |
(package private) org.apache.maven.shared.artifact.resolve.ArtifactResolver |
resolver
The resolver.
|
| Constructor and Description |
|---|
EnforcerRuleUtils(EnforcerRuleHelper helper)
Instantiates a new enforcer rule utils.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkIfModelMatches(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
org.apache.maven.model.Model model)
Make sure the model is the one I'm expecting.
|
java.util.List<org.apache.maven.model.Model> |
getModelsRecursively(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.io.File pom)
This method loops through all the parents, getting each pom model and then its parent.
|
private org.apache.maven.model.Model |
getPomModel(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.io.File pom)
This method gets the model for the defined artifact.
|
private org.apache.maven.model.Model |
readModel(java.io.File pom)
Gets the pom model for this file.
|
private void |
resolve(org.apache.maven.model.Plugin plugin) |
private void |
resolve(org.apache.maven.model.ReportPlugin plugin) |
java.util.List<org.apache.maven.model.Plugin> |
resolvePlugins(java.util.List<org.apache.maven.model.Plugin> plugins) |
java.util.List<org.apache.maven.model.ReportPlugin> |
resolveReportPlugins(java.util.List<org.apache.maven.model.ReportPlugin> reportPlugins) |
org.apache.maven.artifact.factory.ArtifactFactory factory
org.apache.maven.shared.artifact.resolve.ArtifactResolver resolver
org.apache.maven.plugin.logging.Log log
org.apache.maven.project.ProjectBuildingRequest projectBuildingRequest
private EnforcerRuleHelper helper
public EnforcerRuleUtils(EnforcerRuleHelper helper)
helper - the helperprivate org.apache.maven.model.Model readModel(java.io.File pom)
throws java.io.IOException,
org.codehaus.plexus.util.xml.pull.XmlPullParserException
pom - the pomjava.io.IOException - Signals that an I/O exception has occurred.org.codehaus.plexus.util.xml.pull.XmlPullParserException - the xml pull parser exceptionprivate org.apache.maven.model.Model getPomModel(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.io.File pom)
throws org.apache.maven.shared.artifact.resolve.ArtifactResolverException,
java.io.IOException,
org.codehaus.plexus.util.xml.pull.XmlPullParserException
groupId - the group idartifactId - the artifact idversion - the versionpom - the pomorg.apache.maven.shared.artifact.resolve.ArtifactResolverException - the artifact resolution exceptionorg.codehaus.plexus.util.xml.pull.XmlPullParserException - the xml pull parser exceptionjava.io.IOException - Signals that an I/O exception has occurred.public java.util.List<org.apache.maven.model.Model> getModelsRecursively(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.io.File pom)
throws org.apache.maven.shared.artifact.resolve.ArtifactResolverException,
java.io.IOException,
org.codehaus.plexus.util.xml.pull.XmlPullParserException
groupId - the group idartifactId - the artifact idversion - the versionpom - the pomorg.apache.maven.shared.artifact.resolve.ArtifactResolverException - the artifact resolution exceptionjava.io.IOException - Signals that an I/O exception has occurred.org.codehaus.plexus.util.xml.pull.XmlPullParserException - the xml pull parser exceptionprotected boolean checkIfModelMatches(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
org.apache.maven.model.Model model)
groupId - the group idartifactId - the artifact idversion - the versionmodel - Model being checked.private void resolve(org.apache.maven.model.Plugin plugin)
private void resolve(org.apache.maven.model.ReportPlugin plugin)
public java.util.List<org.apache.maven.model.Plugin> resolvePlugins(java.util.List<org.apache.maven.model.Plugin> plugins)
public java.util.List<org.apache.maven.model.ReportPlugin> resolveReportPlugins(java.util.List<org.apache.maven.model.ReportPlugin> reportPlugins)