junit.setTaskName("test");
junit.setProject(mxtest.getProject());
junit.init();
if (!StringUtils.isEmpty(jvmarg)) {
junit.createJvmarg().setValue(jvmarg);
}
junit.setFailureProperty(mxtest.getFailureProperty());
junit.createClasspath().add(mxtest.getUnitTestClasspath());