The AM build process makes use of the OpenDJ Copyright Check Maven Plugin to perform its copyright checking. This process generally works quite well be can sometimes be confusing. The following are details for those looking to explore further.
Note: All files must have a lowercase file extension
Running the plugin
The Maven plugin is wired up to run on the precommit Maven profile and so is automatically included as part of standard Jenkins build pipelines. However if you would like to invoke this plugin directly to help with debugging/explore copyright errors then the following command run from the top of the AM checkout will run the plugin:
$ mvn org.forgerock.opendj:opendj-copyright-maven-plugin:check-copyright
The following are the file extensions and their associated parsing logic:
- Java-like files: C, CSS, Groovy, H, Java, JS, JSX, Less
- HTML: HTML
- XML: FML, MD, XJB, XML, XML.VM, XSDB
- Batch files: BAT
- Shell files: Security, SH, LDIF, Properties
To learn more about the parsing logic and corresponding examples of what the copyright should look like, please see the source code.
Examples of copyright headers per file-type
~ Copyright 2020 ForgeRock AS. All Rights Reserved
~ Use of this code requires a commercial software license with ForgeRock AS.
~ or with one of its affiliates. All use shall be exclusively subject
~ to such license between the licensee and ForgeRock AS.