keycloak-uncached

KEYCLOAK-7815 Set product.filename.version based on the

7/23/2018 11:06:19 AM

Changes

pom.xml 26(+25 -1)

Details

pom.xml 26(+25 -1)

diff --git a/pom.xml b/pom.xml
index cbebb44..7e64720 100755
--- a/pom.xml
+++ b/pom.xml
@@ -1631,8 +1631,32 @@
                 <product.name-html>\u003Cstrong\u003ERed Hat\u003C\u002Fstrong\u003E\u003Csup\u003E\u00AE\u003C\u002Fsup\u003E Single Sign On</product.name-html>
                 <product.version>${product.rhsso.version}</product.version>
                 <product.default-profile>product</product.default-profile>
-                <product.filename.version>7.3</product.filename.version>
             </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>build-helper-maven-plugin</artifactId>
+                        <version>1.7</version>
+                        <executions>
+                            <execution>
+                                <id>set-product-filename-version</id>
+                                <goals>
+                                    <goal>regex-property</goal>
+                                </goals>
+                                <phase>initialize</phase>
+                                <configuration>
+                                    <name>product.filename.version</name>
+                                    <value>${product.rhsso.version}</value>
+                                    <regex>^(\d+\.\d+).*$</regex>
+                                    <replacement>$1</replacement>
+                                    <failIfNoMatch>true</failIfNoMatch>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
         </profile>
 
         <profile>