Package org.xwiki.tool.enforcer
Class AbstractPomCheck
- java.lang.Object
-
- org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
-
- org.xwiki.tool.enforcer.AbstractPomCheck
-
- All Implemented Interfaces:
org.apache.maven.enforcer.rule.api.EnforcerRuleBase
- Direct Known Subclasses:
BannedDependencyType
,ExternalExtensionCheck
,ValidateDependencyVersion
public abstract class AbstractPomCheck extends org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
Allows to write Enforcer Rules that perform checks on the POM.- Since:
- 7.4RC1
- Version:
- $Id: 3b88ae3970301c94b175d00e055fab09c20e0cbc $
-
-
Constructor Summary
Constructors Constructor Description AbstractPomCheck()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.maven.enforcer.rule.api.EnforcerLogger
getLog()
protected org.apache.maven.model.Model
getModel()
The Maven model as it's present in the project'spom.xml
(non resolved).protected org.apache.maven.model.Model
getResolvedModel()
The resolved Maven model (i.e.void
setLog(org.apache.maven.enforcer.rule.api.EnforcerLogger arg0)
-
-
-
Method Detail
-
getModel
protected org.apache.maven.model.Model getModel() throws org.apache.maven.enforcer.rule.api.EnforcerRuleException
The Maven model as it's present in the project'spom.xml
(non resolved).- Returns:
- the Model instance for the current Maven project (this contains the raw data from the pom.xml file before any interpolation)
- Throws:
org.apache.maven.enforcer.rule.api.EnforcerRuleException
- if an error occurred getting the Model instance
-
getResolvedModel
protected org.apache.maven.model.Model getResolvedModel() throws org.apache.maven.enforcer.rule.api.EnforcerRuleException
The resolved Maven model (i.e. with parent poms taken into account).- Returns:
- the resolved Model instance for the current Maven project (this contains the data from the pom.xml file after interpolation)
- Throws:
org.apache.maven.enforcer.rule.api.EnforcerRuleException
- if an error occurred getting the Model instance
-
setLog
public void setLog(org.apache.maven.enforcer.rule.api.EnforcerLogger arg0)
- Specified by:
setLog
in interfaceorg.apache.maven.enforcer.rule.api.EnforcerRuleBase
-
getLog
public org.apache.maven.enforcer.rule.api.EnforcerLogger getLog()
-
-