Class AbstractProcessPluginDefinition

java.lang.Object
dev.dsf.bpe.v2.AbstractProcessPluginDefinition
All Implemented Interfaces:
ProcessPluginDefinition

public abstract class AbstractProcessPluginDefinition extends Object implements ProcessPluginDefinition
Implements getName(), getVersion() and getReleaseDate() based on properties defined in a "plugin.properties" file. The UTF-8 encoded file needs to contain property entries for "name", "version" (suffixes like -SNAPSHOT will be removed from the value, regex: -.*$) and "release-date" (with the value formated as a ISO-8601 timestamp, see ZonedDateTime.parse(CharSequence)).

Using maven the file should be located at src/main/resources/plugin.properties with the following content:

release-date=${project.build.outputTimestamp}
version=${project.version}
name=${project.artifactId}

The maven pom.xml file needs to define the project.build.outputTimestamp property (also needed for reproducible builds) and enable resource filtering for the plugin.properties file:

<project>
  <properties>
    <project.build.outputTimestamp>2025-07-22T16:45:00Z</project.build.outputTimestamp>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
        <excludes>
          <exclude>plugin.properties</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>plugin.properties</include>
        </includes>
      </resource>
    </resources>
  </build>
</project>