use of org.apache.tools.ant.helper.ProjectHelperImpl in project iaf by ibissource.
the class FileSender method runAntScript.
private void runAntScript() {
Project ant = new Project();
DefaultLogger consoleLogger = new DefaultLogger();
consoleLogger.setErrorPrintStream(System.err);
consoleLogger.setOutputPrintStream(System.out);
consoleLogger.setMessageOutputLevel(Project.MSG_INFO);
ant.addBuildListener(consoleLogger);
// iterate over appConstants and add them as properties
AppConstants appConstants = AppConstants.getInstance();
@SuppressWarnings("unchecked") Enumeration<String> enums = (Enumeration<String>) appConstants.propertyNames();
while (enums.hasMoreElements()) {
String key = enums.nextElement();
ant.setProperty(key, appConstants.getResolvedProperty(key));
}
ant.init();
ProjectHelper helper = new ProjectHelperImpl();
helper.parse(ant, new File(filename));
ant.executeTarget(ant.getDefaultTarget());
}
use of org.apache.tools.ant.helper.ProjectHelperImpl in project ant by apache.
the class Description method addText.
/**
* Adds descriptive text to the project.
*
* @param text the descriptive text
*/
public void addText(String text) {
ProjectHelper ph = getProject().getReference(ProjectHelper.PROJECTHELPER_REFERENCE);
if (!(ph instanceof ProjectHelperImpl)) {
// will be evaluated in Project.getDescription()
return;
}
String currentDescription = getProject().getDescription();
if (currentDescription == null) {
getProject().setDescription(text);
} else {
getProject().setDescription(currentDescription + text);
}
}
Aggregations