Fork me on GitHub

Configuration

Even if the configuration process can be seen as classic, it has been redefined to be coherent and consistant in the different entry points of Paprika (default behaviour and goals). The configuration can be done in 3 ways:

  • With configuration files placed in .mvn/paprika.properties in the root project or in in any module directory. Each configuration entry is applied in all sub-modules, unless another file overload this configuration value for a specific module and its sub-module. Each configuration file should be in a properties format.
  • With environment variables. This way have the precedence over the configuration files but is less flexible, since the configuration will be the same for all the modules. Nevertheless, it can be useful to temporally set up a configuration for a command, without relying on the configuration files.
  • With system properties: maven records any argument given with -D or --define as a system property. System properties have the precedence over environment variables and configuration files.

Configuration keys can be categorized in three: core configuration, configuration for the goal release and configuration for the goal changelog.

The available keys and the default values for the core configuration are:

System property Environment variable Property name Default value Description
paprika.skip PAPRIKA_SKIP   false Skip the Paprika substitution in the pom.xml.
paprika.nonQualifierBranches PAPRIKA_NON_QUALIFIER_BRANCHES nonQualifierBranches main:master Branch names for which snapshot versions will not contain the branch name. See wildcards support.
paprika.initVersion PAPRIKA_INIT_VERSION initVersion 0.1.0 First version when no tag is found (without pre-release parts).
paprika.observedPath PAPRIKA_OBSERVED_PATH observedPath pom.xml:.mvn/**:src/main/** Observed paths of each module for modification. Always use / to separate directories. See wildcards support. Git ignored files (with .gitignored file) can not be observed.
paprika.reproducible PAPRIKA_REPRODUCIBLE reproducible true Set the Maven property project.build.outputTimestamp with the date of the last modification commit.
escaper PAPRIKA_ESCAPER template.escaper NONE Template escaper to use. Can be empty, NONE, HTML or JSON.
<name> PAPRIKA_PARTIAL_<NAME> template.partial.<name> Template partial. In the previous column, <name> refers to the name of the partial, and <NAME> refers to the same name in upper case.

Configuration for the release goal:

System property Environment variable Property name Default value Description
lastModification PAPRIKA_RELEASE_LAST_MODIFICATION release.lastModification true propose the last modification commit (instead of HEAD).
annotated PAPRIKA_RELEASE_ANNOTATED release.annotated true generate annotated tag commands.
signed PAPRIKA_RELEASE_SIGNED release.signed false if annotated, generate signed tag commands.
message PAPRIKA_RELEASE_MESSAGE release.message Release {{artifactId}} {{version}} proposed message in annotated tag commands. See the template section for knowing the available placeholders.
    release.ignore false skip this module (can be used for test modules).
subModules PAPRIKA_RELEASE_SUBMODULES release.subModules true also generate commands to release sub modules.
increment PAPRIKA_RELEASE_INCREMENT release.increment MINOR part of version to increment. Can be MAJOR, MINOR or PATCH.
skipTagged PAPRIKA_RELEASE_SKIP_TAGGED release.skipTagged true skip the module if the last modifying commit is already tagged.
output PAPRIKA_RELEASE_OUTPUT release.output   write the proposed commands in a file. If not defined, the commands are display in the Maven log.
exec PAPRIKA_RELEASE_EXEC   false execute the proposed commands.

Configuration for the changelog goal:

System property Environment variable Property name Default value Description
from PAPRIKA_CHANGELOG_FROM     Changelog start (oldest commit, excluded). Can be a valid a Git reference expression or a version number of the module. If not defined, the changelog is done until the second most recent tag. Use root to generate the changelog since the start of the Git history.
to PAPRIKA_CHANGELOG_TO   HEAD Changelog end (newest commit, included). Can be a valid a Git reference expression or a version number of the module.
output PAPRIKA_CHANGELOG_OUTPUT changelog.output   Changelog output path. If empty, the changelog is displayed in the Maven logs.
template PAPRIKA_CHANGELOG_TEMPLATE changelog.template see template Changelog template.

Wildcards support

Some configuration values can be defined as a list of matching elements. In this case, the following characters have a special meanings:

Character Meaning
\ Next character escaping (the next character is not interpreted)
: List separator
? Any single character
* Any sequence of characters, but the character /
** Any sequence of characters, including /
! If starting a matching part, exclude the match from the result (e.g. **:!.gitignore means all files excluding .gitignore)