Class MungeMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.sonatype.plugins.munge.MungeMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class MungeMojo extends org.apache.maven.plugin.AbstractMojo
Munges source files by keeping or removing sections of code according to what symbols are enabled.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private org.apache.maven.model.Build
     
    private String
    List of patterns (separated by commas) specifying files that should not be copied; by default exclude nothing.
    private org.apache.maven.project.MavenProject
     
    private String
    List of patterns (separated by commas) specifying files that should be munged; by default munge everything.
    private String
    Where to put the munged source files.
    private String
    List of symbols (separated by commas) identifying which sections of munged code to keep.

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

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    static void
    munge(String from, String to, String includes, String excludes)
    Munges source files found in from and places them in to, honoring any includes or excludes.

    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 Details

    • mungedDirectory

      private String mungedDirectory
      Where to put the munged source files.
    • symbols

      private String symbols
      List of symbols (separated by commas) identifying which sections of munged code to keep.
    • includes

      private String includes
      List of patterns (separated by commas) specifying files that should be munged; by default munge everything.
    • excludes

      private String excludes
      List of patterns (separated by commas) specifying files that should not be copied; by default exclude nothing.
    • build

      private org.apache.maven.model.Build build
    • executedProject

      private org.apache.maven.project.MavenProject executedProject
  • Constructor Details

    • MungeMojo

      public MungeMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • munge

      public static void munge(String from, String to, String includes, String excludes) throws org.apache.maven.plugin.MojoExecutionException
      Munges source files found in from and places them in to, honoring any includes or excludes.
      Parameters:
      from - The original source directory
      to - The munged source directory
      includes - Comma-separated list of files to include
      excludes - Comma-separated list of files to exclude
      Throws:
      org.apache.maven.plugin.MojoExecutionException