Class AbstractQuliceMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.qulice.maven.AbstractQuliceMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Direct Known Subclasses:
CheckMojo

public abstract class AbstractQuliceMojo extends org.apache.maven.plugin.AbstractMojo implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Abstract mojo.
Since:
0.3
  • Field Summary

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    contextualize(org.codehaus.plexus.context.Context ctx)
     
    protected abstract String
    Do the real execution.
    protected final com.qulice.maven.MavenEnvironment
    env()
    Get the environment.
    final void
     
    final org.apache.maven.execution.MavenSession
    Current maven session.
    final void
    Set asserts option.
    void
    setEncoding(String encoding)
    Set source code encoding.
    final void
    Set extra ErrorProne flags.
    final void
    Set excludes.
    final void
    setProject(org.apache.maven.project.MavenProject proj)
    Set Maven Project (used mostly for unit testing).
    final void
    setSkip(boolean skp)
    Set skip option (mostly for unit testing).

    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
  • Constructor Details

    • AbstractQuliceMojo

      protected AbstractQuliceMojo()
      Default constructor.
  • Method Details

    • setProject

      public final void setProject(org.apache.maven.project.MavenProject proj)
      Set Maven Project (used mostly for unit testing).
      Parameters:
      proj - The project to set
    • setSkip

      public final void setSkip(boolean skp)
      Set skip option (mostly for unit testing).
      Parameters:
      skp - The "skip" option
    • setAsserts

      public final void setAsserts(Collection<String> val)
      Set asserts option.
      Parameters:
      val - Asserts to use
    • setExcludes

      public final void setExcludes(Collection<String> exprs)
      Set excludes.
      Parameters:
      exprs - Expressions
    • setErrorprone

      public final void setErrorprone(Collection<String> flags)
      Set extra ErrorProne flags.
      Parameters:
      flags - Flags, e.g. -Xep:UnicodeInCode:OFF
    • setEncoding

      public void setEncoding(String encoding)
      Set source code encoding.
      Parameters:
      encoding - Source code encoding
    • contextualize

      public final void contextualize(org.codehaus.plexus.context.Context ctx)
      Specified by:
      contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
    • execute

      public final void execute() throws org.apache.maven.plugin.MojoFailureException
      Specified by:
      execute in interface org.apache.maven.plugin.Mojo
      Throws:
      org.apache.maven.plugin.MojoFailureException
    • session

      public final org.apache.maven.execution.MavenSession session()
      Current maven session.
      Returns:
      Current maven session
    • doExecute

      protected abstract String doExecute() throws org.apache.maven.plugin.MojoFailureException
      Do the real execution.
      Returns:
      What was done, as the middle of the final log line, e.g. "checked 42 .java files against 385 rules"
      Throws:
      org.apache.maven.plugin.MojoFailureException - If some failure inside
    • env

      protected final com.qulice.maven.MavenEnvironment env()
      Get the environment.
      Returns:
      The environment