You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by do...@apache.org on 2001/12/16 02:01:20 UTC
cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util SourceFileScanner.java
donaldp 01/12/15 17:01:20
Modified: proposal/myrmidon/src/main/org/apache/tools/ant
AntClassLoader.java BuildEvent.java
BuildListener.java BuildLogger.java
DefaultLogger.java DemuxOutputStream.java
IntrospectionHelper.java PathTokenizer.java
ProjectHelper.java RuntimeConfigurable.java
Target.java Task.java TaskAdapter.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs
Available.java BUnzip2.java BZip2.java Copy.java
Delete.java ExecTask.java Execute.java
ExecuteOn.java GUnzip.java GZip.java
GenerateKey.java Javac.java LogStreamHandler.java
Manifest.java MatchingTask.java Pack.java
Property.java PumpStreamHandler.java Rmic.java
Tar.java UpToDate.java
proposal/myrmidon/src/main/org/apache/tools/ant/types
FileList.java Substitution.java ZipFileSet.java
proposal/myrmidon/src/main/org/apache/tools/ant/util
SourceFileScanner.java
Log:
BuildException -> TaskException
Removed uneeded imports.
Processed code through style formatter.
Yay - down to 272 errors!!!!!!!!!!!!!!!!!!!!!
Revision Changes Path
1.4 +4 -4 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/AntClassLoader.java
Index: AntClassLoader.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/AntClassLoader.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AntClassLoader.java 2001/12/15 15:20:23 1.3
+++ AntClassLoader.java 2001/12/16 01:01:19 1.4
@@ -128,7 +128,7 @@
* value of ${build.sysclasspath}
*/
public AntClassLoader( Project project, Path classpath )
- throws TaskException
+ throws TaskException
{
parent = AntClassLoader.class.getClassLoader();
this.project = project;
@@ -163,7 +163,7 @@
*/
public AntClassLoader( ClassLoader parent, Project project, Path classpath,
boolean parentFirst )
- throws TaskException
+ throws TaskException
{
this( project, classpath );
if( parent != null )
@@ -184,7 +184,7 @@
* be consulted before trying to load the a class through this loader.
*/
public AntClassLoader( Project project, Path classpath, boolean parentFirst )
- throws TaskException
+ throws TaskException
{
this( null, project, classpath, parentFirst );
}
@@ -539,7 +539,7 @@
* Reset the current thread's context loader to its original value
*/
public void resetThreadContextLoader()
- throws TaskException
+ throws TaskException
{
if( isContextLoaderSaved &&
getContextClassLoader != null && setContextClassLoader != null )
1.2 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/BuildEvent.java
Index: BuildEvent.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/BuildEvent.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BuildEvent.java 2001/12/15 12:06:20 1.1
+++ BuildEvent.java 2001/12/16 01:01:19 1.2
@@ -6,6 +6,7 @@
* the LICENSE file.
*/
package org.apache.tools.ant;
+
import java.util.EventObject;
public class BuildEvent extends EventObject
1.2 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/BuildListener.java
Index: BuildListener.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/BuildListener.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BuildListener.java 2001/12/15 12:06:20 1.1
+++ BuildListener.java 2001/12/16 01:01:19 1.2
@@ -6,6 +6,7 @@
* the LICENSE file.
*/
package org.apache.tools.ant;
+
import java.util.EventListener;
/**
1.2 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/BuildLogger.java
Index: BuildLogger.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/BuildLogger.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BuildLogger.java 2001/12/15 12:06:20 1.1
+++ BuildLogger.java 2001/12/16 01:01:19 1.2
@@ -6,6 +6,7 @@
* the LICENSE file.
*/
package org.apache.tools.ant;
+
import java.io.PrintStream;
/**
1.2 +18 -11 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/DefaultLogger.java
Index: DefaultLogger.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/DefaultLogger.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultLogger.java 2001/12/15 12:06:20 1.1
+++ DefaultLogger.java 2001/12/16 01:01:19 1.2
@@ -6,9 +6,8 @@
* the LICENSE file.
*/
package org.apache.tools.ant;
+
import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
import org.apache.tools.ant.util.StringUtils;
/**
@@ -36,14 +35,14 @@
if( minutes > 0 )
{
return Long.toString( minutes ) + " minute"
- + ( minutes == 1 ? " " : "s " )
- + Long.toString( seconds % 60 ) + " second"
- + ( seconds % 60 == 1 ? "" : "s" );
+ + ( minutes == 1 ? " " : "s " )
+ + Long.toString( seconds % 60 ) + " second"
+ + ( seconds % 60 == 1 ? "" : "s" );
}
else
{
return Long.toString( seconds ) + " second"
- + ( seconds % 60 == 1 ? "" : "s" );
+ + ( seconds % 60 == 1 ? "" : "s" );
}
}
@@ -137,7 +136,7 @@
}
message.append( StringUtils.LINE_SEP );
message.append( "Total time: "
- + formatTime( System.currentTimeMillis() - startTime ) );
+ + formatTime( System.currentTimeMillis() - startTime ) );
String msg = message.toString();
if( error == null )
@@ -193,7 +192,9 @@
}
}
- public void targetFinished( BuildEvent event ) { }
+ public void targetFinished( BuildEvent event )
+ {
+ }
public void targetStarted( BuildEvent event )
{
@@ -205,9 +206,13 @@
}
}
- public void taskFinished( BuildEvent event ) { }
+ public void taskFinished( BuildEvent event )
+ {
+ }
- public void taskStarted( BuildEvent event ) { }
+ public void taskStarted( BuildEvent event )
+ {
+ }
/**
* Empty implementation which allows subclasses to receive the same output
@@ -215,6 +220,8 @@
*
* @param message Description of Parameter
*/
- protected void log( String message ) { }
+ protected void log( String message )
+ {
+ }
}
1.2 +4 -5 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/DemuxOutputStream.java
Index: DemuxOutputStream.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/DemuxOutputStream.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DemuxOutputStream.java 2001/12/15 12:06:20 1.1
+++ DemuxOutputStream.java 2001/12/16 01:01:19 1.2
@@ -6,12 +6,12 @@
* the LICENSE file.
*/
package org.apache.tools.ant;
+
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Hashtable;
-
/**
* Logs content written by a thread and forwards the buffers onto the project
* object which will forward the content to the appropriate task
@@ -24,7 +24,7 @@
private final static int MAX_SIZE = 1024;
private Hashtable buffers = new Hashtable();
-// private ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+ // private ByteArrayOutputStream buffer = new ByteArrayOutputStream();
private boolean skip = false;
private boolean isErrorStream;
private Project project;
@@ -76,7 +76,7 @@
public void write( int cc )
throws IOException
{
- final byte c = ( byte )cc;
+ final byte c = (byte)cc;
if( ( c == '\n' ) || ( c == '\r' ) )
{
if( !skip )
@@ -96,7 +96,6 @@
skip = ( c == '\r' );
}
-
/**
* Converts the buffer to a string and sends it to <code>processLine</code>
*/
@@ -110,7 +109,7 @@
private ByteArrayOutputStream getBuffer()
{
Thread current = Thread.currentThread();
- ByteArrayOutputStream buffer = ( ByteArrayOutputStream )buffers.get( current );
+ ByteArrayOutputStream buffer = (ByteArrayOutputStream)buffers.get( current );
if( buffer == null )
{
buffer = new ByteArrayOutputStream();
1.3 +1 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/IntrospectionHelper.java
Index: IntrospectionHelper.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/IntrospectionHelper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- IntrospectionHelper.java 2001/12/15 14:55:53 1.2
+++ IntrospectionHelper.java 2001/12/16 01:01:19 1.3
@@ -765,7 +765,7 @@
{
final File file =
FileUtils.newFileUtils().resolveFile( p.getBaseDir(), value );
- m.invoke( parent, new File[]{ file } );
+ m.invoke( parent, new File[]{file} );
}
};
1.2 +3 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/PathTokenizer.java
Index: PathTokenizer.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/PathTokenizer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PathTokenizer.java 2001/12/15 12:06:20 1.1
+++ PathTokenizer.java 2001/12/16 01:01:19 1.2
@@ -6,6 +6,7 @@
* the LICENSE file.
*/
package org.apache.tools.ant;
+
import java.io.File;
import java.util.NoSuchElementException;
import java.util.StringTokenizer;
@@ -66,8 +67,8 @@
}
if( token.length() == 1 && Character.isLetter( token.charAt( 0 ) )
- && dosStyleFilesystem
- && tokenizer.hasMoreTokens() )
+ && dosStyleFilesystem
+ && tokenizer.hasMoreTokens() )
{
// we are on a dos style system so this path could be a drive
// spec. We look at the next token
1.3 +1 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/ProjectHelper.java
Index: ProjectHelper.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/ProjectHelper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ProjectHelper.java 2001/12/15 14:55:54 1.2
+++ ProjectHelper.java 2001/12/16 01:01:19 1.3
@@ -184,7 +184,7 @@
if( endName < 0 )
{
throw new TaskException( "Syntax error in property: "
- + value );
+ + value );
}
String propertyName = value.substring( pos + 2, endName );
fragments.addElement( null );
1.3 +5 -5 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/RuntimeConfigurable.java
Index: RuntimeConfigurable.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/RuntimeConfigurable.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RuntimeConfigurable.java 2001/12/15 14:55:54 1.2
+++ RuntimeConfigurable.java 2001/12/16 01:01:19 1.3
@@ -6,12 +6,13 @@
* the LICENSE file.
*/
package org.apache.tools.ant;
+
import java.util.Enumeration;
import java.util.Locale;
import java.util.Vector;
+import org.apache.myrmidon.api.TaskException;
import org.xml.sax.AttributeList;
import org.xml.sax.helpers.AttributeListImpl;
-import org.apache.myrmidon.api.TaskException;
/**
* Wrapper class that holds the attributes of a Task (or elements nested below
@@ -95,7 +96,6 @@
addText( new String( buf, start, end ) );
}
-
/**
* Configure the wrapped element and all children.
*
@@ -121,10 +121,10 @@
Enumeration enum = children.elements();
while( enum.hasMoreElements() )
{
- RuntimeConfigurable child = ( RuntimeConfigurable )enum.nextElement();
+ RuntimeConfigurable child = (RuntimeConfigurable)enum.nextElement();
if( child.wrappedObject instanceof Task )
{
- Task childTask = ( Task )child.wrappedObject;
+ Task childTask = (Task)child.wrappedObject;
childTask.setRuntimeConfigurableWrapper( child );
childTask.maybeConfigure();
}
@@ -154,7 +154,7 @@
*/
RuntimeConfigurable getChild( int index )
{
- return ( RuntimeConfigurable )children.elementAt( index );
+ return (RuntimeConfigurable)children.elementAt( index );
}
}
1.3 +5 -5 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/Target.java
Index: Target.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/Target.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Target.java 2001/12/15 14:55:54 1.2
+++ Target.java 2001/12/16 01:01:19 1.3
@@ -44,8 +44,8 @@
if( token.equals( "" ) || token.equals( "," ) )
{
throw new TaskException( "Syntax Error: Depend attribute " +
- "for target \"" + getName() +
- "\" has an empty string for dependency." );
+ "for target \"" + getName() +
+ "\" has an empty string for dependency." );
}
addDependency( token );
@@ -58,8 +58,8 @@
if( !tok.hasMoreTokens() || !token.equals( "," ) )
{
throw new TaskException( "Syntax Error: Depend attribute " +
- "for target \"" + getName() +
- "\" ends with a , character" );
+ "for target \"" + getName() +
+ "\" ends with a , character" );
}
}
}
@@ -228,7 +228,7 @@
}
private boolean testUnlessCondition()
- throws TaskException
+ throws TaskException
{
if( "".equals( unlessCondition ) )
{
1.3 +0 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/Task.java
Index: Task.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/Task.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Task.java 2001/12/15 14:55:54 1.2
+++ Task.java 2001/12/16 01:01:19 1.3
@@ -7,9 +7,7 @@
*/
package org.apache.tools.ant;
-import java.io.File;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.util.FileUtils;
public abstract class Task
extends ProjectComponent
1.3 +4 -5 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java
Index: TaskAdapter.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TaskAdapter.java 2001/12/15 14:55:54 1.2
+++ TaskAdapter.java 2001/12/16 01:01:19 1.3
@@ -6,11 +6,10 @@
* the LICENSE file.
*/
package org.apache.tools.ant;
+
import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
import org.apache.myrmidon.api.TaskException;
-
/**
* Use introspection to "adapt" an arbitrary Bean ( not extending Task, but with
* similar patterns).
@@ -34,7 +33,7 @@
* @param project Description of Parameter
*/
public static void checkTaskClass( final Class taskClass, final Project project )
- throws TaskException
+ throws TaskException
{
// don't have to check for interface, since then
// taskClass would be abstract too.
@@ -101,7 +100,7 @@
catch( Exception ex )
{
log( "Error setting project in " + proxy.getClass(),
- Project.MSG_ERR );
+ Project.MSG_ERR );
throw new BuildException( "Error", ex );
}
@@ -109,7 +108,7 @@
try
{
Class c = proxy.getClass();
- executeM = c.getMethod( "execute", new Class[0] );
+ executeM = c.getMethod( "execute", new Class[ 0 ] );
if( executeM == null )
{
log( "No public execute() in " + proxy.getClass(), Project.MSG_ERR );
1.4 +5 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java
Index: Available.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Available.java 2001/12/16 00:38:01 1.3
+++ Available.java 2001/12/16 01:01:19 1.4
@@ -51,11 +51,13 @@
}
public void setClasspath( Path classpath )
+ throws TaskException
{
createClasspath().append( classpath );
}
public void setClasspathRef( Reference r )
+ throws TaskException
{
createClasspath().setRefid( r );
}
@@ -66,6 +68,7 @@
}
public void setFilepath( Path filepath )
+ throws TaskException
{
createFilepath().append( filepath );
}
@@ -91,6 +94,7 @@
}
public Path createClasspath()
+ throws TaskException
{
if( this.classpath == null )
{
@@ -100,6 +104,7 @@
}
public Path createFilepath()
+ throws TaskException
{
if( this.filepath == null )
{
1.4 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java
Index: BUnzip2.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BUnzip2.java 2001/12/16 00:38:01 1.3
+++ BUnzip2.java 2001/12/16 01:01:19 1.4
@@ -32,6 +32,7 @@
}
protected void extract()
+ throws TaskException
{
if( source.lastModified() > dest.lastModified() )
{
1.4 +3 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/BZip2.java
Index: BZip2.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/BZip2.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BZip2.java 2001/12/16 00:38:01 1.3
+++ BZip2.java 2001/12/16 01:01:19 1.4
@@ -20,9 +20,11 @@
* @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
*/
-public class BZip2 extends Pack
+public class BZip2
+ extends Pack
{
protected void pack()
+ throws TaskException
{
CBZip2OutputStream zOut = null;
try
1.4 +2 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Copy.java
Index: Copy.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Copy.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Copy.java 2001/12/16 00:38:01 1.3
+++ Copy.java 2001/12/16 01:01:19 1.4
@@ -294,6 +294,7 @@
protected void buildMap( File fromDir, File toDir, String[] names,
FileNameMapper mapper, Hashtable map )
+ throws TaskException
{
String[] toCopy = null;
@@ -413,6 +414,7 @@
* @param dirs Description of Parameter
*/
protected void scan( File fromDir, File toDir, String[] files, String[] dirs )
+ throws TaskException
{
FileNameMapper mapper = null;
if( mapperElement != null )
1.4 +6 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Delete.java
Index: Delete.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Delete.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Delete.java 2001/12/16 00:38:01 1.3
+++ Delete.java 2001/12/16 01:01:19 1.4
@@ -73,6 +73,7 @@
* @param excludes the string containing the exclude patterns
*/
public void setExcludes( String excludes )
+ throws TaskException
{
usedMatchingTask = true;
super.setExcludes( excludes );
@@ -85,6 +86,7 @@
* patterns from.
*/
public void setExcludesfile( File excludesfile )
+ throws TaskException
{
usedMatchingTask = true;
super.setExcludesfile( excludesfile );
@@ -127,6 +129,7 @@
* @param includes the string containing the include patterns
*/
public void setIncludes( String includes )
+ throws TaskException
{
usedMatchingTask = true;
super.setIncludes( includes );
@@ -139,6 +142,7 @@
* patterns from.
*/
public void setIncludesfile( File includesfile )
+ throws TaskException
{
usedMatchingTask = true;
super.setIncludesfile( includesfile );
@@ -195,6 +199,7 @@
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createExclude()
+ throws TaskException
{
usedMatchingTask = true;
return super.createExclude();
@@ -206,6 +211,7 @@
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createInclude()
+ throws TaskException
{
usedMatchingTask = true;
return super.createInclude();
1.4 +1 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
Index: ExecTask.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ExecTask.java 2001/12/16 00:38:01 1.3
+++ ExecTask.java 2001/12/16 01:01:19 1.4
@@ -229,7 +229,7 @@
* @exception IOException Description of Exception
*/
protected final void runExecute( Execute exe )
- throws IOException
+ throws IOException, TaskException
{
int err = -1;// assume the worst
1.5 +4 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Execute.java
Index: Execute.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Execute.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Execute.java 2001/12/16 00:38:01 1.4
+++ Execute.java 2001/12/16 01:01:19 1.5
@@ -179,6 +179,7 @@
* @return The ProcEnvironment value
*/
public static synchronized Vector getProcEnvironment()
+ throws TaskException
{
if( procEnvironment != null )
return procEnvironment;
@@ -405,6 +406,7 @@
* @return the environment used to create a subprocess
*/
public String[] getEnvironment()
+ throws TaskException
{
if( env == null || newEnvironment )
return env;
@@ -505,6 +507,7 @@
* @return the patched environment
*/
private String[] patchEnvironment()
+ throws TaskException
{
Vector osEnv = (Vector)getProcEnvironment().clone();
for( int i = 0; i < env.length; i++ )
@@ -681,7 +684,7 @@
* @exception IOException Description of Exception
*/
public Process exec( Project project, String[] cmd, String[] env, File workingDir )
- throws IOException
+ throws IOException, TaskException
{
try
{
1.4 +2 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
Index: ExecuteOn.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ExecuteOn.java 2001/12/16 00:38:01 1.3
+++ ExecuteOn.java 2001/12/16 01:01:19 1.4
@@ -305,6 +305,7 @@
* @return The Dirs value
*/
protected String[] getDirs( File baseDir, DirectoryScanner ds )
+ throws TaskException
{
if( mapper != null )
{
@@ -327,6 +328,7 @@
* @return The Files value
*/
protected String[] getFiles( File baseDir, DirectoryScanner ds )
+ throws TaskException
{
if( mapper != null )
{
1.4 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GUnzip.java
Index: GUnzip.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GUnzip.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- GUnzip.java 2001/12/16 00:38:01 1.3
+++ GUnzip.java 2001/12/16 01:01:19 1.4
@@ -32,6 +32,7 @@
}
protected void extract()
+ throws TaskException
{
if( source.lastModified() > dest.lastModified() )
{
1.4 +3 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GZip.java
Index: GZip.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GZip.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- GZip.java 2001/12/16 00:38:01 1.3
+++ GZip.java 2001/12/16 01:01:19 1.4
@@ -20,10 +20,11 @@
* @author Jon S. Stevens <a href="mailto:jon@clearink.com">jon@clearink.com</a>
* @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
*/
-
-public class GZip extends Pack
+public class GZip
+ extends Pack
{
protected void pack()
+ throws TaskException
{
GZIPOutputStream zOut = null;
try
1.3 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GenerateKey.java
Index: GenerateKey.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GenerateKey.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- GenerateKey.java 2001/12/16 00:38:01 1.2
+++ GenerateKey.java 2001/12/16 01:01:19 1.3
@@ -49,6 +49,7 @@
}
public void setDname( final String dname )
+ throws TaskException
{
if( null != expandedDname )
{
1.4 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java
Index: Javac.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Javac.java 2001/12/16 00:38:01 1.3
+++ Javac.java 2001/12/16 01:01:19 1.4
@@ -849,6 +849,7 @@
* @param files Description of Parameter
*/
protected void scanDir( File srcDir, File destDir, String files[] )
+ throws TaskException
{
GlobPatternMapper m = new GlobPatternMapper();
m.setFrom( "*.java" );
1.4 +3 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/LogStreamHandler.java
Index: LogStreamHandler.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/LogStreamHandler.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- LogStreamHandler.java 2001/12/16 00:38:01 1.3
+++ LogStreamHandler.java 2001/12/16 01:01:19 1.4
@@ -16,9 +16,9 @@
*
* @author thomas.haas@softwired-inc.com
*/
-public class LogStreamHandler extends PumpStreamHandler
+public class LogStreamHandler
+ extends PumpStreamHandler
{
-
/**
* Creates a new instance of this class.
*
@@ -33,6 +33,7 @@
}
public void stop()
+ throws TaskException
{
super.stop();
try
1.4 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Manifest.java
Index: Manifest.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Manifest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Manifest.java 2001/12/16 00:38:01 1.3
+++ Manifest.java 2001/12/16 01:01:19 1.4
@@ -361,6 +361,7 @@
catch( IOException e )
{
throw new TaskException( "Failed to write " + manifestFile
+
e );
}
finally
1.4 +8 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java
Index: MatchingTask.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- MatchingTask.java 2001/12/16 00:38:01 1.3
+++ MatchingTask.java 2001/12/16 01:01:19 1.4
@@ -50,6 +50,7 @@
* @param excludes the string containing the exclude patterns
*/
public void setExcludes( String excludes )
+ throws TaskException
{
fileset.setExcludes( excludes );
}
@@ -61,6 +62,7 @@
* patterns from.
*/
public void setExcludesfile( File excludesfile )
+ throws TaskException
{
fileset.setExcludesfile( excludesfile );
}
@@ -72,6 +74,7 @@
* @param includes the string containing the include patterns
*/
public void setIncludes( String includes )
+ throws TaskException
{
fileset.setIncludes( includes );
}
@@ -83,6 +86,7 @@
* patterns from.
*/
public void setIncludesfile( File includesfile )
+ throws TaskException
{
fileset.setIncludesfile( includesfile );
}
@@ -93,6 +97,7 @@
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createExclude()
+ throws TaskException
{
return fileset.createExclude();
}
@@ -103,6 +108,7 @@
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createExcludesFile()
+ throws TaskException
{
return fileset.createExcludesFile();
}
@@ -113,6 +119,7 @@
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createInclude()
+ throws TaskException
{
return fileset.createInclude();
}
@@ -123,6 +130,7 @@
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createIncludesFile()
+ throws TaskException
{
return fileset.createIncludesFile();
}
1.4 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Pack.java
Index: Pack.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Pack.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Pack.java 2001/12/16 00:38:01 1.3
+++ Pack.java 2001/12/16 01:01:19 1.4
@@ -62,6 +62,7 @@
}
private void validate()
+ throws TaskException
{
if( zipFile == null )
{
1.5 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java
Index: Property.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Property.java 2001/12/16 00:38:01 1.4
+++ Property.java 2001/12/16 01:01:19 1.5
@@ -225,6 +225,7 @@
}
protected void loadEnvironment( String prefix )
+ throws TaskException
{
Properties props = new Properties();
if( !prefix.endsWith( "." ) )
1.3 +2 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java
Index: PumpStreamHandler.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PumpStreamHandler.java 2001/12/16 00:38:01 1.2
+++ PumpStreamHandler.java 2001/12/16 01:01:19 1.3
@@ -10,6 +10,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import org.apache.myrmidon.api.TaskException;
/**
* Copies standard output and error of subprocesses to standard output and error
@@ -63,6 +64,7 @@
}
public void stop()
+ throws TaskException
{
try
{
1.5 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Rmic.java
Index: Rmic.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Rmic.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Rmic.java 2001/12/16 00:38:01 1.4
+++ Rmic.java 2001/12/16 01:01:19 1.5
@@ -607,6 +607,7 @@
*/
protected void scanDir( File baseDir, String files[],
FileNameMapper mapper )
+ throws TaskException
{
String[] newFiles = files;
1.4 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tar.java
Index: Tar.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tar.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Tar.java 2001/12/16 00:38:01 1.3
+++ Tar.java 2001/12/16 01:01:19 1.4
@@ -212,6 +212,7 @@
}
protected boolean archiveIsUpToDate( String[] files )
+ throws TaskException
{
SourceFileScanner sfs = new SourceFileScanner( this );
MergingMapper mm = new MergingMapper();
1.4 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
Index: UpToDate.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- UpToDate.java 2001/12/16 00:38:01 1.3
+++ UpToDate.java 2001/12/16 01:01:19 1.4
@@ -161,6 +161,7 @@
}
protected boolean scanDir( File srcDir, String files[] )
+ throws TaskException
{
SourceFileScanner sfs = new SourceFileScanner( this );
FileNameMapper mapper = null;
1.3 +5 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/FileList.java
Index: FileList.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/FileList.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- FileList.java 2001/12/16 00:38:47 1.2
+++ FileList.java 2001/12/16 01:01:20 1.3
@@ -21,7 +21,7 @@
* a matched file if it currently exists in the file system.
*
* @author <a href="mailto:cstrong@arielpartners.com">Craeg Strong</a>
- * @version $Revision: 1.2 $ $Date: 2001/12/16 00:38:47 $
+ * @version $Revision: 1.3 $ $Date: 2001/12/16 01:01:20 $
*/
public class FileList extends DataType
{
@@ -52,6 +52,7 @@
}
public void setFiles( String filenames )
+ throws TaskException
{
if( isReference() )
{
@@ -88,6 +89,7 @@
}
public File getDir( Project p )
+ throws TaskException
{
if( isReference() )
{
@@ -103,6 +105,7 @@
* @return The Files value
*/
public String[] getFiles( Project p )
+ throws TaskException
{
if( isReference() )
{
@@ -132,6 +135,7 @@
* @return The Ref value
*/
protected FileList getRef( Project p )
+ throws TaskException
{
if( !checked )
{
1.3 +6 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/Substitution.java
Index: Substitution.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/Substitution.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Substitution.java 2001/12/16 00:38:47 1.2
+++ Substitution.java 2001/12/16 01:01:20 1.3
@@ -22,7 +22,8 @@
* mattinger@mindless.com</a>
* @see org.apache.oro.text.regex.Perl5Substitition
*/
-public class Substitution extends DataType
+public class Substitution
+ extends DataType
{
public final static String DATA_TYPE_NAME = "substitition";
@@ -45,9 +46,12 @@
* @return The Expression value
*/
public String getExpression( Project p )
+ throws TaskException
{
if( isReference() )
+ {
return getRef( p ).getExpression( p );
+ }
return expression;
}
@@ -60,6 +64,7 @@
* @return The Ref value
*/
public Substitution getRef( Project p )
+ throws TaskException
{
if( !checked )
{
@@ -79,5 +84,4 @@
return (Substitution)o;
}
}
-
}
1.3 +3 -3 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/ZipFileSet.java
Index: ZipFileSet.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/ZipFileSet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ZipFileSet.java 2001/12/16 00:38:47 1.2
+++ ZipFileSet.java 2001/12/16 01:01:20 1.3
@@ -27,9 +27,9 @@
*
* @author Don Ferguson <a href="mailto:don@bea.com">don@bea.com</a>
*/
-public class ZipFileSet extends FileSet
+public class ZipFileSet
+ extends FileSet
{
-
private File srcFile = null;
private String prefix = "";
private String fullpath = "";
@@ -84,6 +84,7 @@
* @param srcFile The zip file from which to extract entries.
*/
public void setSrc( File srcFile )
+ throws TaskException
{
if( hasDir )
{
@@ -153,5 +154,4 @@
{
return srcFile;
}
-
}
1.3 +3 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/SourceFileScanner.java
Index: SourceFileScanner.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/SourceFileScanner.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SourceFileScanner.java 2001/12/16 00:39:05 1.2
+++ SourceFileScanner.java 2001/12/16 01:01:20 1.3
@@ -9,6 +9,7 @@
import java.io.File;
import java.util.Vector;
+import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Os;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
@@ -53,6 +54,7 @@
*/
public String[] restrict( String[] files, File srcDir, File destDir,
FileNameMapper mapper )
+ throws TaskException
{
long now = ( new java.util.Date() ).getTime();
@@ -146,6 +148,7 @@
*/
public File[] restrictAsFiles( String[] files, File srcDir, File destDir,
FileNameMapper mapper )
+ throws TaskException
{
String[] res = restrict( files, srcDir, destDir, mapper );
File[] result = new File[ res.length ];
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>