org.glassfish.copyright
Class AbstractCopyrightMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.glassfish.copyright.AbstractCopyrightMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
CheckCopyrightMojo, CopyrightMojo, RepairCopyrightMojo

public abstract class AbstractCopyrightMojo
extends org.apache.maven.plugin.AbstractMojo

Check copyrights of files.


Field Summary
protected  String alternateTemplateFile
          Alternate copyright template file.
protected  File baseDirectory
          Base directory for project.
protected  boolean debug
          Turn on debugging.
protected  boolean doHidden
          Check hidden files too?
protected  String[] exclude
          Exclude pattern list.
protected  String excludeFile
          File(s) containing exclude patterns.
protected  boolean ignoreYear
          Don't check that the year is correct?
protected  org.apache.maven.plugin.logging.Log log
          Log output, initialize this in the execute method.
protected  boolean mavenOnly
          Check all files in project or just the source and resource files maven knows about?
protected  boolean normalize
          Normalize format of repaired copyright to match template?
protected  ArrayList<org.apache.maven.model.Resource> resources
          Resources.
protected  String scm
          Select SCM system - svn (default), mercurial, git.
protected  boolean scmOnly
          Skip files not under SCM?
protected  File sourceDirectory
          Source directory.
protected  String templateFile
          Copyright template file.
protected  boolean useComma
          Use comma instead of dash between years?
protected  boolean warn
          Turn off warnings.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractCopyrightMojo()
           
 
Method Summary
protected  void check(Copyright c)
          Run the copyright checker using the specified options on the specified files in this project.
protected  File getResourceFile(String resource)
          Get the File reference for a File passed in as a string reference.
protected  void initializeOptions(Copyright c)
          Initialize the Copyright object with the options from this mojo.
 
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
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Field Detail

excludeFile

protected String excludeFile
File(s) containing exclude patterns.

This parameter is resolved as a resource, then a URL, then a file. This is a comma-separated list.


exclude

protected String[] exclude
Exclude pattern list.


baseDirectory

protected File baseDirectory
Base directory for project. Should not need to be set.


sourceDirectory

protected File sourceDirectory
Source directory.


resources

protected ArrayList<org.apache.maven.model.Resource> resources
Resources.


mavenOnly

protected boolean mavenOnly
Check all files in project or just the source and resource files maven knows about?


scm

protected String scm
Select SCM system - svn (default), mercurial, git.


debug

protected boolean debug
Turn on debugging.


warn

protected boolean warn
Turn off warnings.


ignoreYear

protected boolean ignoreYear
Don't check that the year is correct?


normalize

protected boolean normalize
Normalize format of repaired copyright to match template?


useComma

protected boolean useComma
Use comma instead of dash between years?


scmOnly

protected boolean scmOnly
Skip files not under SCM?


doHidden

protected boolean doHidden
Check hidden files too?


templateFile

protected String templateFile
Copyright template file.


alternateTemplateFile

protected String alternateTemplateFile
Alternate copyright template file.


log

protected org.apache.maven.plugin.logging.Log log
Log output, initialize this in the execute method.

Constructor Detail

AbstractCopyrightMojo

public AbstractCopyrightMojo()
Method Detail

initializeOptions

protected void initializeOptions(Copyright c)
Initialize the Copyright object with the options from this mojo.


check

protected void check(Copyright c)
              throws org.apache.maven.plugin.MojoExecutionException
Run the copyright checker using the specified options on the specified files in this project.

Throws:
org.apache.maven.plugin.MojoExecutionException

getResourceFile

protected File getResourceFile(String resource)
Get the File reference for a File passed in as a string reference.

Parameters:
resource - The file for the resource manager to locate
Returns:
The File of the resource


Copyright © 2013 GlassFish Community. All Rights Reserved.