build-helper-maven-plugin
build-helper-maven-plugin copied to clipboard
timestamp-property setting pattern has no effect
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>timestamp-property</id>
<goals>
<goal>timestamp-property</goal>
</goals>
<configuration>
<name>build.timestamp</name>
<pattern>dd.MM.yyyy, HH:mm</pattern>
</configuration>
</execution>
</executions>
</plugin>
pom.xml
<properties>
<buildDate>${build.timestamp}</buildDate>
</properties>
Output:
2021-09-22T08:38:51,295 INFO : [main] - Application - loaded version.properties: {app.buildDate=2021-09-22T06:38:13Z, app.version=v1.0.0}
sorry for unformatted code, I can't change that :(
it should work as expected - there i an IT covering the behavior and evaluating the result: https://github.com/mojohaus/build-helper-maven-plugin/tree/master/src/it/timestamp-regex
please run your maven build with debug output (-X) and check for a line including "define property" and your property, this should print the value the plugin has actually set.