refactor(tasks): add tests for java and ant build, refactor tasks