not working from mvn but working in NetBeans