Class BannedDependencies

  • All Implemented Interfaces:
    EnforcerRuleBase

    @Named("bannedDependencies")
    public final class BannedDependencies
    extends BannedDependenciesBase
    This rule checks that lists of dependencies are not included.
    • Constructor Detail

      • BannedDependencies

        @Inject
        BannedDependencies​(org.apache.maven.execution.MavenSession session,
                           ResolverUtil resolverUtil)
    • Method Detail

      • validate

        protected boolean validate​(org.apache.maven.artifact.Artifact artifact)
        Description copied from class: BannedDependenciesBase
        Validates a dependency artifact if it fulfills the enforcer rule
        Specified by:
        validate in class BannedDependenciesBase
        Parameters:
        artifact - dependency to be checked against the list of excludes
        Returns:
        true if the dependency passes the rule, false if the dependency triggers a validation error
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object