get default maven version from distribution file name

Also this patch fixes an error when in the dist folder
are multiple files

Change-Id: I56438e09c0817f010bf86f9aa49e3d0c7f8039ec