View | Details | Raw Unified | Return to bug 22428
Collapse All | Expand All

(-)src/main/org/apache/tools/ant/Main.java (-1 / +15 lines)
Lines 116-121 Link Here
116
    /** keep going mode */
116
    /** keep going mode */
117
    private boolean keepGoingMode = false;
117
    private boolean keepGoingMode = false;
118
118
119
    /** loop mode */
120
    private boolean loopMode = false;
121
  
119
    /**
122
    /**
120
     * The Ant logger class. There may be only one logger. It will have
123
     * The Ant logger class. There may be only one logger. It will have
121
     * the right to use the 'out' PrintStream. The class must implements the
124
     * the right to use the 'out' PrintStream. The class must implements the
Lines 198-204 Link Here
198
201
199
        try {
202
        try {
200
            Diagnostics.validateVersion();
203
            Diagnostics.validateVersion();
201
            processArgs(args);
204
            boolean continueLoop = false;
205
            do {
206
              processArgs(args);
207
              if ( loopMode ) {
208
                System.out.println( "\nPress Enter to continue or q + Enter to quit" );
209
                char key = (char) System.in.read();
210
                continueLoop = key != 'q' && key != 'Q';
211
              }
212
            } while ( continueLoop );
202
        } catch (Throwable exc) {
213
        } catch (Throwable exc) {
203
            handleLogfile();
214
            handleLogfile();
204
            printMessage(exc);
215
            printMessage(exc);
Lines 430-435 Link Here
430
                }
441
                }
431
            } else if (arg.equals("-k") || arg.equals("-keep-going")) {
442
            } else if (arg.equals("-k") || arg.equals("-keep-going")) {
432
                keepGoingMode = true;
443
                keepGoingMode = true;
444
            } else if (arg.equals("-loop")) {
445
                loopMode = true;
433
            } else if (arg.startsWith("-")) {
446
            } else if (arg.startsWith("-")) {
434
                // we don't have any more args to recognize!
447
                // we don't have any more args to recognize!
435
                String msg = "Unknown argument: " + arg;
448
                String msg = "Unknown argument: " + arg;
Lines 821-826 Link Here
821
        msg.append("  -inputhandler <class>  the class which will handle input requests" + lSep);
834
        msg.append("  -inputhandler <class>  the class which will handle input requests" + lSep);
822
        msg.append("  -find <file>           search for buildfile towards the root of the" + lSep);
835
        msg.append("  -find <file>           search for buildfile towards the root of the" + lSep);
823
        msg.append("                         filesystem and use it" + lSep);
836
        msg.append("                         filesystem and use it" + lSep);
837
        msg.append("  -loop                  loop mode" + lSep);
824
        System.out.println(msg.toString());
838
        System.out.println(msg.toString());
825
    }
839
    }
826
840

Return to bug 22428