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

Signed-off-by: Rafał Krzewski <rafal.krzewski@caltha.pl>