SLING-8577 - Jenkins builds fail if the project inherits the version from the parent
diff --git a/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy
index f446ab7..f02f86d 100644
--- a/vars/slingOsgiBundleBuild.groovy
+++ b/vars/slingOsgiBundleBuild.groovy
@@ -94,7 +94,8 @@
// also do not deploy non-SNAPSHOT versions
if ( goal == "deploy" ) {
def notMaster = env.BRANCH_NAME != "master"
- def mavenVersion = readMavenPom().version
+ def mavenPom = readMavenPom()
+ def mavenVersion = mavenPom.version ?: mavenPom.parent.version
def isSnapshot = mavenVersion.endsWith('-SNAPSHOT')
if ( notMaster || !isSnapshot ) {
goal = "verify"