git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270175 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -165,7 +165,7 @@ public class DefaultLogger implements BuildLogger | |||||
| // Print out the name of the task if we're in one | // Print out the name of the task if we're in one | ||||
| if( event.getTask() != null ) | if( event.getTask() != null ) | ||||
| { | { | ||||
| String name = event.getTask().getTaskName(); | |||||
| String name = event.getTask().getName(); | |||||
| if( !emacsMode ) | if( !emacsMode ) | ||||
| { | { | ||||
| @@ -842,9 +842,6 @@ public class Project | |||||
| task.setProject( this ); | task.setProject( this ); | ||||
| task.setTaskType( taskType ); | task.setTaskType( taskType ); | ||||
| // set default value, can be changed by the user | |||||
| task.setTaskName( taskType ); | |||||
| String msg = " +Task: " + taskType; | String msg = " +Task: " + taskType; | ||||
| log( msg, MSG_DEBUG ); | log( msg, MSG_DEBUG ); | ||||
| addCreatedTask( taskType, task ); | addCreatedTask( taskType, task ); | ||||
| @@ -1015,7 +1015,6 @@ public class ProjectHelper | |||||
| task = new UnknownElement( tag ); | task = new UnknownElement( tag ); | ||||
| task.setProject( project ); | task.setProject( project ); | ||||
| task.setTaskType( tag ); | task.setTaskType( tag ); | ||||
| task.setTaskName( tag ); | |||||
| } | } | ||||
| configureId( task, attrs ); | configureId( task, attrs ); | ||||
| @@ -64,17 +64,6 @@ public class UnknownElement extends Task | |||||
| return null; | return null; | ||||
| } | } | ||||
| /** | |||||
| * Get the name to use in logging messages. | |||||
| * | |||||
| * @return the name to use in logging messages. | |||||
| */ | |||||
| public String getTaskName() | |||||
| { | |||||
| return realThing == null || !( realThing instanceof Task ) ? | |||||
| super.getTaskName() : ( (Task)realThing ).getTaskName(); | |||||
| } | |||||
| /** | /** | ||||
| * Adds a child element to this element. | * Adds a child element to this element. | ||||
| * | * | ||||
| @@ -296,6 +296,7 @@ public class ExecuteOn extends ExecTask | |||||
| * @return The Commandline value | * @return The Commandline value | ||||
| */ | */ | ||||
| protected String[] getCommandline( String srcFile, File baseDir ) | protected String[] getCommandline( String srcFile, File baseDir ) | ||||
| throws TaskException | |||||
| { | { | ||||
| return getCommandline( new String[]{srcFile}, new File[]{baseDir} ); | return getCommandline( new String[]{srcFile}, new File[]{baseDir} ); | ||||
| } | } | ||||
| @@ -46,7 +46,7 @@ public interface ExecuteStreamHandler | |||||
| * @exception IOException Description of Exception | * @exception IOException Description of Exception | ||||
| */ | */ | ||||
| void setProcessOutputStream( InputStream is ) | void setProcessOutputStream( InputStream is ) | ||||
| throws IOException; | |||||
| throws TaskException, IOException; | |||||
| /** | /** | ||||
| * Start handling of the streams. | * Start handling of the streams. | ||||
| @@ -921,17 +921,18 @@ public class FixCRLF extends MatchingTask | |||||
| { | { | ||||
| throw new NoSuchElementException( "OneLiner" ); | throw new NoSuchElementException( "OneLiner" ); | ||||
| } | } | ||||
| BufferLine tmpLine = | |||||
| new BufferLine( line.toString(), eolStr.toString() ); | |||||
| try | try | ||||
| { | { | ||||
| BufferLine tmpLine = | |||||
| new BufferLine( line.toString(), eolStr.toString() ); | |||||
| nextLine(); | nextLine(); | ||||
| return tmpLine; | |||||
| } | } | ||||
| catch( TaskException e ) | catch( TaskException e ) | ||||
| { | { | ||||
| throw new NoSuchElementException(); | throw new NoSuchElementException(); | ||||
| } | } | ||||
| return tmpLine; | |||||
| } | } | ||||
| protected void nextLine() | protected void nextLine() | ||||
| @@ -251,7 +251,6 @@ public class GenerateKey extends Task | |||||
| final ExecTask cmd = (ExecTask)project.createTask( "exec" ); | final ExecTask cmd = (ExecTask)project.createTask( "exec" ); | ||||
| cmd.setCommand( new Commandline( sb.toString() ) ); | cmd.setCommand( new Commandline( sb.toString() ) ); | ||||
| cmd.setFailonerror( true ); | cmd.setFailonerror( true ); | ||||
| cmd.setTaskName( getTaskName() ); | |||||
| cmd.execute(); | cmd.execute(); | ||||
| } | } | ||||
| @@ -304,7 +304,6 @@ public class Get extends Task | |||||
| { | { | ||||
| Touch touch = (Touch)project.createTask( "touch" ); | Touch touch = (Touch)project.createTask( "touch" ); | ||||
| touch.setOwningTarget( target ); | touch.setOwningTarget( target ); | ||||
| touch.setTaskName( getTaskName() ); | |||||
| touch.setFile( file ); | touch.setFile( file ); | ||||
| touch.setMillis( timemillis ); | touch.setMillis( timemillis ); | ||||
| touch.touch(); | touch.touch(); | ||||
| @@ -204,6 +204,7 @@ public class Javadoc extends Task | |||||
| } | } | ||||
| public void setDocletPath( Path src ) | public void setDocletPath( Path src ) | ||||
| throws TaskException | |||||
| { | { | ||||
| if( doclet == null ) | if( doclet == null ) | ||||
| { | { | ||||
| @@ -151,7 +151,7 @@ public class RecorderEntry implements BuildLogger | |||||
| StringBuffer buf = new StringBuffer(); | StringBuffer buf = new StringBuffer(); | ||||
| if( event.getTask() != null ) | if( event.getTask() != null ) | ||||
| { | { | ||||
| String name = "[" + event.getTask().getTaskName() + "]"; | |||||
| String name = "[" + event.getTask().getName() + "]"; | |||||
| /** | /** | ||||
| * @todo replace 12 with DefaultLogger.LEFT_COLUMN_SIZE | * @todo replace 12 with DefaultLogger.LEFT_COLUMN_SIZE | ||||
| */ | */ | ||||
| @@ -110,6 +110,7 @@ public class Rmic extends MatchingTask | |||||
| * @param classpath The new Classpath value | * @param classpath The new Classpath value | ||||
| */ | */ | ||||
| public void setClasspath( Path classpath ) | public void setClasspath( Path classpath ) | ||||
| throws TaskException | |||||
| { | { | ||||
| if( compileClasspath == null ) | if( compileClasspath == null ) | ||||
| { | { | ||||
| @@ -127,6 +128,7 @@ public class Rmic extends MatchingTask | |||||
| * @param r The new ClasspathRef value | * @param r The new ClasspathRef value | ||||
| */ | */ | ||||
| public void setClasspathRef( Reference r ) | public void setClasspathRef( Reference r ) | ||||
| throws TaskException | |||||
| { | { | ||||
| createClasspath().setRefid( r ); | createClasspath().setRefid( r ); | ||||
| } | } | ||||
| @@ -147,6 +149,7 @@ public class Rmic extends MatchingTask | |||||
| * @param extdirs The new Extdirs value | * @param extdirs The new Extdirs value | ||||
| */ | */ | ||||
| public void setExtdirs( Path extdirs ) | public void setExtdirs( Path extdirs ) | ||||
| throws TaskException | |||||
| { | { | ||||
| if( this.extdirs == null ) | if( this.extdirs == null ) | ||||
| { | { | ||||
| @@ -493,6 +496,7 @@ public class Rmic extends MatchingTask | |||||
| * @return Description of the Returned Value | * @return Description of the Returned Value | ||||
| */ | */ | ||||
| public Path createClasspath() | public Path createClasspath() | ||||
| throws TaskException | |||||
| { | { | ||||
| if( compileClasspath == null ) | if( compileClasspath == null ) | ||||
| { | { | ||||
| @@ -507,6 +511,7 @@ public class Rmic extends MatchingTask | |||||
| * @return Description of the Returned Value | * @return Description of the Returned Value | ||||
| */ | */ | ||||
| public Path createExtdirs() | public Path createExtdirs() | ||||
| throws TaskException | |||||
| { | { | ||||
| if( extdirs == null ) | if( extdirs == null ) | ||||
| { | { | ||||
| @@ -328,7 +328,6 @@ public class SignJar extends Task | |||||
| log( "Signing Jar : " + jarSource.getAbsolutePath() ); | log( "Signing Jar : " + jarSource.getAbsolutePath() ); | ||||
| cmd.setFailonerror( true ); | cmd.setFailonerror( true ); | ||||
| cmd.setTaskName( getTaskName() ); | |||||
| cmd.execute(); | cmd.execute(); | ||||
| } | } | ||||
| @@ -33,9 +33,22 @@ import org.apache.tools.tar.TarOutputStream; | |||||
| * @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a> | * @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a> | ||||
| */ | */ | ||||
| public class Tar extends MatchingTask | |||||
| public class Tar | |||||
| extends MatchingTask | |||||
| { | { | ||||
| private TarLongFileMode longFileMode = new TarLongFileMode(); | |||||
| private TarLongFileMode longFileMode = createMode(); | |||||
| private TarLongFileMode createMode() | |||||
| { | |||||
| try | |||||
| { | |||||
| return new TarLongFileMode(); | |||||
| } | |||||
| catch( TaskException e ) | |||||
| { | |||||
| throw new IllegalStateException( e.getMessage() ); | |||||
| } | |||||
| } | |||||
| Vector filesets = new Vector(); | Vector filesets = new Vector(); | ||||
| Vector fileSetFiles = new Vector(); | Vector fileSetFiles = new Vector(); | ||||
| @@ -318,7 +318,6 @@ public class Cab extends MatchingTask | |||||
| { | { | ||||
| ExecTask exec = (ExecTask)project.createTask( "exec" ); | ExecTask exec = (ExecTask)project.createTask( "exec" ); | ||||
| exec.setOwningTarget( this.getOwningTarget() ); | exec.setOwningTarget( this.getOwningTarget() ); | ||||
| exec.setTaskName( this.getTaskName() ); | |||||
| exec.setDescription( this.getDescription() ); | exec.setDescription( this.getDescription() ); | ||||
| return exec; | return exec; | ||||
| @@ -765,7 +765,6 @@ public class IContract extends MatchingTask | |||||
| // Create a forked java process | // Create a forked java process | ||||
| Java iContract = (Java)project.createTask( "java" ); | Java iContract = (Java)project.createTask( "java" ); | ||||
| iContract.setTaskName( getTaskName() ); | |||||
| iContract.setFork( true ); | iContract.setFork( true ); | ||||
| iContract.setClassname( "com.reliablesystems.iContract.Tool" ); | iContract.setClassname( "com.reliablesystems.iContract.Tool" ); | ||||
| iContract.setClasspath( iContractClasspath ); | iContract.setClasspath( iContractClasspath ); | ||||
| @@ -124,8 +124,8 @@ public abstract class Continuus extends Task | |||||
| } | } | ||||
| protected int run( Commandline cmd ) | protected int run( Commandline cmd ) | ||||
| throws TaskException | |||||
| { | { | ||||
| return run( cmd, new LogStreamHandler( this, Project.MSG_VERBOSE, Project.MSG_WARN ) ); | return run( cmd, new LogStreamHandler( this, Project.MSG_VERBOSE, Project.MSG_WARN ) ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -434,7 +434,6 @@ public class BorlandDeploymentTool extends GenericDeploymentTool implements Exec | |||||
| { | { | ||||
| gentask.setClasspath( classpath ); | gentask.setClasspath( classpath ); | ||||
| } | } | ||||
| gentask.setTaskName( "generate client" ); | |||||
| gentask.execute(); | gentask.execute(); | ||||
| } | } | ||||
| catch( Exception e ) | catch( Exception e ) | ||||
| @@ -491,7 +490,6 @@ public class BorlandDeploymentTool extends GenericDeploymentTool implements Exec | |||||
| args += " " + sourceJar.getPath(); | args += " " + sourceJar.getPath(); | ||||
| javaTask = (Java)getTask().getProject().createTask( "java" ); | javaTask = (Java)getTask().getProject().createTask( "java" ); | ||||
| javaTask.setTaskName( "verify" ); | |||||
| javaTask.setClassname( VERIFY ); | javaTask.setClassname( VERIFY ); | ||||
| Commandline.Argument arguments = javaTask.createArg(); | Commandline.Argument arguments = javaTask.createArg(); | ||||
| arguments.setLine( args ); | arguments.setLine( args ); | ||||
| @@ -120,7 +120,6 @@ public class DDCreator extends MatchingTask | |||||
| String systemClassPath = System.getProperty( "java.class.path" ); | String systemClassPath = System.getProperty( "java.class.path" ); | ||||
| String execClassPath = project.translatePath( systemClassPath + ":" + classpath ); | String execClassPath = project.translatePath( systemClassPath + ":" + classpath ); | ||||
| Java ddCreatorTask = (Java)project.createTask( "java" ); | Java ddCreatorTask = (Java)project.createTask( "java" ); | ||||
| ddCreatorTask.setTaskName( getTaskName() ); | |||||
| ddCreatorTask.setFork( true ); | ddCreatorTask.setFork( true ); | ||||
| ddCreatorTask.setClassname( "org.apache.tools.ant.taskdefs.optional.ejb.DDCreatorHelper" ); | ddCreatorTask.setClassname( "org.apache.tools.ant.taskdefs.optional.ejb.DDCreatorHelper" ); | ||||
| Commandline.Argument arguments = ddCreatorTask.createArg(); | Commandline.Argument arguments = ddCreatorTask.createArg(); | ||||
| @@ -167,7 +167,6 @@ public class Ejbc extends MatchingTask | |||||
| String[] files = ds.getIncludedFiles(); | String[] files = ds.getIncludedFiles(); | ||||
| Java helperTask = (Java)project.createTask( "java" ); | Java helperTask = (Java)project.createTask( "java" ); | ||||
| helperTask.setTaskName( getTaskName() ); | |||||
| helperTask.setFork( true ); | helperTask.setFork( true ); | ||||
| helperTask.setClassname( "org.apache.tools.ant.taskdefs.optional.ejb.EjbcHelper" ); | helperTask.setClassname( "org.apache.tools.ant.taskdefs.optional.ejb.EjbcHelper" ); | ||||
| String args = ""; | String args = ""; | ||||
| @@ -313,7 +313,6 @@ public class WLRun extends Task | |||||
| } | } | ||||
| Java weblogicServer = (Java)project.createTask( "java" ); | Java weblogicServer = (Java)project.createTask( "java" ); | ||||
| weblogicServer.setTaskName( getTaskName() ); | |||||
| weblogicServer.setFork( true ); | weblogicServer.setFork( true ); | ||||
| weblogicServer.setClassname( weblogicMainClass ); | weblogicServer.setClassname( weblogicMainClass ); | ||||
| @@ -364,7 +363,6 @@ public class WLRun extends Task | |||||
| } | } | ||||
| Java weblogicServer = (Java)project.createTask( "java" ); | Java weblogicServer = (Java)project.createTask( "java" ); | ||||
| weblogicServer.setTaskName( getTaskName() ); | |||||
| weblogicServer.setFork( true ); | weblogicServer.setFork( true ); | ||||
| weblogicServer.setDir( weblogicSystemHome ); | weblogicServer.setDir( weblogicSystemHome ); | ||||
| weblogicServer.setClassname( weblogicMainClass ); | weblogicServer.setClassname( weblogicMainClass ); | ||||
| @@ -773,7 +773,6 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool | |||||
| try | try | ||||
| { | { | ||||
| javaTask = (Java)getTask().getProject().createTask( "java" ); | javaTask = (Java)getTask().getProject().createTask( "java" ); | ||||
| javaTask.setTaskName( "ejbc" ); | |||||
| if( getJvmDebugLevel() != null ) | if( getJvmDebugLevel() != null ) | ||||
| { | { | ||||
| @@ -981,8 +981,6 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool | |||||
| // Set the Java class name | // Set the Java class name | ||||
| javaTask.setTaskName( "ejbdeploy" ); | |||||
| javaTask.setClassname( "com.ibm.etools.ejbdeploy.EJBDeploy" ); | javaTask.setClassname( "com.ibm.etools.ejbdeploy.EJBDeploy" ); | ||||
| Commandline.Argument arguments = javaTask.createArg(); | Commandline.Argument arguments = javaTask.createArg(); | ||||
| arguments.setLine( args ); | arguments.setLine( args ); | ||||
| @@ -1765,7 +1765,7 @@ public class VAJAntToolGUI extends Frame | |||||
| { | { | ||||
| String msg = ""; | String msg = ""; | ||||
| if( event.getTask() != null ) | if( event.getTask() != null ) | ||||
| msg = "[" + event.getTask().getTaskName() + "] "; | |||||
| msg = "[" + event.getTask().getName() + "] "; | |||||
| getMessageTextArea().append( lineSeparator + msg + event.getMessage() ); | getMessageTextArea().append( lineSeparator + msg + event.getMessage() ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -174,7 +174,6 @@ public class WLJspc extends MatchingTask | |||||
| Java helperTask = (Java)project.createTask( "java" ); | Java helperTask = (Java)project.createTask( "java" ); | ||||
| helperTask.setFork( true ); | helperTask.setFork( true ); | ||||
| helperTask.setClassname( "weblogic.jspc" ); | helperTask.setClassname( "weblogic.jspc" ); | ||||
| helperTask.setTaskName( getTaskName() ); | |||||
| String[] args = new String[ 12 ]; | String[] args = new String[ 12 ]; | ||||
| File jspFile = null; | File jspFile = null; | ||||
| @@ -51,5 +51,6 @@ public interface FileNameMapper | |||||
| * basedirectory. | * basedirectory. | ||||
| * @return Description of the Returned Value | * @return Description of the Returned Value | ||||
| */ | */ | ||||
| String[] mapFileName( String sourceFileName ); | |||||
| String[] mapFileName( String sourceFileName ) | |||||
| throws TaskException; | |||||
| } | } | ||||
| @@ -165,7 +165,7 @@ public class DefaultLogger implements BuildLogger | |||||
| // Print out the name of the task if we're in one | // Print out the name of the task if we're in one | ||||
| if( event.getTask() != null ) | if( event.getTask() != null ) | ||||
| { | { | ||||
| String name = event.getTask().getTaskName(); | |||||
| String name = event.getTask().getName(); | |||||
| if( !emacsMode ) | if( !emacsMode ) | ||||
| { | { | ||||
| @@ -842,9 +842,6 @@ public class Project | |||||
| task.setProject( this ); | task.setProject( this ); | ||||
| task.setTaskType( taskType ); | task.setTaskType( taskType ); | ||||
| // set default value, can be changed by the user | |||||
| task.setTaskName( taskType ); | |||||
| String msg = " +Task: " + taskType; | String msg = " +Task: " + taskType; | ||||
| log( msg, MSG_DEBUG ); | log( msg, MSG_DEBUG ); | ||||
| addCreatedTask( taskType, task ); | addCreatedTask( taskType, task ); | ||||
| @@ -1015,7 +1015,6 @@ public class ProjectHelper | |||||
| task = new UnknownElement( tag ); | task = new UnknownElement( tag ); | ||||
| task.setProject( project ); | task.setProject( project ); | ||||
| task.setTaskType( tag ); | task.setTaskType( tag ); | ||||
| task.setTaskName( tag ); | |||||
| } | } | ||||
| configureId( task, attrs ); | configureId( task, attrs ); | ||||
| @@ -64,17 +64,6 @@ public class UnknownElement extends Task | |||||
| return null; | return null; | ||||
| } | } | ||||
| /** | |||||
| * Get the name to use in logging messages. | |||||
| * | |||||
| * @return the name to use in logging messages. | |||||
| */ | |||||
| public String getTaskName() | |||||
| { | |||||
| return realThing == null || !( realThing instanceof Task ) ? | |||||
| super.getTaskName() : ( (Task)realThing ).getTaskName(); | |||||
| } | |||||
| /** | /** | ||||
| * Adds a child element to this element. | * Adds a child element to this element. | ||||
| * | * | ||||
| @@ -296,6 +296,7 @@ public class ExecuteOn extends ExecTask | |||||
| * @return The Commandline value | * @return The Commandline value | ||||
| */ | */ | ||||
| protected String[] getCommandline( String srcFile, File baseDir ) | protected String[] getCommandline( String srcFile, File baseDir ) | ||||
| throws TaskException | |||||
| { | { | ||||
| return getCommandline( new String[]{srcFile}, new File[]{baseDir} ); | return getCommandline( new String[]{srcFile}, new File[]{baseDir} ); | ||||
| } | } | ||||
| @@ -46,7 +46,7 @@ public interface ExecuteStreamHandler | |||||
| * @exception IOException Description of Exception | * @exception IOException Description of Exception | ||||
| */ | */ | ||||
| void setProcessOutputStream( InputStream is ) | void setProcessOutputStream( InputStream is ) | ||||
| throws IOException; | |||||
| throws TaskException, IOException; | |||||
| /** | /** | ||||
| * Start handling of the streams. | * Start handling of the streams. | ||||
| @@ -921,17 +921,18 @@ public class FixCRLF extends MatchingTask | |||||
| { | { | ||||
| throw new NoSuchElementException( "OneLiner" ); | throw new NoSuchElementException( "OneLiner" ); | ||||
| } | } | ||||
| BufferLine tmpLine = | |||||
| new BufferLine( line.toString(), eolStr.toString() ); | |||||
| try | try | ||||
| { | { | ||||
| BufferLine tmpLine = | |||||
| new BufferLine( line.toString(), eolStr.toString() ); | |||||
| nextLine(); | nextLine(); | ||||
| return tmpLine; | |||||
| } | } | ||||
| catch( TaskException e ) | catch( TaskException e ) | ||||
| { | { | ||||
| throw new NoSuchElementException(); | throw new NoSuchElementException(); | ||||
| } | } | ||||
| return tmpLine; | |||||
| } | } | ||||
| protected void nextLine() | protected void nextLine() | ||||
| @@ -251,7 +251,6 @@ public class GenerateKey extends Task | |||||
| final ExecTask cmd = (ExecTask)project.createTask( "exec" ); | final ExecTask cmd = (ExecTask)project.createTask( "exec" ); | ||||
| cmd.setCommand( new Commandline( sb.toString() ) ); | cmd.setCommand( new Commandline( sb.toString() ) ); | ||||
| cmd.setFailonerror( true ); | cmd.setFailonerror( true ); | ||||
| cmd.setTaskName( getTaskName() ); | |||||
| cmd.execute(); | cmd.execute(); | ||||
| } | } | ||||
| @@ -304,7 +304,6 @@ public class Get extends Task | |||||
| { | { | ||||
| Touch touch = (Touch)project.createTask( "touch" ); | Touch touch = (Touch)project.createTask( "touch" ); | ||||
| touch.setOwningTarget( target ); | touch.setOwningTarget( target ); | ||||
| touch.setTaskName( getTaskName() ); | |||||
| touch.setFile( file ); | touch.setFile( file ); | ||||
| touch.setMillis( timemillis ); | touch.setMillis( timemillis ); | ||||
| touch.touch(); | touch.touch(); | ||||
| @@ -204,6 +204,7 @@ public class Javadoc extends Task | |||||
| } | } | ||||
| public void setDocletPath( Path src ) | public void setDocletPath( Path src ) | ||||
| throws TaskException | |||||
| { | { | ||||
| if( doclet == null ) | if( doclet == null ) | ||||
| { | { | ||||
| @@ -151,7 +151,7 @@ public class RecorderEntry implements BuildLogger | |||||
| StringBuffer buf = new StringBuffer(); | StringBuffer buf = new StringBuffer(); | ||||
| if( event.getTask() != null ) | if( event.getTask() != null ) | ||||
| { | { | ||||
| String name = "[" + event.getTask().getTaskName() + "]"; | |||||
| String name = "[" + event.getTask().getName() + "]"; | |||||
| /** | /** | ||||
| * @todo replace 12 with DefaultLogger.LEFT_COLUMN_SIZE | * @todo replace 12 with DefaultLogger.LEFT_COLUMN_SIZE | ||||
| */ | */ | ||||
| @@ -110,6 +110,7 @@ public class Rmic extends MatchingTask | |||||
| * @param classpath The new Classpath value | * @param classpath The new Classpath value | ||||
| */ | */ | ||||
| public void setClasspath( Path classpath ) | public void setClasspath( Path classpath ) | ||||
| throws TaskException | |||||
| { | { | ||||
| if( compileClasspath == null ) | if( compileClasspath == null ) | ||||
| { | { | ||||
| @@ -127,6 +128,7 @@ public class Rmic extends MatchingTask | |||||
| * @param r The new ClasspathRef value | * @param r The new ClasspathRef value | ||||
| */ | */ | ||||
| public void setClasspathRef( Reference r ) | public void setClasspathRef( Reference r ) | ||||
| throws TaskException | |||||
| { | { | ||||
| createClasspath().setRefid( r ); | createClasspath().setRefid( r ); | ||||
| } | } | ||||
| @@ -147,6 +149,7 @@ public class Rmic extends MatchingTask | |||||
| * @param extdirs The new Extdirs value | * @param extdirs The new Extdirs value | ||||
| */ | */ | ||||
| public void setExtdirs( Path extdirs ) | public void setExtdirs( Path extdirs ) | ||||
| throws TaskException | |||||
| { | { | ||||
| if( this.extdirs == null ) | if( this.extdirs == null ) | ||||
| { | { | ||||
| @@ -493,6 +496,7 @@ public class Rmic extends MatchingTask | |||||
| * @return Description of the Returned Value | * @return Description of the Returned Value | ||||
| */ | */ | ||||
| public Path createClasspath() | public Path createClasspath() | ||||
| throws TaskException | |||||
| { | { | ||||
| if( compileClasspath == null ) | if( compileClasspath == null ) | ||||
| { | { | ||||
| @@ -507,6 +511,7 @@ public class Rmic extends MatchingTask | |||||
| * @return Description of the Returned Value | * @return Description of the Returned Value | ||||
| */ | */ | ||||
| public Path createExtdirs() | public Path createExtdirs() | ||||
| throws TaskException | |||||
| { | { | ||||
| if( extdirs == null ) | if( extdirs == null ) | ||||
| { | { | ||||
| @@ -328,7 +328,6 @@ public class SignJar extends Task | |||||
| log( "Signing Jar : " + jarSource.getAbsolutePath() ); | log( "Signing Jar : " + jarSource.getAbsolutePath() ); | ||||
| cmd.setFailonerror( true ); | cmd.setFailonerror( true ); | ||||
| cmd.setTaskName( getTaskName() ); | |||||
| cmd.execute(); | cmd.execute(); | ||||
| } | } | ||||
| @@ -33,9 +33,22 @@ import org.apache.tools.tar.TarOutputStream; | |||||
| * @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a> | * @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a> | ||||
| */ | */ | ||||
| public class Tar extends MatchingTask | |||||
| public class Tar | |||||
| extends MatchingTask | |||||
| { | { | ||||
| private TarLongFileMode longFileMode = new TarLongFileMode(); | |||||
| private TarLongFileMode longFileMode = createMode(); | |||||
| private TarLongFileMode createMode() | |||||
| { | |||||
| try | |||||
| { | |||||
| return new TarLongFileMode(); | |||||
| } | |||||
| catch( TaskException e ) | |||||
| { | |||||
| throw new IllegalStateException( e.getMessage() ); | |||||
| } | |||||
| } | |||||
| Vector filesets = new Vector(); | Vector filesets = new Vector(); | ||||
| Vector fileSetFiles = new Vector(); | Vector fileSetFiles = new Vector(); | ||||
| @@ -318,7 +318,6 @@ public class Cab extends MatchingTask | |||||
| { | { | ||||
| ExecTask exec = (ExecTask)project.createTask( "exec" ); | ExecTask exec = (ExecTask)project.createTask( "exec" ); | ||||
| exec.setOwningTarget( this.getOwningTarget() ); | exec.setOwningTarget( this.getOwningTarget() ); | ||||
| exec.setTaskName( this.getTaskName() ); | |||||
| exec.setDescription( this.getDescription() ); | exec.setDescription( this.getDescription() ); | ||||
| return exec; | return exec; | ||||
| @@ -765,7 +765,6 @@ public class IContract extends MatchingTask | |||||
| // Create a forked java process | // Create a forked java process | ||||
| Java iContract = (Java)project.createTask( "java" ); | Java iContract = (Java)project.createTask( "java" ); | ||||
| iContract.setTaskName( getTaskName() ); | |||||
| iContract.setFork( true ); | iContract.setFork( true ); | ||||
| iContract.setClassname( "com.reliablesystems.iContract.Tool" ); | iContract.setClassname( "com.reliablesystems.iContract.Tool" ); | ||||
| iContract.setClasspath( iContractClasspath ); | iContract.setClasspath( iContractClasspath ); | ||||
| @@ -124,8 +124,8 @@ public abstract class Continuus extends Task | |||||
| } | } | ||||
| protected int run( Commandline cmd ) | protected int run( Commandline cmd ) | ||||
| throws TaskException | |||||
| { | { | ||||
| return run( cmd, new LogStreamHandler( this, Project.MSG_VERBOSE, Project.MSG_WARN ) ); | return run( cmd, new LogStreamHandler( this, Project.MSG_VERBOSE, Project.MSG_WARN ) ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -434,7 +434,6 @@ public class BorlandDeploymentTool extends GenericDeploymentTool implements Exec | |||||
| { | { | ||||
| gentask.setClasspath( classpath ); | gentask.setClasspath( classpath ); | ||||
| } | } | ||||
| gentask.setTaskName( "generate client" ); | |||||
| gentask.execute(); | gentask.execute(); | ||||
| } | } | ||||
| catch( Exception e ) | catch( Exception e ) | ||||
| @@ -491,7 +490,6 @@ public class BorlandDeploymentTool extends GenericDeploymentTool implements Exec | |||||
| args += " " + sourceJar.getPath(); | args += " " + sourceJar.getPath(); | ||||
| javaTask = (Java)getTask().getProject().createTask( "java" ); | javaTask = (Java)getTask().getProject().createTask( "java" ); | ||||
| javaTask.setTaskName( "verify" ); | |||||
| javaTask.setClassname( VERIFY ); | javaTask.setClassname( VERIFY ); | ||||
| Commandline.Argument arguments = javaTask.createArg(); | Commandline.Argument arguments = javaTask.createArg(); | ||||
| arguments.setLine( args ); | arguments.setLine( args ); | ||||
| @@ -120,7 +120,6 @@ public class DDCreator extends MatchingTask | |||||
| String systemClassPath = System.getProperty( "java.class.path" ); | String systemClassPath = System.getProperty( "java.class.path" ); | ||||
| String execClassPath = project.translatePath( systemClassPath + ":" + classpath ); | String execClassPath = project.translatePath( systemClassPath + ":" + classpath ); | ||||
| Java ddCreatorTask = (Java)project.createTask( "java" ); | Java ddCreatorTask = (Java)project.createTask( "java" ); | ||||
| ddCreatorTask.setTaskName( getTaskName() ); | |||||
| ddCreatorTask.setFork( true ); | ddCreatorTask.setFork( true ); | ||||
| ddCreatorTask.setClassname( "org.apache.tools.ant.taskdefs.optional.ejb.DDCreatorHelper" ); | ddCreatorTask.setClassname( "org.apache.tools.ant.taskdefs.optional.ejb.DDCreatorHelper" ); | ||||
| Commandline.Argument arguments = ddCreatorTask.createArg(); | Commandline.Argument arguments = ddCreatorTask.createArg(); | ||||
| @@ -167,7 +167,6 @@ public class Ejbc extends MatchingTask | |||||
| String[] files = ds.getIncludedFiles(); | String[] files = ds.getIncludedFiles(); | ||||
| Java helperTask = (Java)project.createTask( "java" ); | Java helperTask = (Java)project.createTask( "java" ); | ||||
| helperTask.setTaskName( getTaskName() ); | |||||
| helperTask.setFork( true ); | helperTask.setFork( true ); | ||||
| helperTask.setClassname( "org.apache.tools.ant.taskdefs.optional.ejb.EjbcHelper" ); | helperTask.setClassname( "org.apache.tools.ant.taskdefs.optional.ejb.EjbcHelper" ); | ||||
| String args = ""; | String args = ""; | ||||
| @@ -313,7 +313,6 @@ public class WLRun extends Task | |||||
| } | } | ||||
| Java weblogicServer = (Java)project.createTask( "java" ); | Java weblogicServer = (Java)project.createTask( "java" ); | ||||
| weblogicServer.setTaskName( getTaskName() ); | |||||
| weblogicServer.setFork( true ); | weblogicServer.setFork( true ); | ||||
| weblogicServer.setClassname( weblogicMainClass ); | weblogicServer.setClassname( weblogicMainClass ); | ||||
| @@ -364,7 +363,6 @@ public class WLRun extends Task | |||||
| } | } | ||||
| Java weblogicServer = (Java)project.createTask( "java" ); | Java weblogicServer = (Java)project.createTask( "java" ); | ||||
| weblogicServer.setTaskName( getTaskName() ); | |||||
| weblogicServer.setFork( true ); | weblogicServer.setFork( true ); | ||||
| weblogicServer.setDir( weblogicSystemHome ); | weblogicServer.setDir( weblogicSystemHome ); | ||||
| weblogicServer.setClassname( weblogicMainClass ); | weblogicServer.setClassname( weblogicMainClass ); | ||||
| @@ -773,7 +773,6 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool | |||||
| try | try | ||||
| { | { | ||||
| javaTask = (Java)getTask().getProject().createTask( "java" ); | javaTask = (Java)getTask().getProject().createTask( "java" ); | ||||
| javaTask.setTaskName( "ejbc" ); | |||||
| if( getJvmDebugLevel() != null ) | if( getJvmDebugLevel() != null ) | ||||
| { | { | ||||
| @@ -981,8 +981,6 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool | |||||
| // Set the Java class name | // Set the Java class name | ||||
| javaTask.setTaskName( "ejbdeploy" ); | |||||
| javaTask.setClassname( "com.ibm.etools.ejbdeploy.EJBDeploy" ); | javaTask.setClassname( "com.ibm.etools.ejbdeploy.EJBDeploy" ); | ||||
| Commandline.Argument arguments = javaTask.createArg(); | Commandline.Argument arguments = javaTask.createArg(); | ||||
| arguments.setLine( args ); | arguments.setLine( args ); | ||||
| @@ -1765,7 +1765,7 @@ public class VAJAntToolGUI extends Frame | |||||
| { | { | ||||
| String msg = ""; | String msg = ""; | ||||
| if( event.getTask() != null ) | if( event.getTask() != null ) | ||||
| msg = "[" + event.getTask().getTaskName() + "] "; | |||||
| msg = "[" + event.getTask().getName() + "] "; | |||||
| getMessageTextArea().append( lineSeparator + msg + event.getMessage() ); | getMessageTextArea().append( lineSeparator + msg + event.getMessage() ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -174,7 +174,6 @@ public class WLJspc extends MatchingTask | |||||
| Java helperTask = (Java)project.createTask( "java" ); | Java helperTask = (Java)project.createTask( "java" ); | ||||
| helperTask.setFork( true ); | helperTask.setFork( true ); | ||||
| helperTask.setClassname( "weblogic.jspc" ); | helperTask.setClassname( "weblogic.jspc" ); | ||||
| helperTask.setTaskName( getTaskName() ); | |||||
| String[] args = new String[ 12 ]; | String[] args = new String[ 12 ]; | ||||
| File jspFile = null; | File jspFile = null; | ||||
| @@ -51,5 +51,6 @@ public interface FileNameMapper | |||||
| * basedirectory. | * basedirectory. | ||||
| * @return Description of the Returned Value | * @return Description of the Returned Value | ||||
| */ | */ | ||||
| String[] mapFileName( String sourceFileName ); | |||||
| String[] mapFileName( String sourceFileName ) | |||||
| throws TaskException; | |||||
| } | } | ||||