maven command for finding current version might need to download packages and without batch mode it will end in variable. Added '-B' to enable batch mode.