rewrite in xtend, auto target select, show deployment errors