Skip to content
Snippets Groups Projects
Commit 15722993 authored by Jan Zickermann's avatar Jan Zickermann
Browse files

OZG-4717 Set build number and url in POM

parent 4c4d139b
Branches
Tags
No related merge requests found
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
<java.version>21</java.version> <java.version>21</java.version>
<!--<maven.compiler.source>21</maven.compiler.source> <!--<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>--> <maven.compiler.target>21</maven.compiler.target>-->
<build.number>x</build.number>
<build.url>no-url</build.url>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
...@@ -64,6 +66,20 @@ ...@@ -64,6 +66,20 @@
</exclude> </exclude>
</excludes> </excludes>
</configuration> </configuration>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>build-info</goal>
</goals>
<configuration>
<additionalProperties>
<number>${build.number}</number>
<url>${build.url}</url>
</additionalProperties>
</configuration>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
......
...@@ -26,10 +26,10 @@ public class BasicAppInfoService { ...@@ -26,10 +26,10 @@ public class BasicAppInfoService {
} }
public String getBuildNumber() { public String getBuildNumber() {
return buildProperties.map(p -> p.get("BUILD_NUMBER")).orElse("?"); return buildProperties.map(p -> p.get("number")).orElse("?");
} }
public String getBuildUrl() { public String getBuildUrl() {
return buildProperties.map(p -> p.get("BUILD_URL")).orElse("?"); return buildProperties.map(p -> p.get("url")).orElse("?");
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment