Package org.apache.sling.maven.enforcer
Class RequireExplicitDependencyScope
- java.lang.Object
-
- org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
-
- org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule
-
- org.apache.sling.maven.enforcer.RequireExplicitDependencyScope
-
- All Implemented Interfaces:
org.apache.maven.enforcer.rule.api.EnforcerRule
,org.apache.maven.enforcer.rule.api.EnforcerRule2
public class RequireExplicitDependencyScope extends org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule implements org.apache.maven.enforcer.rule.api.EnforcerRule2
Checks that all dependencies have an explicitly declared scope in the non-effective pom (i.e. without taking inheritance or dependency management into account)/
-
-
Constructor Summary
Constructors Constructor Description RequireExplicitDependencyScope()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(org.apache.maven.enforcer.rule.api.EnforcerRuleHelper helper)
protected static String
formatLocation(org.apache.maven.model.InputLocation location)
Creates a string with line/column information for problems originating directly from this POM.-
Methods inherited from class org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule
getCacheId, isCacheable, isResultValid
-
Methods inherited from class org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
getLevel, getMessage, setLevel, setMessage
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
execute
public void execute(@Nonnull org.apache.maven.enforcer.rule.api.EnforcerRuleHelper helper) throws org.apache.maven.enforcer.rule.api.EnforcerRuleException
- Specified by:
execute
in interfaceorg.apache.maven.enforcer.rule.api.EnforcerRule
- Throws:
org.apache.maven.enforcer.rule.api.EnforcerRuleException
-
formatLocation
protected static String formatLocation(org.apache.maven.model.InputLocation location)
Creates a string with line/column information for problems originating directly from this POM. Inspired by ModelProblemUtils.formatLocation(...)- Parameters:
location
- The location which should be formatted, must not benull
.- Returns:
- The formatted problem location or an empty string if unknown, never
null
.
-
-