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
,RequireNoRepositories
,RequireOS
,RequirePluginVersions
,RequirePrerequisite
,RequireProfileIdsExist
,RequireReleaseVersion
,RequireSameVersions
,RequireSnapshotVersion
,RequireUpperBoundDeps
Abstract help rule.
- Since:
- 3.2.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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.private static String
getProjectId
(org.apache.maven.project.MavenProject project) Returns an identifier of a given project.void
setMessage
(String message) Methods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
execute, getCacheId, getLevel
Methods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRuleBase
getLog, setLog
-
Field Details
-
message
-
-
Constructor Details
-
AbstractStandardEnforcerRule
public AbstractStandardEnforcerRule()
-
-
Method Details
-
getMessage
-
setMessage
-
getProjectId
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 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
.
-