Class AbstractStandardEnforcerRule
java.lang.Object
org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
org.apache.maven.enforcer.rules.AbstractStandardEnforcerRule
- All Implemented Interfaces:
EnforcerRuleBase
- Direct Known Subclasses:
AlwaysFail, AlwaysPass, BanDependencyManagementScope, BanDistributionManagement, BanDuplicatePomDependencyVersions, BanDynamicVersions, BannedDependencies, BannedPlugins, BannedRepositories, BanTransitiveDependencies, DependencyConvergence, EnforceBytecodeVersion, EvaluateBeanshell, ReactorModuleConvergence, RequireActiveProfile, RequireEnvironmentVariable, RequireExplicitDependencyScope, RequireFileChecksum, RequireFilesDontExist, RequireFilesExist, RequireFilesSize, RequireJavaVendor, RequireJavaVersion, RequireMatchingCoordinates, RequireMavenVersion, RequireNoRepositories, RequireOS, RequirePluginVersions, RequirePrerequisite, RequireProfileIdsExist, RequireProperty, RequireReleaseDeps, RequireReleaseVersion, RequireSameVersions, RequireSnapshotVersion, RequireUpperBoundDeps
Abstract help rule.
- Since:
- 3.2.0
- Author:
- Slawomir Jaranowski
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringformatLocation(org.apache.maven.project.MavenProject project, org.apache.maven.model.InputLocation location) Creates a string with line/column information for problems originating directly from this POM.getLog()Provide anEnforcerLoggerinstance for RulevoidsetLog(EnforcerLogger log) Used byEnforcerMojoto inject logger instancevoidsetMessage(String message) Methods inherited from class AbstractEnforcerRule
execute, getCacheId, getLevel, getRuleName
-
Constructor Details
-
AbstractStandardEnforcerRule
public AbstractStandardEnforcerRule()
-
-
Method Details
-
getMessage
-
setMessage
-
formatLocation
protected static String formatLocation(org.apache.maven.project.MavenProject project, org.apache.maven.model.InputLocation location) Creates a string with line/column information for problems originating directly from this POM. Inspired byo.a.m.model.building.ModelProblemUtils.formatLocation(...).- Parameters:
project- the current project.location- The location which should be formatted, must not benull.- Returns:
- The formatted problem location or an empty string if unknown, never
null.
-
setLog
Used byEnforcerMojoto inject logger instance- Specified by:
setLogin interfaceEnforcerRuleBase- Parameters:
log- anEnforcerLoggerinstance
-
getLog
Provide anEnforcerLoggerinstance for RuleNOTICE A logger is not available in constructors.
- Returns:
- an
EnforcerLoggerinstance
-