Package com.mycila.maven.plugin.license
Class LicenseSet
- java.lang.Object
-
- com.mycila.maven.plugin.license.LicenseSet
-
public class LicenseSet extends Object
-
-
Field Summary
Fields Modifier and Type Field Description FilebasedirThe base directory, in which to search for project files.String[]excludesSpecifies files, which are excluded in the check.StringheaderLocation of the header.String[]headerDefinitionsAllows the use of external header definitions files.HeaderSection[]headerSectionsHeadSections define special regions of a header that allow for dynamic substitution and validationString[]includesSpecifies files, which are included in the check.StringinlineHeaderHeader, as text, directly in pom file.HeaderStyle[]inlineHeaderStylesAllows the use of inline header definitions within the POM.String[]keywordsSpecify the list of keywords to use to detect a header.MultimultiAlternative to `header`, `inlineHeader`, or `validHeaders` for use when code is multi-licensed.Map<String,String>propertiesYou can set here some properties that you want to use when reading the header file.BooleanuseDefaultExcludesSpecify if you want to use default exclusions besides the files you have excluded.String[]validHeadersSpecifies additional header files to use when checking for the presence of a valid header in your sources.
-
Constructor Summary
Constructors Constructor Description LicenseSet()
-
-
-
Field Detail
-
basedir
@Parameter(property="license.basedir") public File basedir
The base directory, in which to search for project files.
-
header
@Parameter(property="license.header") public String header
Location of the header. It can be a relative path, absolute path, classpath resource, any URL. The plugin first check if the name specified is a relative file, then an absolute file, then in the classpath. If not found, it tries to construct a URL from the location.
-
inlineHeader
@Parameter(property="license.inlineHeader") public String inlineHeader
Header, as text, directly in pom file. Using a CDATA section is strongly recommended.
-
validHeaders
@Parameter public String[] validHeaders
Specifies additional header files to use when checking for the presence of a valid header in your sources.
When using format goal, this property will be used to detect all valid headers that don't need formatting.
When using remove goal, this property will be used to detect all valid headers that also must be removed.
-
multi
@Parameter public Multi multi
Alternative to `header`, `inlineHeader`, or `validHeaders` for use when code is multi-licensed. Whilst you could create a concatenated header yourself, a cleaner approach may be to specify more than one header and have them concatenated together by the plugin. This allows you to maintain each distinct license header in its own file and combined them in different ways.
-
headerDefinitions
@Parameter public String[] headerDefinitions
Allows the use of external header definitions files. These files are properties like files.
-
inlineHeaderStyles
@Parameter public HeaderStyle[] inlineHeaderStyles
Allows the use of inline header definitions within the POM.
-
headerSections
@Parameter public HeaderSection[] headerSections
HeadSections define special regions of a header that allow for dynamic substitution and validation
-
properties
@Parameter public Map<String,String> properties
You can set here some properties that you want to use when reading the header file. You can use in your header file some properties like ${year}, ${owner} or whatever you want for the name. They will be replaced when the header file is read by those you specified in the command line, in the POM and in system environment.
-
includes
@Parameter public String[] includes
Specifies files, which are included in the check. By default, all files are included.
-
excludes
@Parameter public String[] excludes
Specifies files, which are excluded in the check. By default, only the files matching the default exclude patterns are excluded.
-
keywords
@Parameter public String[] keywords
Specify the list of keywords to use to detect a header. A header must include all keywords to be valid. By default, the word 'copyright' is used. Detection is done case insensitive.
-
useDefaultExcludes
@Parameter(property="license.useDefaultExcludes") public Boolean useDefaultExcludes
Specify if you want to use default exclusions besides the files you have excluded. Default exclusions exclude CVS and SVN folders, IDE descriptors and so on.
-
-