Backported 81ecaf7 from master (Fixed uber jar support)