A 'would-be killer' who helped plan a sub-machine gun attack which nearly killed a man has been jailed for life.