try {
ExpressionEvaluator exprEvaluator = (ExpressionEvaluator) antTasks.getProject().getReference(
"maven.expressionEvaluator");
Project antProject = antTasks.getProject();
PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(antProject);
propertyHelper.setNext(new AntPropertyHelper(exprEvaluator, getLog()));
DefaultLogger antLogger = new DefaultLogger();
antLogger.setOutputPrintStream(System.out);
antLogger.setErrorPrintStream(System.err);
antLogger.setMessageOutputLevel(2);
antProject.addBuildListener(antLogger);