Refactor build methods to maven.