fix module.version

This commit is contained in:
Brian Long 2024-08-20 14:42:41 -04:00
parent f19e1ce7a7
commit 974d46775f

View File

@ -30,6 +30,23 @@
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>module-snapshot-timestamp</id>
<phase>initialize</phase>
<goals><goal>timestamp-property</goal></goals>
<configuration>
<name>module.timestamp</name>
<timeSource>build</timeSource>
<pattern>yyyyMMddHHmmss</pattern>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.inteligr8</groupId>
<artifactId>regex-maven-plugin</artifactId>
@ -41,12 +58,12 @@
<goals><goal>replace-text</goal></goals>
<configuration>
<text>${project.version}</text>
<newProperty>project.moduleVersion</newProperty>
<newProperty>module.version</newProperty>
<regexes>
<!-- turn -SNAPSHOT into A0 -->
<!-- turn -SNAPSHOT into ATIMESTAMP -->
<regex>
<pattern>^(.*)-SNAPSHOT$</pattern>
<replacement>$1-A0</replacement>
<replacement>$1-A${module.timestamp}</replacement>
</regex>
<!-- all others are just a copy -->
<regex>