Improvements/dev 111 improve java maven cookbook

details: https://issues.teracy.org/browse/DEV-111
@datphan I'm going to add Array check http://stackoverflow.com/questions/1527888/ruby-test-for-array