code: public static int compareOsgiVersions(String v1, String v2) {
  		return Version.parseVersion(v1).compareTo(Version.parseVersion(v2));
  	}
docs: Compare two OSGI versions.
  
  @param v1 first OSGI version.
  @param v2 second OSGI version.
  @return an integer that the sign indicates if v1 is lower, equal ot greater than v2.