@Mojo(name="recommend", defaultPhase=VALIDATE, threadSafe=true) public class RecommendMojo extends AbstractEnforceMojo
EnforceMojo
it will
never fail the build, i.e. it will only warn.cache, container, ignoreCache, mojoExecution, project, session, skip, translator
Constructor and Description |
---|
RecommendMojo() |
Modifier and Type | Method and Description |
---|---|
protected String |
createRuleMessage(int i,
String currentRule,
EnforcerRuleException e)
Returns the error message displayed when failFast is set to false.
|
EnforcerRule[] |
getRules() |
boolean |
isFail()
Always return false, as this Mojo should never fail the build.
|
boolean |
isFailFast()
Always return false, as this Mojo should never fail the build.
|
void |
setFailFast(boolean theFailFast) |
void |
setRules(EnforcerRule[] theRules) |
contextualize, execute, getProject, getSession, getTranslator, isSkip, setProject, setSession, setSkip, setTranslator, shouldExecute
public RecommendMojo()
public EnforcerRule[] getRules()
getRules
in class AbstractEnforceMojo
public void setRules(EnforcerRule[] theRules)
setRules
in class AbstractEnforceMojo
theRules
- the recommendedRules to setpublic void setFailFast(boolean theFailFast)
setFailFast
in class AbstractEnforceMojo
theFailFast
- the failFast to setpublic boolean isFail()
isFail
in class AbstractEnforceMojo
public boolean isFailFast()
isFailFast
in class AbstractEnforceMojo
protected String createRuleMessage(int i, String currentRule, EnforcerRuleException e)
AbstractEnforceMojo
createRuleMessage
in class AbstractEnforceMojo
i
- indexcurrentRule
- name of the current rule.e
- rule exceptionCopyright © 2007–2015 The Apache Software Foundation. All rights reserved.