Class LicenseCheckMojo
java.lang.Object
nl.javadude.gradle.plugins.license.maven.LicenseCheckMojo
- All Implemented Interfaces:
com.mycila.maven.plugin.license.Callback,CallbackWithFailure
CallbackWithFailure implementation for check mode: logs files with missing headers
and collects them as violations. Does not modify any files.
Inlined from hierynomus/license-gradle-plugin.
- Since:
- 1.1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns all files that were affected (missing header or reformatted, depending on the concrete implementation).booleanReturnstrueif at least one file triggered a header violation during processing.voidonExistingHeader(com.mycila.maven.plugin.license.document.Document document, com.mycila.maven.plugin.license.header.Header header) voidonHeaderNotFound(com.mycila.maven.plugin.license.document.Document document, com.mycila.maven.plugin.license.header.Header header) voidonUnknownFile(com.mycila.maven.plugin.license.document.Document document, com.mycila.maven.plugin.license.header.Header header)
-
Field Details
-
missingHeaders
-
-
Constructor Details
-
LicenseCheckMojo
-
-
Method Details
-
onHeaderNotFound
public void onHeaderNotFound(com.mycila.maven.plugin.license.document.Document document, com.mycila.maven.plugin.license.header.Header header) - Specified by:
onHeaderNotFoundin interfacecom.mycila.maven.plugin.license.Callback
-
onUnknownFile
public void onUnknownFile(com.mycila.maven.plugin.license.document.Document document, com.mycila.maven.plugin.license.header.Header header) - Specified by:
onUnknownFilein interfacecom.mycila.maven.plugin.license.Callback
-
onExistingHeader
public void onExistingHeader(com.mycila.maven.plugin.license.document.Document document, com.mycila.maven.plugin.license.header.Header header) - Specified by:
onExistingHeaderin interfacecom.mycila.maven.plugin.license.Callback
-
hadFailure
public boolean hadFailure()Description copied from interface:CallbackWithFailureReturnstrueif at least one file triggered a header violation during processing.- Specified by:
hadFailurein interfaceCallbackWithFailure- Returns:
truewhen there were failures
-
getAffected
Description copied from interface:CallbackWithFailureReturns all files that were affected (missing header or reformatted, depending on the concrete implementation).- Specified by:
getAffectedin interfaceCallbackWithFailure- Returns:
- the affected files, never
null
-