Class EnforcerRuleUtils
- java.lang.Object
-
- org.apache.maven.plugins.enforcer.utils.EnforcerRuleUtils
-
-
Constructor Summary
Constructors Constructor Description EnforcerRuleUtils(EnforcerRuleHelper helper)Instantiates a new enforcer rule utils.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckIfModelMatches(String groupId, String artifactId, String version, org.apache.maven.model.Model model)Make sure the model is the one I'm expecting.List<org.apache.maven.model.Model>getModelsRecursively(String groupId, String artifactId, String version, File pom)This method loops through all the parents, getting each pom model and then its parent.List<org.apache.maven.model.Plugin>resolvePlugins(List<org.apache.maven.model.Plugin> plugins)List<org.apache.maven.model.ReportPlugin>resolveReportPlugins(List<org.apache.maven.model.ReportPlugin> reportPlugins)
-
-
-
Constructor Detail
-
EnforcerRuleUtils
public EnforcerRuleUtils(EnforcerRuleHelper helper)
Instantiates a new enforcer rule utils.- Parameters:
helper- the helper
-
-
Method Detail
-
getModelsRecursively
public List<org.apache.maven.model.Model> getModelsRecursively(String groupId, String artifactId, String version, File pom) throws org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolverException, IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
This method loops through all the parents, getting each pom model and then its parent.- Parameters:
groupId- the group idartifactId- the artifact idversion- the versionpom- the pom- Returns:
- the models recursively
- Throws:
org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolverException- the artifact resolution exceptionIOException- Signals that an I/O exception has occurred.org.codehaus.plexus.util.xml.pull.XmlPullParserException- the xml pull parser exception
-
checkIfModelMatches
protected boolean checkIfModelMatches(String groupId, String artifactId, String version, org.apache.maven.model.Model model)
Make sure the model is the one I'm expecting.- Parameters:
groupId- the group idartifactId- the artifact idversion- the versionmodel- Model being checked.- Returns:
- true, if check if model matches
-
resolvePlugins
public List<org.apache.maven.model.Plugin> resolvePlugins(List<org.apache.maven.model.Plugin> plugins)
-
-