Maven as expected not working