Class 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 Detail

      • AbstractPomCheck

        public AbstractPomCheck()
    • 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's pom.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 interface org.apache.maven.enforcer.rule.api.EnforcerRuleBase
      • getLog

        public org.apache.maven.enforcer.rule.api.EnforcerLogger getLog()