// 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 ( ) ) ;
// Deal with GANT-110 by using the strategy proposed by Eric Van Dewoestine.
if ( inheritAll ) { addAlmostAll ( newProject , antProject ) ; }
final File gantFile = newProject.resolveFile( file ) ;
if ( ! gantFile.exists ( ) ) { throw new BuildException ( "Gantfile does not exist." , getLocation ( ) ) ; }
final GantBuilder ant = new GantBuilder ( newProject ) ;
final Map<String,String> environmentParameter = new HashMap<String,String> ( ) ;
environmentParameter.put ( "environment" , "environment" ) ;
ant.invokeMethod ( "property" , new Object[] { environmentParameter } ) ;