newProject.init ( ) ;
// Deal with GANT-80 by getting all the the loggers from the Ant instance Project object and adding
// them to the new Project Object. This was followed up by GANT-91 so the code was amended to copying
// over all listeners except the class loader if present.
for ( final Object o : antProject.getBuildListeners ( ) ) {
final BuildListener listener = (BuildListener) o ;
if ( ! ( listener instanceof AntClassLoader ) ) { newProject.addBuildListener ( listener ) ; }
}
// Deal with GANT-50 by getting the base directory from the Ant instance Project object and use it for
// the new Project object. GANT-93 leads to change in the way the Gant file is extracted.
newProject.setBaseDir ( antProject.getBaseDir ( ) ) ;