Properly retrieve the version from an artifact.