* @throws ConfigurationException if an error occurs
*/
protected void doTest(String target) throws ExecutionException, ParameterException, ConfigurationException, SAXException, IOException {
System.out.println("Testing target [" + target + "]:");
Publication publication = PublicationHelper.getPublication();
TaskManager manager = new TaskManager(publication.getDirectory().getCanonicalPath());
AntTask task = (AntTask) manager.getTask(TaskManager.ANT_TASK);
Parameters parameters = getTaskParameters();
parameters.setParameter(Task.PARAMETER_PUBLICATION_ID, publication.getId());
parameters.setParameter(Task.PARAMETER_CONTEXT_PREFIX, "/lenya");
parameters.setParameter(Task.PARAMETER_SERVLET_CONTEXT,
publication.getServletContext().getCanonicalPath());
parameters.setParameter(AntTask.TARGET, getTarget());
task.parameterize(parameters);
final GregorianCalendar beforeExecution = new GregorianCalendar();
task.execute(publication.getServletContext().getCanonicalPath());
File logDirectory = new File(publication.getDirectory(), AntTask.LOG_PATH);
File[] logFiles = logDirectory.listFiles(new FileFilter() {
public boolean accept(File file) {
return file.lastModified() > beforeExecution.getTimeInMillis();
}
});