private Project createDestinationXMLProject(LocalRepository repository) {
String dirName = args.getValue(DESTINATION_DIR);
File dir = new File(dirName);
ProjectFactory factory = ProjectFactory.getDefaultInstance();
ProjectConfiguration configuration = factory.createProjectConfiguration();
configuration.setRepository(repository);
configuration.setDeleteProjectContents(args.contains(REPLACE));
configuration.setPolicyLocation(dir.getAbsolutePath());
return factory.createProject(configuration);
}