Enables to crypt a properties file.

Coordinates

<plugin>
  <groupId>io.yupiik.maven</groupId>
  <artifactId>yupiik-tools-maven-plugin</artifactId>
  <version>1.2.4-SNAPSHOT</version>
</plugin>

To call this goal from the command line execute: mvn yupiik-tools:crypt-properties.

To bind this goal in the build you can use:

<plugin>
  <groupId>io.yupiik.maven</groupId>
  <artifactId>yupiik-tools-maven-plugin</artifactId>
  <version>1.2.4-SNAPSHOT</version>
  <executions>
    <execution>
      <id>my-execution</id>
      <goals>
        <goal>crypt-properties</goal>
      </goals>
      <configuration>
        <!-- execution specific configuration come there -->
      </configuration>
    </execution>
  </executions>
</plugin>

You can execute this goal particularly with mvn yupiik-tools:crypt-properties@my-execution command.

Configuration

TIP

* means the parameter is required.

input* (java.io.File)

Input properties file path. Property: ${yupiik.crypt-properties.input}.

masterPassword* (String)

Master password for the enryption (AES/CBC/PKCS5Padding). Property: ${yupiik.crypt.masterPassword}.

output* (java.io.File)

Target location of the encrypted properties file. Property: ${yupiik.crypt-properties.output}.

excludedKeys (List)

List of keys to not encrypt the value for. Property: ${yupiik.crypt-properties.excludedKeys}.

includedKeys (List)

List of keys to encrypt the value for. Property: ${yupiik.crypt-properties.includedKeys}.

preserveComments (boolean)

Should properties structure be preserved (comments, order) or not. This can break properties structure in some rare cases, if so disable this. Default value: true. Property: ${yupiik.crypt-properties.preserveComments}.

reduceDiff (boolean)

If true and output exists, it will be read to compare the encrypted values and keep them if they didnt change. Default value: true. Property: ${yupiik.crypt-properties.reduceDiff}.

useAES256GCM (boolean)

Should AES256 GCM be used else AES/CBC/PKCS5Padding is used. Default value: false. Property: ${yupiik.crypt.useAES256GCM}.