org.scijava.maven.plugin
Interface SciJavaDependencyChecker

All Superinterfaces:
org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor
All Known Implementing Classes:
AbstractSciJavaDependencyChecker, SnapshotFinder

public interface SciJavaDependencyChecker
extends org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor

DependencyNodeVisitor with convenience methods for logging and configuration.

Author:
Mark Hiner

Method Summary
 void debug(String message)
           
 void error(String message)
           
 boolean failed()
           
 void info(String message)
           
 boolean isFailFast()
           
 boolean isRoot(org.apache.maven.shared.dependency.tree.DependencyNode node)
          Convenience method to check if a node is a root.
 String makeExceptionMessage()
           
 boolean matches(String groupId)
           
 void setFailed()
          Mark this checker as in a failing state.
 void setFailFast(boolean failFast)
           
 void setGroupIds(Set<String> groupIds)
           
 void setLog(org.apache.maven.plugin.logging.Log log)
           
 boolean stopVisit()
           
 
Methods inherited from interface org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor
endVisit, visit
 

Method Detail

setLog

void setLog(org.apache.maven.plugin.logging.Log log)
Parameters:
log - Log to use by the debug(java.lang.String), error(java.lang.String) and info(java.lang.String) methods.

debug

void debug(String message)
Parameters:
message - Prints to the current Log's debug output, if a log is present.

error

void error(String message)
Parameters:
message - Prints to the current Log's error output, if a log is present.

info

void info(String message)
Parameters:
message - Prints to the current Log's info output, if a log is present.

setGroupIds

void setGroupIds(Set<String> groupIds)
Parameters:
groupIds - An optional inclusive list of Maven groupIds. If not null, implementations should only fail on artifacts whose groupIds are contained in this set.

matches

boolean matches(String groupId)
Parameters:
groupId - Maven groupId to test.
Returns:
true if the given groupId should be considered for checker failure.

setFailFast

void setFailFast(boolean failFast)
Parameters:
failFast - Flag indicating if a checker implementation should continue after encountering its first error.

isFailFast

boolean isFailFast()
Returns:
If true, this checker should stop visiting nodes after it encounters its first error.

isRoot

boolean isRoot(org.apache.maven.shared.dependency.tree.DependencyNode node)
Convenience method to check if a node is a root.

Parameters:
node - DependencyNode to test.
Returns:
true iff the given node is a root (no parents).

setFailed

void setFailed()
Mark this checker as in a failing state.


failed

boolean failed()
Returns:
True if this checker is in a failed state.

stopVisit

boolean stopVisit()
Returns:
true if this checker should stop visiting nodes.

makeExceptionMessage

String makeExceptionMessage()
Returns:
A formatted message reporting any encountered failures.


Copyright © 2014–2015 SciJava. All rights reserved.