Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

another script to print the version string from POM

git-svn-id: 71c3de6d-444a-0410-be80-ed276b4c234a
  • Loading branch information...
commit 70cebd33afb43e15f143ccd7b4df55fbdea6dfeb 1 parent d0b1e4b
kohsuke authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 show-pom-version.rb
8 show-pom-version.rb
@@ -0,0 +1,8 @@
+# parse POM from stdin and prints the version number
+require "rexml/document"
+require "rexml/xpath"
+pom = $stdin
+# if the POM doesn't define the version by itself, it's inherited from the parent
+puts (pom.elements["/project/version"] || pom.elements["/project/parent/version"]).text
Please sign in to comment.
Something went wrong with that request. Please try again.