git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277949 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2001-2004 The Apache Software Foundation | |||||
| * Copyright 2001-2005 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -40,6 +40,7 @@ public class CCMCheck extends Continuus { | |||||
| protected Vector filesets = new Vector(); | protected Vector filesets = new Vector(); | ||||
| /** Constructor for CCMCheck. */ | |||||
| public CCMCheck() { | public CCMCheck() { | ||||
| super(); | super(); | ||||
| } | } | ||||
| @@ -98,6 +99,7 @@ public class CCMCheck extends Continuus { | |||||
| /** | /** | ||||
| * Adds a set of files to copy. | * Adds a set of files to copy. | ||||
| * @param set the set of files | |||||
| */ | */ | ||||
| public void addFileset(FileSet set) { | public void addFileset(FileSet set) { | ||||
| filesets.addElement(set); | filesets.addElement(set); | ||||
| @@ -110,6 +112,7 @@ public class CCMCheck extends Continuus { | |||||
| * Builds a command line to execute ccm and then calls Exec's run method | * Builds a command line to execute ccm and then calls Exec's run method | ||||
| * to execute the command line. | * to execute the command line. | ||||
| * </p> | * </p> | ||||
| * @throws BuildException on error | |||||
| */ | */ | ||||
| public void execute() throws BuildException { | public void execute() throws BuildException { | ||||
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2001-2002,2004 The Apache Software Foundation | |||||
| * Copyright 2001-2002,2004-2005 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -24,12 +24,14 @@ package org.apache.tools.ant.taskdefs.optional.ccm; | |||||
| */ | */ | ||||
| public class CCMCheckinDefault extends CCMCheck { | public class CCMCheckinDefault extends CCMCheck { | ||||
| /** Constructor for CCMCheckinDefault. */ | |||||
| public CCMCheckinDefault() { | public CCMCheckinDefault() { | ||||
| super(); | super(); | ||||
| setCcmAction(COMMAND_CHECKIN); | setCcmAction(COMMAND_CHECKIN); | ||||
| setTask(DEFAULT_TASK); | setTask(DEFAULT_TASK); | ||||
| } | } | ||||
| /** The default task */ | |||||
| public static final String DEFAULT_TASK = "default"; | public static final String DEFAULT_TASK = "default"; | ||||
| } | } | ||||
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2001-2004 The Apache Software Foundation | |||||
| * Copyright 2001-2005 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -44,6 +44,9 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler { | |||||
| private String subSystem = null; | private String subSystem = null; | ||||
| private String task = null; | private String task = null; | ||||
| /** | |||||
| * Constructor for CCMCreateTask. | |||||
| */ | |||||
| public CCMCreateTask() { | public CCMCreateTask() { | ||||
| super(); | super(); | ||||
| setCcmAction(COMMAND_CREATE_TASK); | setCcmAction(COMMAND_CREATE_TASK); | ||||
| @@ -56,6 +59,7 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler { | |||||
| * Builds a command line to execute ccm and then calls Exec's run method | * Builds a command line to execute ccm and then calls Exec's run method | ||||
| * to execute the command line. | * to execute the command line. | ||||
| * </p> | * </p> | ||||
| * @throws BuildException on error | |||||
| */ | */ | ||||
| public void execute() throws BuildException { | public void execute() throws BuildException { | ||||
| Commandline commandLine = new Commandline(); | Commandline commandLine = new Commandline(); | ||||
| @@ -264,7 +268,7 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler { | |||||
| /** | /** | ||||
| * | * | ||||
| * @exception java.io.IOException | |||||
| * @throws IOException on error | |||||
| */ | */ | ||||
| public void start() throws IOException { | public void start() throws IOException { | ||||
| } | } | ||||
| @@ -277,16 +281,16 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler { | |||||
| /** | /** | ||||
| * | * | ||||
| * @param param1 | |||||
| * @exception java.io.IOException | |||||
| * @param param1 the output stream | |||||
| * @exception java.io.IOException on error | |||||
| */ | */ | ||||
| public void setProcessInputStream(OutputStream param1) throws IOException { | public void setProcessInputStream(OutputStream param1) throws IOException { | ||||
| } | } | ||||
| /** | /** | ||||
| * | * | ||||
| * @param is | |||||
| * @exception java.io.IOException | |||||
| * @param is the input stream | |||||
| * @exception java.io.IOException on error | |||||
| */ | */ | ||||
| public void setProcessErrorStream(InputStream is) throws IOException { | public void setProcessErrorStream(InputStream is) throws IOException { | ||||
| BufferedReader reader = new BufferedReader(new InputStreamReader(is)); | BufferedReader reader = new BufferedReader(new InputStreamReader(is)); | ||||
| @@ -299,7 +303,7 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler { | |||||
| /** | /** | ||||
| * read the output stream to retrieve the new task number. | * read the output stream to retrieve the new task number. | ||||
| * @param is InputStream | * @param is InputStream | ||||
| * @exception java.io.IOException | |||||
| * @throws IOException on error | |||||
| */ | */ | ||||
| public void setProcessOutputStream(InputStream is) throws IOException { | public void setProcessOutputStream(InputStream is) throws IOException { | ||||
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2001-2004 The Apache Software Foundation | |||||
| * Copyright 2001-2005 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -32,6 +32,7 @@ public class CCMReconfigure extends Continuus { | |||||
| private boolean recurse = false; | private boolean recurse = false; | ||||
| private boolean verbose = false; | private boolean verbose = false; | ||||
| /** Constructor for CCMReconfigure. */ | |||||
| public CCMReconfigure() { | public CCMReconfigure() { | ||||
| super(); | super(); | ||||
| setCcmAction(COMMAND_RECONFIGURE); | setCcmAction(COMMAND_RECONFIGURE); | ||||
| @@ -44,6 +45,7 @@ public class CCMReconfigure extends Continuus { | |||||
| * Builds a command line to execute ccm and then calls Exec's run method | * Builds a command line to execute ccm and then calls Exec's run method | ||||
| * to execute the command line. | * to execute the command line. | ||||
| * </p> | * </p> | ||||
| * @throws BuildException on error | |||||
| */ | */ | ||||
| public void execute() throws BuildException { | public void execute() throws BuildException { | ||||
| Commandline commandLine = new Commandline(); | Commandline commandLine = new Commandline(); | ||||
| @@ -69,11 +71,11 @@ public class CCMReconfigure extends Continuus { | |||||
| */ | */ | ||||
| private void checkOptions(Commandline cmd) { | private void checkOptions(Commandline cmd) { | ||||
| if (isRecurse() == true) { | |||||
| if (isRecurse()) { | |||||
| cmd.createArgument().setValue(FLAG_RECURSE); | cmd.createArgument().setValue(FLAG_RECURSE); | ||||
| } // end of if () | } // end of if () | ||||
| if (isVerbose() == true) { | |||||
| if (isVerbose()) { | |||||
| cmd.createArgument().setValue(FLAG_VERBOSE); | cmd.createArgument().setValue(FLAG_VERBOSE); | ||||
| } // end of if () | } // end of if () | ||||
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2001-2004 The Apache Software Foundation | |||||
| * Copyright 2001-2005 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -84,6 +84,12 @@ public abstract class Continuus extends Task { | |||||
| } | } | ||||
| /** | |||||
| * Run the command. | |||||
| * @param cmd the command line | |||||
| * @param handler an execute stream handler | |||||
| * @return the exit status of the command | |||||
| */ | |||||
| protected int run(Commandline cmd, ExecuteStreamHandler handler) { | protected int run(Commandline cmd, ExecuteStreamHandler handler) { | ||||
| try { | try { | ||||
| Execute exe = new Execute(handler); | Execute exe = new Execute(handler); | ||||
| @@ -96,6 +102,11 @@ public abstract class Continuus extends Task { | |||||
| } | } | ||||
| } | } | ||||
| /** | |||||
| * Run the command. | |||||
| * @param cmd the command line | |||||
| * @return the exit status of the command | |||||
| */ | |||||
| protected int run(Commandline cmd) { | protected int run(Commandline cmd) { | ||||
| return run(cmd, new LogStreamHandler(this, Project.MSG_VERBOSE, Project.MSG_WARN)); | return run(cmd, new LogStreamHandler(this, Project.MSG_VERBOSE, Project.MSG_WARN)); | ||||
| } | } | ||||