Wrap parsing of Maven versions in a try-catch both when they contain a dash and when they don't.