Package org.codehaus.gant

Examples of org.codehaus.gant.GantBuilder


    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 } ) ;
    final GantBinding binding = new GantBinding ( ) ;
    binding.forcedSettingOfVariable ( "ant" , ant ) ;
    for ( final Definition definition : definitions ) {
      final Map<String,String> definitionParameter = new HashMap<String,String> ( ) ;
      definitionParameter.put ( "name" , definition.getName ( ) ) ;
      definitionParameter.put ( "value" , definition.getValue ( ) ) ;
      ant.invokeMethod ( "property" , new Object[] { definitionParameter } ) ;
    }
    final gant.Gant gant = new gant.Gant ( binding ) ;
    gant.loadScript ( gantFile ) ;
    final List<String> targetsAsStrings = new ArrayList<String> ( ) ;
    for ( final GantTarget g : targets ) { targetsAsStrings.add ( g.getValue ( ) ) ; }
View Full Code Here

TOP

Related Classes of org.codehaus.gant.GantBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.