Package org.apache.maven.enforcer.rules
Class AbstractStandardEnforcerRule
- java.lang.Object
-
- org.apache.maven.enforcer.rule.api.AbstractEnforcerRuleBase
-
- org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
-
- org.apache.maven.enforcer.rules.AbstractStandardEnforcerRule
-
- All Implemented Interfaces:
EnforcerRuleBase
- Direct Known Subclasses:
AbstractPropertyEnforcerRule,AbstractRequireFiles,AbstractVersionEnforcer,AlwaysFail,AlwaysPass,BanDependencyManagementScope,BanDistributionManagement,BanDuplicatePomDependencyVersions,BanDynamicVersions,BannedDependenciesBase,BannedPlugins,BannedRepositories,BanTransitiveDependencies,DependencyConvergence,EvaluateBeanshell,ReactorModuleConvergence,RequireActiveProfile,RequireExplicitDependencyScope,RequireFileChecksum,RequireJavaVendor,RequireMatchingCoordinates,RequireNoRepositories,RequireOS,RequirePluginVersions,RequirePrerequisite,RequireProfileIdsExist,RequireReleaseVersion,RequireSameVersions,RequireSnapshotVersion,RequireUpperBoundDeps
public abstract class AbstractStandardEnforcerRule extends AbstractEnforcerRule
Abstract help rule.- Since:
- 3.2.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringmessage
-
Constructor Summary
Constructors Constructor Description AbstractStandardEnforcerRule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.lang.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.java.lang.StringgetMessage()private static java.lang.StringgetProjectId(org.apache.maven.project.MavenProject project)Returns an identifier of a given project.voidsetMessage(java.lang.String message)-
Methods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
execute, getCacheId, getLevel, getRuleName
-
Methods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRuleBase
getLog, setLog
-
-
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
-
setMessage
public void setMessage(java.lang.String message)
-
getProjectId
private static java.lang.String getProjectId(org.apache.maven.project.MavenProject project)
Returns an identifier of a given project.- Parameters:
project- the project- Returns:
- the identifier of the project in the format
<groupId>:<artifactId>:<version>
-
formatLocation
protected static java.lang.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.
-
-