public class EnforcerRuleUtils extends Object
Constructor and Description |
---|
EnforcerRuleUtils(ArtifactFactory theFactory,
ArtifactResolver theResolver,
ArtifactRepository theLocal,
List<ArtifactRepository> theRemoteRepositories,
MavenProject project,
Log theLog)
Instantiates a new enforcer rule utils.
|
EnforcerRuleUtils(EnforcerRuleHelper helper)
Instantiates a new enforcer rule utils.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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) |
public EnforcerRuleUtils(ArtifactFactory theFactory, ArtifactResolver theResolver, ArtifactRepository theLocal, List<ArtifactRepository> theRemoteRepositories, MavenProject project, Log theLog)
theFactory
- the the factorytheResolver
- the the resolvertheLocal
- the the localtheRemoteRepositories
- the the remote repositoriesproject
- the projecttheLog
- the the logpublic EnforcerRuleUtils(EnforcerRuleHelper helper)
helper
- the helperpublic List<org.apache.maven.model.Model> getModelsRecursively(String groupId, String artifactId, String version, File pom) throws ArtifactResolutionException, ArtifactNotFoundException, IOException, XmlPullParserException
groupId
- the group idartifactId
- the artifact idversion
- the versionpom
- the pomArtifactResolutionException
- the artifact resolution exceptionArtifactNotFoundException
- the artifact not found exceptionIOException
- Signals that an I/O exception has occurred.XmlPullParserException
- the xml pull parser exceptionprotected boolean checkIfModelMatches(String groupId, String artifactId, String version, org.apache.maven.model.Model model)
groupId
- the group idartifactId
- the artifact idversion
- the versionmodel
- Model being checked.public List<org.apache.maven.model.Plugin> resolvePlugins(List<org.apache.maven.model.Plugin> plugins)
public List<org.apache.maven.model.ReportPlugin> resolveReportPlugins(List<org.apache.maven.model.ReportPlugin> reportPlugins)
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.