diff --git a/tycho-spi/pom.xml b/tycho-spi/pom.xml
index b75cb14ff0..01d87e60fa 100644
--- a/tycho-spi/pom.xml
+++ b/tycho-spi/pom.xml
@@ -57,6 +57,23 @@
org.apache.maven.plugins
maven-plugin-plugin
+
+ org.codehaus.mojo
+ buildnumber-maven-plugin
+ 3.1.0
+
+
+ validate
+
+ create
+
+
+
+
+ false
+ false
+
+
diff --git a/tycho-spi/src/main/java/org/eclipse/tycho/version/TychoVersion.java b/tycho-spi/src/main/java/org/eclipse/tycho/version/TychoVersion.java
index 71eb106006..482b420c53 100644
--- a/tycho-spi/src/main/java/org/eclipse/tycho/version/TychoVersion.java
+++ b/tycho-spi/src/main/java/org/eclipse/tycho/version/TychoVersion.java
@@ -22,6 +22,8 @@ public class TychoVersion {
private static final String TYCHO_SCM = readVersion("scm");
+ private static final String TYCHO_BUILDNUMBER = readVersion("buildNumber");
+
private static final String BND_VERSION = readVersion("bnd");
private static Properties PROPERTIES;
@@ -36,7 +38,11 @@ public static String getBndVersion() {
public static String getSCMInfo() {
if ("${env.GIT_COMMIT}".equals(TYCHO_SCM)) {
- return "local build";
+ if ("${buildNumber}".equals(TYCHO_BUILDNUMBER)) {
+ //no way then...
+ return "local build";
+ }
+ return TYCHO_BUILDNUMBER;
}
return TYCHO_SCM;
}
diff --git a/tycho-spi/src/main/resources/org/eclipse/tycho/version/version.properties b/tycho-spi/src/main/resources/org/eclipse/tycho/version/version.properties
index 0d5dc6ade2..fcb02b3da4 100644
--- a/tycho-spi/src/main/resources/org/eclipse/tycho/version/version.properties
+++ b/tycho-spi/src/main/resources/org/eclipse/tycho/version/version.properties
@@ -2,4 +2,6 @@ version=${project.version}
bnd=${bnd.version}
scm=${env.GIT_COMMIT}
url=${env.GIT_URL}
-branch=${env.GIT_BRANCH}
\ No newline at end of file
+branch=${env.GIT_BRANCH}
+scmBranch=${scmBranch}
+buildNumber=${buildNumber}