org.apache.maven.plugin.enforcer
Class EnforceMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.enforcer.EnforceMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
EnforceOnceMojo

public class EnforceMojo
extends org.apache.maven.plugin.AbstractMojo

This goal executes the defined enforcer-rules once per module.

Version:
$Id: EnforceMojo.java 546361 2007-06-12 02:50:52Z brianf $
Author:
Brian Fox

Field Summary
protected  boolean fail
          Flag to fail the build if a version check fails.
protected  boolean failFast
          Fail on the first rule that doesn't pass
protected  org.apache.maven.project.MavenProject project
          POM
protected  org.apache.maven.execution.MavenSession session
          The MavenSession
protected  boolean skip
          Flag to easily skip all checks
protected  org.apache.maven.project.path.PathTranslator translator
          Path Translator needed by the ExpressionEvaluator
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
EnforceMojo()
           
 
Method Summary
 void execute()
          Entry point to the mojo
 org.apache.maven.project.MavenProject getProject()
           
 org.apache.maven.shared.enforcer.rule.api.EnforcerRule[] getRules()
           
 org.apache.maven.execution.MavenSession getSession()
           
 org.apache.maven.project.path.PathTranslator getTranslator()
           
 boolean isFail()
           
 boolean isFailFast()
           
 boolean isSkip()
           
 void setFail(boolean theFail)
           
 void setFailFast(boolean theFailFast)
           
 void setProject(org.apache.maven.project.MavenProject theProject)
           
 void setRules(org.apache.maven.shared.enforcer.rule.api.EnforcerRule[] theRules)
           
 void setSession(org.apache.maven.execution.MavenSession theSession)
           
 void setSkip(boolean theSkip)
           
 void setTranslator(org.apache.maven.project.path.PathTranslator theTranslator)
           
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

translator

protected org.apache.maven.project.path.PathTranslator translator
Path Translator needed by the ExpressionEvaluator


session

protected org.apache.maven.execution.MavenSession session
The MavenSession


project

protected org.apache.maven.project.MavenProject project
POM


fail

protected boolean fail
Flag to fail the build if a version check fails.


skip

protected boolean skip
Flag to easily skip all checks


failFast

protected boolean failFast
Fail on the first rule that doesn't pass

Constructor Detail

EnforceMojo

public EnforceMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Entry point to the mojo

Throws:
org.apache.maven.plugin.MojoExecutionException

isFail

public boolean isFail()
Returns:
the fail

setFail

public void setFail(boolean theFail)
Parameters:
theFail - the fail to set

getRules

public org.apache.maven.shared.enforcer.rule.api.EnforcerRule[] getRules()
Returns:
the rules

setRules

public void setRules(org.apache.maven.shared.enforcer.rule.api.EnforcerRule[] theRules)
Parameters:
theRules - the rules to set

isSkip

public boolean isSkip()
Returns:
the skip

setSkip

public void setSkip(boolean theSkip)
Parameters:
theSkip - the skip to set

isFailFast

public boolean isFailFast()
Returns:
the failFast

setFailFast

public void setFailFast(boolean theFailFast)
Parameters:
theFailFast - the failFast to set

getProject

public org.apache.maven.project.MavenProject getProject()
Returns:
the project

setProject

public void setProject(org.apache.maven.project.MavenProject theProject)
Parameters:
theProject - the project to set

getSession

public org.apache.maven.execution.MavenSession getSession()
Returns:
the session

setSession

public void setSession(org.apache.maven.execution.MavenSession theSession)
Parameters:
theSession - the session to set

getTranslator

public org.apache.maven.project.path.PathTranslator getTranslator()
Returns:
the translator

setTranslator

public void setTranslator(org.apache.maven.project.path.PathTranslator theTranslator)
Parameters:
theTranslator - the translator to set


Copyright © 2002-2010 Apache Software Foundation. All Rights Reserved.