This is a basic Maven-based project that can be used as license provider for all OzgCloud Projects
This is a license provider for all OzgCloud Projects.
It provides the the header and full text of the german [EUPL Version 1.2 license][license]
It uses the ["license-maven-plugin"](https://github.com/mathieucarbou/license-maven-plugin/).
It contains the header and full text of the german [EUPL Version 1.2 license](https://eupl.eu/1.2/de/). The header file is templated to get the correct "year of introduction" for one specific file. The mechanism uses the Git history.
## Usage
> [!NOTE]
> Some developers have a license-header with a *fixed* "year-of-introduction" in their IDE (see [project-setup](https://git.ozg-sh.de/ozgcloud-doc/dokumentation/src/branch/master/Entwicklungsumgebung#code-templates)). Running the plugin may overwrite this value (surprisingly) to a correct value from the Git History.
It is a library, meant to be included as a dependency on any project which may want to make use of it.
The recommendation is to use the (managed) preconfiguration which ideally suits every project. This config is part of OZG-Parent-Projects ([common-lib](../pom.xml) or [ozgcloud-common-parent](../ozgcloud-common-parent/pom.xml)).
To use it add
The plugin may get executed:
* manually - When a developer has to (bulk-) update all files in a project
* Pre-Push-Hook - To make sure, all pushed files contain license headers
## Commands
To add or update the license header to file run:
```bash
mvn license:format
```
To verify if there are files with missing license header run:
It will include the preconfigured License-Plugin to your project.
### Use custom version (older approach)
> [!CAUTION]
> The preconfigured License-Plugin is extended to review Git-History to find the "Year of inception" for a file (see [OZG-6839](https://jira.mgm-tp.com/jira/browse/OZG-6839))
> If your custom configuration uses the provided [header.txt](src/main/resources/license/eupl_v1_2_de/header.txt), without the Git-Plugin, the year will be missing.
In your properties section of the pom.xml, add the current version of this: