public void startAnt()

in src/main/java/org/apache/easyant/core/EasyAntMain.java [102:150]


    public void startAnt(String[] args, Properties additionalUserProperties, ClassLoader coreLoader) {
        easyAntConfiguration.setCoreLoader(coreLoader);
        configureOptions();
        CommandLineParser parser = new GnuParser();
        CommandLine line;
        try {
            line = parser.parse(options, args);
            processArgs(line);
        } catch (ParseException exc) {
            if (easyAntConfiguration.getMsgOutputLevel() >= Project.MSG_VERBOSE) {
                exc.printStackTrace();
            }
            handleLogfile();
            printMessage(exc);
            exit(1);
            return;
        }

        if (additionalUserProperties != null) {
            Enumeration<?> properties = additionalUserProperties.propertyNames();
            while (properties.hasMoreElements()) {
                String key = (String) properties.nextElement();
                String property = additionalUserProperties.getProperty(key);
                easyAntConfiguration.getDefinedProps().put(key, property);
            }
        }

        // expect the worst
        int exitCode = 1;
        try {
            try {
                runBuild(line);
                exitCode = 0;
            } catch (ExitStatusException ese) {
                exitCode = ese.getStatus();
                if (exitCode != 0) {
                    throw ese;
                }
            }
        } catch (BuildException be) {
            // do nothing they have been already logged by our logger
        } catch (Throwable exc) {
            exc.printStackTrace();
            printMessage(exc);
        } finally {
            handleLogfile();
        }
        exit(exitCode);
    }