diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/AntClassLoader.java b/proposal/myrmidon/src/main/org/apache/tools/ant/AntClassLoader.java
index 80ef2fadc..75b81042b 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/AntClassLoader.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/AntClassLoader.java
@@ -1086,17 +1086,10 @@ public class AntClassLoader extends ClassLoader implements BuildListener
while( ( pathElementsIndex < pathComponents.size() ) &&
( url == null ) )
{
- try
- {
- File pathComponent
- = (File)pathComponents.elementAt( pathElementsIndex );
- url = getResourceURL( pathComponent, this.resourceName );
- pathElementsIndex++;
- }
- catch( TaskException e )
- {
- // ignore path elements which are not valid relative to the project
- }
+ File pathComponent
+ = (File)pathComponents.elementAt( pathElementsIndex );
+ url = getResourceURL( pathComponent, this.resourceName );
+ pathElementsIndex++;
}
this.nextResource = url;
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/Launcher.java b/proposal/myrmidon/src/main/org/apache/tools/ant/Launcher.java
index da548157d..55c9681dd 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/Launcher.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/Launcher.java
@@ -103,6 +103,7 @@ public class Launcher
}
private static void addToolsJar( AntClassLoader antLoader )
+ throws TaskException
{
String javaHome = System.getProperty( "java.home" );
if( javaHome.endsWith( "jre" ) )
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Chmod.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Chmod.java
index 2c61b6613..4d09e09c2 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Chmod.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Chmod.java
@@ -38,11 +38,6 @@ public class Chmod extends ExecuteOn
super.setSkipEmptyFilesets( true );
}
- public void setCommand( String e )
- {
- throw new TaskException( taskType + " doesn\'t support the command attribute" );
- }
-
/**
* Sets whether default exclusions should be used or not.
*
@@ -50,12 +45,14 @@ public class Chmod extends ExecuteOn
* should be used, "false"|"off"|"no" when they shouldn't be used.
*/
public void setDefaultexcludes( boolean useDefaultExcludes )
+ throws TaskException
{
defaultSetDefined = true;
defaultSet.setDefaultexcludes( useDefaultExcludes );
}
public void setDir( File src )
+ throws TaskException
{
defaultSet.setDir( src );
}
@@ -67,17 +64,20 @@ public class Chmod extends ExecuteOn
* @param excludes the string containing the exclude patterns
*/
public void setExcludes( String excludes )
+ throws TaskException
{
defaultSetDefined = true;
defaultSet.setExcludes( excludes );
}
public void setExecutable( String e )
+ throws TaskException
{
throw new TaskException( taskType + " doesn\'t support the executable attribute" );
}
public void setFile( File src )
+ throws TaskException
{
FileSet fs = new FileSet();
fs.setDir( new File( src.getParent() ) );
@@ -92,6 +92,7 @@ public class Chmod extends ExecuteOn
* @param includes the string containing the include patterns
*/
public void setIncludes( String includes )
+ throws TaskException
{
defaultSetDefined = true;
defaultSet.setIncludes( includes );
@@ -104,6 +105,7 @@ public class Chmod extends ExecuteOn
}
public void setSkipEmptyFilesets( boolean skip )
+ throws TaskException
{
throw new TaskException( taskType + " doesn\'t support the skipemptyfileset attribute" );
}
@@ -114,6 +116,7 @@ public class Chmod extends ExecuteOn
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createExclude()
+ throws TaskException
{
defaultSetDefined = true;
return defaultSet.createExclude();
@@ -125,6 +128,7 @@ public class Chmod extends ExecuteOn
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createInclude()
+ throws TaskException
{
defaultSetDefined = true;
return defaultSet.createInclude();
@@ -136,6 +140,7 @@ public class Chmod extends ExecuteOn
* @return Description of the Returned Value
*/
public PatternSet createPatternSet()
+ throws TaskException
{
defaultSetDefined = true;
return defaultSet.createPatternSet();
@@ -176,6 +181,7 @@ public class Chmod extends ExecuteOn
}
protected void checkConfiguration()
+ throws TaskException
{
if( !havePerm )
{
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Copy.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Copy.java
index ed83c4e67..6c06b6af8 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Copy.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Copy.java
@@ -330,6 +330,7 @@ public class Copy extends Task
* good method for subclasses to override.
*/
protected void doFileOperations()
+ throws TaskException
{
if( fileCopyMap.size() > 0 )
{
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Delete.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Delete.java
index b48e7c2df..e30ebf5b4 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Delete.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Delete.java
@@ -223,6 +223,7 @@ public class Delete extends MatchingTask
* @return Description of the Returned Value
*/
public PatternSet createPatternSet()
+ throws TaskException
{
usedMatchingTask = true;
return super.createPatternSet();
@@ -355,6 +356,7 @@ public class Delete extends MatchingTask
//************************************************************************
protected void removeDir( File d )
+ throws TaskException
{
String[] list = d.list();
if( list == null )
@@ -402,6 +404,7 @@ public class Delete extends MatchingTask
* @param dirs array of directories to delete; can of zero length
*/
protected void removeFiles( File d, String[] files, String[] dirs )
+ throws TaskException
{
if( files.length > 0 )
{
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Ear.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Ear.java
index 6d177d0fe..4c5b2bab6 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Ear.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Ear.java
@@ -79,7 +79,7 @@ public class Ear extends Jar
}
protected void zipFile( File file, ZipOutputStream zOut, String vPath )
- throws IOException
+ throws IOException, TaskException
{
// If the file being added is WEB-INF/web.xml, we warn if it's not the
// one specified in the "webxml" attribute - or if it's being added twice,
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
index eefda48c5..6c3934353 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
@@ -59,6 +59,7 @@ public class ExecTask extends Task
* @param d The new Dir value
*/
public void setDir( File d )
+ throws TaskException
{
this.dir = d;
}
@@ -69,6 +70,7 @@ public class ExecTask extends Task
* @param value The new Executable value
*/
public void setExecutable( String value )
+ throws TaskException
{
cmdl.setExecutable( value );
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Execute.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Execute.java
index 8849c864a..3dd4df01d 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Execute.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Execute.java
@@ -64,78 +64,86 @@ public class Execute
*/
static
{
- // Try using a JDK 1.3 launcher
- try
- {
- vmLauncher = new Java13CommandLauncher();
- }
- catch( NoSuchMethodException exc )
- {
- // Ignore and keep try
- }
- if( Os.isFamily( "mac" ) )
- {
- // Mac
- shellLauncher = new MacCommandLauncher( new CommandLauncher() );
- }
- else if( Os.isFamily( "os/2" ) )
- {
- // OS/2 - use same mechanism as Windows 2000
- shellLauncher = new WinNTCommandLauncher( new CommandLauncher() );
- }
- else if( Os.isFamily( "windows" ) )
+ try
{
- // Windows. Need to determine which JDK we're running in
-
- CommandLauncher baseLauncher;
- if( System.getProperty( "java.version" ).startsWith( "1.1" ) )
+ // Try using a JDK 1.3 launcher
+ try
{
- // JDK 1.1
- baseLauncher = new Java11CommandLauncher();
+ vmLauncher = new Java13CommandLauncher();
}
- else
+ catch( NoSuchMethodException exc )
{
- // JDK 1.2
- baseLauncher = new CommandLauncher();
+ // Ignore and keep try
}
- // Determine if we're running under 2000/NT or 98/95
- String osname =
- System.getProperty( "os.name" ).toLowerCase( Locale.US );
-
- if( osname.indexOf( "nt" ) >= 0 || osname.indexOf( "2000" ) >= 0 )
+ if( Os.isFamily( "mac" ) )
{
- // Windows 2000/NT
- shellLauncher = new WinNTCommandLauncher( baseLauncher );
+ // Mac
+ shellLauncher = new MacCommandLauncher( new CommandLauncher() );
}
- else
+ else if( Os.isFamily( "os/2" ) )
{
- // Windows 98/95 - need to use an auxiliary script
- shellLauncher = new ScriptCommandLauncher( "bin/antRun.bat", baseLauncher );
+ // OS/2 - use same mechanism as Windows 2000
+ shellLauncher = new WinNTCommandLauncher( new CommandLauncher() );
}
- }
- else if( ( new Os( "netware" ) ).eval() )
- {
- // NetWare. Need to determine which JDK we're running in
- CommandLauncher baseLauncher;
- if( System.getProperty( "java.version" ).startsWith( "1.1" ) )
+ else if( Os.isFamily( "windows" ) )
+ {
+ // Windows. Need to determine which JDK we're running in
+
+ CommandLauncher baseLauncher;
+ if( System.getProperty( "java.version" ).startsWith( "1.1" ) )
+ {
+ // JDK 1.1
+ baseLauncher = new Java11CommandLauncher();
+ }
+ else
+ {
+ // JDK 1.2
+ baseLauncher = new CommandLauncher();
+ }
+
+ // Determine if we're running under 2000/NT or 98/95
+ String osname =
+ System.getProperty( "os.name" ).toLowerCase( Locale.US );
+
+ if( osname.indexOf( "nt" ) >= 0 || osname.indexOf( "2000" ) >= 0 )
+ {
+ // Windows 2000/NT
+ shellLauncher = new WinNTCommandLauncher( baseLauncher );
+ }
+ else
+ {
+ // Windows 98/95 - need to use an auxiliary script
+ shellLauncher = new ScriptCommandLauncher( "bin/antRun.bat", baseLauncher );
+ }
+ }
+ else if( ( new Os( "netware" ) ).eval() )
{
- // JDK 1.1
- baseLauncher = new Java11CommandLauncher();
+ // NetWare. Need to determine which JDK we're running in
+ CommandLauncher baseLauncher;
+ if( System.getProperty( "java.version" ).startsWith( "1.1" ) )
+ {
+ // JDK 1.1
+ baseLauncher = new Java11CommandLauncher();
+ }
+ else
+ {
+ // JDK 1.2
+ baseLauncher = new CommandLauncher();
+ }
+
+ shellLauncher = new PerlScriptCommandLauncher( "bin/antRun.pl", baseLauncher );
}
else
{
- // JDK 1.2
- baseLauncher = new CommandLauncher();
+ // Generic
+ shellLauncher = new ScriptCommandLauncher( "bin/antRun", new CommandLauncher() );
}
-
- shellLauncher = new PerlScriptCommandLauncher( "bin/antRun.pl", baseLauncher );
}
- else
+ catch( TaskException e )
{
- // Generic
- shellLauncher = new ScriptCommandLauncher( "bin/antRun", new CommandLauncher() );
+ e.printStackTrace();
}
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
index 84cff357b..a60733c6c 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
@@ -82,6 +82,7 @@ public class ExecuteOn extends ExecTask
* @param skip The new SkipEmptyFilesets value
*/
public void setSkipEmptyFilesets( boolean skip )
+ throws TaskException
{
skipEmpty = skip;
}
@@ -130,6 +131,7 @@ public class ExecuteOn extends ExecTask
* @return Description of the Returned Value
*/
public Commandline.Marker createSrcfile()
+ throws TaskException
{
if( srcFilePos != null )
{
@@ -146,6 +148,7 @@ public class ExecuteOn extends ExecTask
* @return Description of the Returned Value
*/
public Commandline.Marker createTargetfile()
+ throws TaskException
{
if( targetFilePos != null )
{
@@ -343,6 +346,7 @@ public class ExecuteOn extends ExecTask
}
protected void checkConfiguration()
+ throws TaskException
{
super.checkConfiguration();
if( filesets.size() == 0 )
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteStreamHandler.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteStreamHandler.java
index 4129b61d2..a8a24ae8b 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteStreamHandler.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteStreamHandler.java
@@ -10,6 +10,7 @@ package org.apache.tools.ant.taskdefs;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import org.apache.myrmidon.api.TaskException;
/**
* Used by Execute
to handle input and output stream of
@@ -19,7 +20,6 @@ import java.io.OutputStream;
*/
public interface ExecuteStreamHandler
{
-
/**
* Install a handler for the input stream of the subprocess.
*
@@ -59,5 +59,6 @@ public interface ExecuteStreamHandler
/**
* Stop handling of the streams - will not be restarted.
*/
- void stop();
+ void stop()
+ throws TaskException;
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Input.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Input.java
index 21903f655..730c4a470 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Input.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Input.java
@@ -12,6 +12,7 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.Vector;
+import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
@@ -86,6 +87,7 @@ public class Input extends Task
* @param msg The feature to be added to the Text attribute
*/
public void addText( String msg )
+ throws TaskException
{
message += project.replaceProperties( msg );
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Jar.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Jar.java
index 37877733c..9181dcfc6 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Jar.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Jar.java
@@ -73,6 +73,7 @@ public class Jar extends Zip
}
public void setManifest( File manifestFile )
+ throws TaskException
{
if( !manifestFile.exists() )
{
@@ -124,7 +125,7 @@ public class Jar extends Zip
}
public void addConfiguredManifest( Manifest newManifest )
- throws ManifestException
+ throws ManifestException, TaskException
{
if( manifest == null )
{
@@ -265,7 +266,7 @@ public class Jar extends Zip
}
protected void zipFile( File file, ZipOutputStream zOut, String vPath )
- throws IOException
+ throws IOException, TaskException
{
// If the file being added is META-INF/MANIFEST.MF, we warn if it's not the
// one specified in the "manifest" attribute - or if it's being added twice,
@@ -284,7 +285,7 @@ public class Jar extends Zip
}
protected void zipFile( InputStream is, ZipOutputStream zOut, String vPath, long lastModified )
- throws IOException
+ throws IOException, TaskException
{
// If the file being added is META-INF/MANIFEST.MF, we merge it with the
// current manifest
@@ -315,7 +316,7 @@ public class Jar extends Zip
* and adding it to the zip stream.
*/
private void createIndexList( ZipOutputStream zOut )
- throws IOException
+ throws IOException, TaskException
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
// encoding must be UTF8 as specified in the specs.
@@ -371,7 +372,7 @@ public class Jar extends Zip
* @exception IOException Description of Exception
*/
private void zipManifestEntry( InputStream is )
- throws IOException
+ throws IOException, TaskException
{
try
{
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java
index 24972620c..73a945851 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java
@@ -61,6 +61,7 @@ public class Java extends Task
* @param s The new Classpath value
*/
public void setClasspath( Path s )
+ throws TaskException
{
createClasspath().append( s );
}
@@ -71,6 +72,7 @@ public class Java extends Task
* @param r The new ClasspathRef value
*/
public void setClasspathRef( Reference r )
+ throws TaskException
{
createClasspath().setRefid( r );
}
@@ -190,6 +192,7 @@ public class Java extends Task
* @return Description of the Returned Value
*/
public Path createClasspath()
+ throws TaskException
{
return cmdl.createClasspath( project ).createPath();
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java
index 24418bcb5..a25188526 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java
@@ -94,6 +94,7 @@ public class Javac extends MatchingTask
* @param r The new BootClasspathRef value
*/
public void setBootClasspathRef( Reference r )
+ throws TaskException
{
createBootclasspath().setRefid( r );
}
@@ -104,6 +105,7 @@ public class Javac extends MatchingTask
* @param bootclasspath The new Bootclasspath value
*/
public void setBootclasspath( Path bootclasspath )
+ throws TaskException
{
if( this.bootclasspath == null )
{
@@ -121,6 +123,7 @@ public class Javac extends MatchingTask
* @param classpath The new Classpath value
*/
public void setClasspath( Path classpath )
+ throws TaskException
{
if( compileClasspath == null )
{
@@ -138,6 +141,7 @@ public class Javac extends MatchingTask
* @param r The new ClasspathRef value
*/
public void setClasspathRef( Reference r )
+ throws TaskException
{
createClasspath().setRefid( r );
}
@@ -209,6 +213,7 @@ public class Javac extends MatchingTask
* @param extdirs The new Extdirs value
*/
public void setExtdirs( Path extdirs )
+ throws TaskException
{
if( this.extdirs == null )
{
@@ -345,6 +350,7 @@ public class Javac extends MatchingTask
* @param srcDir The new Srcdir value
*/
public void setSrcdir( Path srcDir )
+ throws TaskException
{
if( src == null )
{
@@ -649,6 +655,7 @@ public class Javac extends MatchingTask
* @return Description of the Returned Value
*/
public Path createBootclasspath()
+ throws TaskException
{
if( bootclasspath == null )
{
@@ -663,6 +670,7 @@ public class Javac extends MatchingTask
* @return Description of the Returned Value
*/
public Path createClasspath()
+ throws TaskException
{
if( compileClasspath == null )
{
@@ -690,6 +698,7 @@ public class Javac extends MatchingTask
* @return Description of the Returned Value
*/
public Path createExtdirs()
+ throws TaskException
{
if( extdirs == null )
{
@@ -704,6 +713,7 @@ public class Javac extends MatchingTask
* @return a nested src element.
*/
public Path createSrc()
+ throws TaskException
{
if( src == null )
{
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Manifest.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Manifest.java
index 2795b2188..947889912 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Manifest.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Manifest.java
@@ -91,6 +91,7 @@ public class Manifest extends Task
* Construct an empty manifest
*/
public Manifest()
+ throws TaskException
{
mode = new Mode();
mode.setValue( "replace" );
@@ -244,7 +245,7 @@ public class Manifest extends Task
}
public void addConfiguredSection( Section section )
- throws ManifestException
+ throws ManifestException, TaskException
{
if( section.getName() == null )
{
@@ -360,9 +361,7 @@ public class Manifest extends Task
}
catch( IOException e )
{
- throw new TaskException( "Failed to write " + manifestFile
-
- e );
+ throw new TaskException( "Failed to write " + manifestFile, e );
}
finally
{
@@ -726,7 +725,7 @@ public class Manifest extends Task
* section.
*/
public String addAttributeAndCheck( Attribute attribute )
- throws ManifestException
+ throws ManifestException, TaskException
{
if( attribute.getName() == null || attribute.getValue() == null )
{
@@ -773,7 +772,7 @@ public class Manifest extends Task
}
public void addConfiguredAttribute( Attribute attribute )
- throws ManifestException
+ throws ManifestException, TaskException
{
String check = addAttributeAndCheck( attribute );
if( check != null )
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java
index cc758cee3..fe4031107 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java
@@ -141,6 +141,7 @@ public abstract class MatchingTask extends Task
* @return Description of the Returned Value
*/
public PatternSet createPatternSet()
+ throws TaskException
{
return fileset.createPatternSet();
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Pack.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Pack.java
index 7064cec4a..dc6c88b93 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Pack.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Pack.java
@@ -45,7 +45,8 @@ public abstract class Pack extends Task
pack();
}
- protected abstract void pack();
+ protected abstract void pack()
+ throws TaskException;
protected void zipFile( File file, OutputStream zOut )
throws IOException
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Unpack.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Unpack.java
index cc449a245..4b732d772 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Unpack.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Unpack.java
@@ -44,7 +44,8 @@ public abstract class Unpack extends Task
protected abstract String getDefaultExtension();
- protected abstract void extract();
+ protected abstract void extract()
+ throws TaskException;
private void createDestFile( String defaultExtension )
{
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/War.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/War.java
index 8e1649fa0..328cf7e00 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/War.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/War.java
@@ -90,7 +90,7 @@ public class War extends Jar
}
protected void zipFile( File file, ZipOutputStream zOut, String vPath )
- throws IOException
+ throws IOException, TaskException
{
// If the file being added is WEB-INF/web.xml, we warn if it's not the
// one specified in the "webxml" attribute - or if it's being added twice,
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java
index 5bd0059de..bd3c5beb1 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java
@@ -71,6 +71,7 @@ public class Zip extends MatchingTask
private String encoding;
protected static String[][] grabFileNames( FileScanner[] scanners )
+ throws TaskException
{
String[][] result = new String[ scanners.length ][];
for( int i = 0; i < scanners.length; i++ )
@@ -84,11 +85,6 @@ public class Zip extends MatchingTask
return result;
}
- protected static File[] grabFiles( FileScanner[] scanners )
- {
- return grabFiles( scanners, grabFileNames( scanners ) );
- }
-
protected static File[] grabFiles( FileScanner[] scanners,
String[][] fileNames )
{
@@ -477,7 +473,7 @@ public class Zip extends MatchingTask
*/
protected void addFiles( FileScanner scanner, ZipOutputStream zOut,
String prefix, String fullpath )
- throws IOException
+ throws IOException, TaskException
{
if( prefix.length() > 0 && fullpath.length() > 0 )
throw new TaskException( "Both prefix and fullpath attributes may not be set on the same fileset." );
@@ -534,7 +530,7 @@ public class Zip extends MatchingTask
* @exception IOException Description of Exception
*/
protected void addFiles( Vector filesets, ZipOutputStream zOut )
- throws IOException
+ throws IOException, TaskException
{
// Add each fileset in the Vector.
for( int i = 0; i < filesets.size(); i++ )
@@ -630,7 +626,7 @@ public class Zip extends MatchingTask
protected void addZipEntries( ZipFileSet fs, DirectoryScanner ds,
ZipOutputStream zOut, String prefix, String fullpath )
- throws IOException
+ throws IOException, TaskException
{
if( prefix.length() > 0 && fullpath.length() > 0 )
throw new TaskException( "Both prefix and fullpath attributes may not be set on the same fileset." );
@@ -703,6 +699,7 @@ public class Zip extends MatchingTask
* @return true if the file is then considered up to date.
*/
protected boolean createEmptyZip( File zipFile )
+ throws TaskException
{
// In this case using java.util.zip will not work
// because it does not permit a zero-entry archive.
@@ -777,7 +774,7 @@ public class Zip extends MatchingTask
protected void zipFile( InputStream in, ZipOutputStream zOut, String vPath,
long lastModified )
- throws IOException
+ throws IOException, TaskException
{
ZipEntry ze = new ZipEntry( vPath );
ze.setTime( lastModified );
@@ -846,7 +843,7 @@ public class Zip extends MatchingTask
}
protected void zipFile( File file, ZipOutputStream zOut, String vPath )
- throws IOException
+ throws IOException, TaskException
{
if( file.equals( zipFile ) )
{
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
index d8263ddf5..74fe6ef4c 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
@@ -93,6 +93,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
}
protected Commandline setupJavacCommand()
+ throws TaskException
{
return setupJavacCommand( false );
}
@@ -105,6 +106,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
* @return Description of the Returned Value
*/
protected Commandline setupJavacCommand( boolean debugLevelCheck )
+ throws TaskException
{
Commandline cmd = new Commandline();
setupJavacCommandlineSwitches( cmd, debugLevelCheck );
@@ -112,11 +114,6 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
return cmd;
}
- protected Commandline setupJavacCommandlineSwitches( Commandline cmd )
- {
- return setupJavacCommandlineSwitches( cmd, false );
- }
-
/**
* Does the command line argument processing common to classic and modern.
* Doesn't add the files to compile.
@@ -127,6 +124,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
*/
protected Commandline setupJavacCommandlineSwitches( Commandline cmd,
boolean useDebugLevel )
+ throws TaskException
{
Path classpath = getCompileClasspath();
@@ -292,6 +290,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
* @return Description of the Returned Value
*/
protected Commandline setupModernJavacCommand()
+ throws TaskException
{
Commandline cmd = new Commandline();
setupModernJavacCommandlineSwitches( cmd );
@@ -308,6 +307,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
* @return Description of the Returned Value
*/
protected Commandline setupModernJavacCommandlineSwitches( Commandline cmd )
+ throws TaskException
{
setupJavacCommandlineSwitches( cmd, true );
if( attributes.getSource() != null )
@@ -324,6 +324,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
* @return The CompileClasspath value
*/
protected Path getCompileClasspath()
+ throws TaskException
{
Path classpath = new Path( project );
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java
index 015b4dc9a..6656f2291 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java
@@ -42,6 +42,7 @@ public class Gcj extends DefaultCompilerAdapter
}
protected Commandline setupGCJCommand()
+ throws TaskException
{
Commandline cmd = new Commandline();
Path classpath = new Path( project );
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Kjc.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Kjc.java
index d0d3ca27f..a497f208d 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Kjc.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Kjc.java
@@ -64,6 +64,7 @@ public class Kjc extends DefaultCompilerAdapter
* @return Description of the Returned Value
*/
protected Commandline setupKjcCommand()
+ throws TaskException
{
Commandline cmd = new Commandline();
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java
index 7d6980d65..50a881fb5 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java
@@ -1064,6 +1064,7 @@ public class IContract extends MatchingTask
// make it public
public void modify( Path path )
+ throws TaskException
{
// depending on what compiler to use, set the includeJavaRuntime flag
if( "jikes".equals( compiler ) )
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
index 969c125ac..901a56f2d 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
@@ -239,6 +239,7 @@ public class ReplaceRegExp extends Task
Substitution s,
String input,
int options )
+ throws TaskException
{
String res = input;
Regexp regexp = r.getRegexp( project );
@@ -259,7 +260,7 @@ public class ReplaceRegExp extends Task
* @exception IOException Description of Exception
*/
protected void doReplace( File f, int options )
- throws IOException
+ throws IOException, TaskException
{
File parentDir = new File( new File( f.getAbsolutePath() ).getParent() );
File temp = fileUtils.createTempFile( "replace", ".txt", parentDir );
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
index 378c5d1ce..46e42abec 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
@@ -480,6 +480,7 @@ public class BorlandDeploymentTool extends GenericDeploymentTool implements Exec
* @param sourceJar java.io.File representing the produced jar file
*/
private void verifyBorlandJar( File sourceJar )
+ throws TaskException
{
org.apache.tools.ant.taskdefs.Java javaTask = null;
log( "verify " + sourceJar, Project.MSG_INFO );
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
index 7a239fd92..7fc44bf0e 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
@@ -343,6 +343,7 @@ public class WLRun extends Task
}
private void executeWLS6()
+ throws TaskException
{
File securityPolicyFile = findSecurityPolicyFile( DEFAULT_WL60_POLICY_FILE );
if( !beaHome.isDirectory() )
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
index 5cd1f56b0..cacfb1640 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
@@ -747,6 +747,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool
* @param publicId Description of Parameter
*/
private void buildWeblogicJar( File sourceJar, File destJar, String publicId )
+ throws TaskException
{
org.apache.tools.ant.taskdefs.Java javaTask = null;
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
index abb75100e..e234767c6 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
@@ -878,10 +878,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool
File genericJarFile = super.getVendorOutputJarFile( baseName );
super.writeJar( baseName, genericJarFile, files, publicId );
-
-
// create the output .jar, if required
-
if( alwaysRebuild || isRebuildRequired( genericJarFile, jarFile ) )
{
buildWebsphereJar( genericJarFile, jarFile );
@@ -939,6 +936,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool
* jarfile.
*/
private void buildWebsphereJar( File sourceJar, File destJar )
+ throws TaskException
{
try
{
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
index a711952f4..0611be656 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
@@ -19,7 +19,8 @@ import org.apache.tools.ant.types.Commandline;
*
* @author Matthew Watson mattw@i3sp.com
*/
-public class JasperC extends DefaultCompilerAdapter
+public class JasperC
+ extends DefaultCompilerAdapter
{
/*
* ------------------------------------------------------------
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/types/FileSet.java b/proposal/myrmidon/src/main/org/apache/tools/ant/types/FileSet.java
index fdab4b91e..ca5fd88a6 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/types/FileSet.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/types/FileSet.java
@@ -274,6 +274,7 @@ public class FileSet extends DataType implements Cloneable
}
catch( TaskException e )
{
+ throw new IllegalStateException( e.getMessage() );
}
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/types/RegularExpression.java b/proposal/myrmidon/src/main/org/apache/tools/ant/types/RegularExpression.java
index a89fccdf4..fa07f6fc1 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/types/RegularExpression.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/types/RegularExpression.java
@@ -108,9 +108,12 @@ public class RegularExpression extends DataType
}
public Regexp getRegexp( Project p )
+ throws TaskException
{
if( isReference() )
+ {
return getRef( p ).getRegexp( p );
+ }
return this.regexp;
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/AntClassLoader.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/AntClassLoader.java
index 80ef2fadc..75b81042b 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/AntClassLoader.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/AntClassLoader.java
@@ -1086,17 +1086,10 @@ public class AntClassLoader extends ClassLoader implements BuildListener
while( ( pathElementsIndex < pathComponents.size() ) &&
( url == null ) )
{
- try
- {
- File pathComponent
- = (File)pathComponents.elementAt( pathElementsIndex );
- url = getResourceURL( pathComponent, this.resourceName );
- pathElementsIndex++;
- }
- catch( TaskException e )
- {
- // ignore path elements which are not valid relative to the project
- }
+ File pathComponent
+ = (File)pathComponents.elementAt( pathElementsIndex );
+ url = getResourceURL( pathComponent, this.resourceName );
+ pathElementsIndex++;
}
this.nextResource = url;
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/Launcher.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/Launcher.java
index da548157d..55c9681dd 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/Launcher.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/Launcher.java
@@ -103,6 +103,7 @@ public class Launcher
}
private static void addToolsJar( AntClassLoader antLoader )
+ throws TaskException
{
String javaHome = System.getProperty( "java.home" );
if( javaHome.endsWith( "jre" ) )
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Chmod.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Chmod.java
index 2c61b6613..4d09e09c2 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Chmod.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Chmod.java
@@ -38,11 +38,6 @@ public class Chmod extends ExecuteOn
super.setSkipEmptyFilesets( true );
}
- public void setCommand( String e )
- {
- throw new TaskException( taskType + " doesn\'t support the command attribute" );
- }
-
/**
* Sets whether default exclusions should be used or not.
*
@@ -50,12 +45,14 @@ public class Chmod extends ExecuteOn
* should be used, "false"|"off"|"no" when they shouldn't be used.
*/
public void setDefaultexcludes( boolean useDefaultExcludes )
+ throws TaskException
{
defaultSetDefined = true;
defaultSet.setDefaultexcludes( useDefaultExcludes );
}
public void setDir( File src )
+ throws TaskException
{
defaultSet.setDir( src );
}
@@ -67,17 +64,20 @@ public class Chmod extends ExecuteOn
* @param excludes the string containing the exclude patterns
*/
public void setExcludes( String excludes )
+ throws TaskException
{
defaultSetDefined = true;
defaultSet.setExcludes( excludes );
}
public void setExecutable( String e )
+ throws TaskException
{
throw new TaskException( taskType + " doesn\'t support the executable attribute" );
}
public void setFile( File src )
+ throws TaskException
{
FileSet fs = new FileSet();
fs.setDir( new File( src.getParent() ) );
@@ -92,6 +92,7 @@ public class Chmod extends ExecuteOn
* @param includes the string containing the include patterns
*/
public void setIncludes( String includes )
+ throws TaskException
{
defaultSetDefined = true;
defaultSet.setIncludes( includes );
@@ -104,6 +105,7 @@ public class Chmod extends ExecuteOn
}
public void setSkipEmptyFilesets( boolean skip )
+ throws TaskException
{
throw new TaskException( taskType + " doesn\'t support the skipemptyfileset attribute" );
}
@@ -114,6 +116,7 @@ public class Chmod extends ExecuteOn
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createExclude()
+ throws TaskException
{
defaultSetDefined = true;
return defaultSet.createExclude();
@@ -125,6 +128,7 @@ public class Chmod extends ExecuteOn
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createInclude()
+ throws TaskException
{
defaultSetDefined = true;
return defaultSet.createInclude();
@@ -136,6 +140,7 @@ public class Chmod extends ExecuteOn
* @return Description of the Returned Value
*/
public PatternSet createPatternSet()
+ throws TaskException
{
defaultSetDefined = true;
return defaultSet.createPatternSet();
@@ -176,6 +181,7 @@ public class Chmod extends ExecuteOn
}
protected void checkConfiguration()
+ throws TaskException
{
if( !havePerm )
{
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Copy.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Copy.java
index ed83c4e67..6c06b6af8 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Copy.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Copy.java
@@ -330,6 +330,7 @@ public class Copy extends Task
* good method for subclasses to override.
*/
protected void doFileOperations()
+ throws TaskException
{
if( fileCopyMap.size() > 0 )
{
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Delete.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Delete.java
index b48e7c2df..e30ebf5b4 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Delete.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Delete.java
@@ -223,6 +223,7 @@ public class Delete extends MatchingTask
* @return Description of the Returned Value
*/
public PatternSet createPatternSet()
+ throws TaskException
{
usedMatchingTask = true;
return super.createPatternSet();
@@ -355,6 +356,7 @@ public class Delete extends MatchingTask
//************************************************************************
protected void removeDir( File d )
+ throws TaskException
{
String[] list = d.list();
if( list == null )
@@ -402,6 +404,7 @@ public class Delete extends MatchingTask
* @param dirs array of directories to delete; can of zero length
*/
protected void removeFiles( File d, String[] files, String[] dirs )
+ throws TaskException
{
if( files.length > 0 )
{
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Ear.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Ear.java
index 6d177d0fe..4c5b2bab6 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Ear.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Ear.java
@@ -79,7 +79,7 @@ public class Ear extends Jar
}
protected void zipFile( File file, ZipOutputStream zOut, String vPath )
- throws IOException
+ throws IOException, TaskException
{
// If the file being added is WEB-INF/web.xml, we warn if it's not the
// one specified in the "webxml" attribute - or if it's being added twice,
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecTask.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecTask.java
index eefda48c5..6c3934353 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecTask.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecTask.java
@@ -59,6 +59,7 @@ public class ExecTask extends Task
* @param d The new Dir value
*/
public void setDir( File d )
+ throws TaskException
{
this.dir = d;
}
@@ -69,6 +70,7 @@ public class ExecTask extends Task
* @param value The new Executable value
*/
public void setExecutable( String value )
+ throws TaskException
{
cmdl.setExecutable( value );
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Execute.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Execute.java
index 8849c864a..3dd4df01d 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Execute.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Execute.java
@@ -64,78 +64,86 @@ public class Execute
*/
static
{
- // Try using a JDK 1.3 launcher
- try
- {
- vmLauncher = new Java13CommandLauncher();
- }
- catch( NoSuchMethodException exc )
- {
- // Ignore and keep try
- }
- if( Os.isFamily( "mac" ) )
- {
- // Mac
- shellLauncher = new MacCommandLauncher( new CommandLauncher() );
- }
- else if( Os.isFamily( "os/2" ) )
- {
- // OS/2 - use same mechanism as Windows 2000
- shellLauncher = new WinNTCommandLauncher( new CommandLauncher() );
- }
- else if( Os.isFamily( "windows" ) )
+ try
{
- // Windows. Need to determine which JDK we're running in
-
- CommandLauncher baseLauncher;
- if( System.getProperty( "java.version" ).startsWith( "1.1" ) )
+ // Try using a JDK 1.3 launcher
+ try
{
- // JDK 1.1
- baseLauncher = new Java11CommandLauncher();
+ vmLauncher = new Java13CommandLauncher();
}
- else
+ catch( NoSuchMethodException exc )
{
- // JDK 1.2
- baseLauncher = new CommandLauncher();
+ // Ignore and keep try
}
- // Determine if we're running under 2000/NT or 98/95
- String osname =
- System.getProperty( "os.name" ).toLowerCase( Locale.US );
-
- if( osname.indexOf( "nt" ) >= 0 || osname.indexOf( "2000" ) >= 0 )
+ if( Os.isFamily( "mac" ) )
{
- // Windows 2000/NT
- shellLauncher = new WinNTCommandLauncher( baseLauncher );
+ // Mac
+ shellLauncher = new MacCommandLauncher( new CommandLauncher() );
}
- else
+ else if( Os.isFamily( "os/2" ) )
{
- // Windows 98/95 - need to use an auxiliary script
- shellLauncher = new ScriptCommandLauncher( "bin/antRun.bat", baseLauncher );
+ // OS/2 - use same mechanism as Windows 2000
+ shellLauncher = new WinNTCommandLauncher( new CommandLauncher() );
}
- }
- else if( ( new Os( "netware" ) ).eval() )
- {
- // NetWare. Need to determine which JDK we're running in
- CommandLauncher baseLauncher;
- if( System.getProperty( "java.version" ).startsWith( "1.1" ) )
+ else if( Os.isFamily( "windows" ) )
+ {
+ // Windows. Need to determine which JDK we're running in
+
+ CommandLauncher baseLauncher;
+ if( System.getProperty( "java.version" ).startsWith( "1.1" ) )
+ {
+ // JDK 1.1
+ baseLauncher = new Java11CommandLauncher();
+ }
+ else
+ {
+ // JDK 1.2
+ baseLauncher = new CommandLauncher();
+ }
+
+ // Determine if we're running under 2000/NT or 98/95
+ String osname =
+ System.getProperty( "os.name" ).toLowerCase( Locale.US );
+
+ if( osname.indexOf( "nt" ) >= 0 || osname.indexOf( "2000" ) >= 0 )
+ {
+ // Windows 2000/NT
+ shellLauncher = new WinNTCommandLauncher( baseLauncher );
+ }
+ else
+ {
+ // Windows 98/95 - need to use an auxiliary script
+ shellLauncher = new ScriptCommandLauncher( "bin/antRun.bat", baseLauncher );
+ }
+ }
+ else if( ( new Os( "netware" ) ).eval() )
{
- // JDK 1.1
- baseLauncher = new Java11CommandLauncher();
+ // NetWare. Need to determine which JDK we're running in
+ CommandLauncher baseLauncher;
+ if( System.getProperty( "java.version" ).startsWith( "1.1" ) )
+ {
+ // JDK 1.1
+ baseLauncher = new Java11CommandLauncher();
+ }
+ else
+ {
+ // JDK 1.2
+ baseLauncher = new CommandLauncher();
+ }
+
+ shellLauncher = new PerlScriptCommandLauncher( "bin/antRun.pl", baseLauncher );
}
else
{
- // JDK 1.2
- baseLauncher = new CommandLauncher();
+ // Generic
+ shellLauncher = new ScriptCommandLauncher( "bin/antRun", new CommandLauncher() );
}
-
- shellLauncher = new PerlScriptCommandLauncher( "bin/antRun.pl", baseLauncher );
}
- else
+ catch( TaskException e )
{
- // Generic
- shellLauncher = new ScriptCommandLauncher( "bin/antRun", new CommandLauncher() );
+ e.printStackTrace();
}
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteOn.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteOn.java
index 84cff357b..a60733c6c 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteOn.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteOn.java
@@ -82,6 +82,7 @@ public class ExecuteOn extends ExecTask
* @param skip The new SkipEmptyFilesets value
*/
public void setSkipEmptyFilesets( boolean skip )
+ throws TaskException
{
skipEmpty = skip;
}
@@ -130,6 +131,7 @@ public class ExecuteOn extends ExecTask
* @return Description of the Returned Value
*/
public Commandline.Marker createSrcfile()
+ throws TaskException
{
if( srcFilePos != null )
{
@@ -146,6 +148,7 @@ public class ExecuteOn extends ExecTask
* @return Description of the Returned Value
*/
public Commandline.Marker createTargetfile()
+ throws TaskException
{
if( targetFilePos != null )
{
@@ -343,6 +346,7 @@ public class ExecuteOn extends ExecTask
}
protected void checkConfiguration()
+ throws TaskException
{
super.checkConfiguration();
if( filesets.size() == 0 )
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteStreamHandler.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteStreamHandler.java
index 4129b61d2..a8a24ae8b 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteStreamHandler.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteStreamHandler.java
@@ -10,6 +10,7 @@ package org.apache.tools.ant.taskdefs;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import org.apache.myrmidon.api.TaskException;
/**
* Used by Execute
to handle input and output stream of
@@ -19,7 +20,6 @@ import java.io.OutputStream;
*/
public interface ExecuteStreamHandler
{
-
/**
* Install a handler for the input stream of the subprocess.
*
@@ -59,5 +59,6 @@ public interface ExecuteStreamHandler
/**
* Stop handling of the streams - will not be restarted.
*/
- void stop();
+ void stop()
+ throws TaskException;
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Input.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Input.java
index 21903f655..730c4a470 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Input.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Input.java
@@ -12,6 +12,7 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.Vector;
+import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
@@ -86,6 +87,7 @@ public class Input extends Task
* @param msg The feature to be added to the Text attribute
*/
public void addText( String msg )
+ throws TaskException
{
message += project.replaceProperties( msg );
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Jar.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Jar.java
index 37877733c..9181dcfc6 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Jar.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Jar.java
@@ -73,6 +73,7 @@ public class Jar extends Zip
}
public void setManifest( File manifestFile )
+ throws TaskException
{
if( !manifestFile.exists() )
{
@@ -124,7 +125,7 @@ public class Jar extends Zip
}
public void addConfiguredManifest( Manifest newManifest )
- throws ManifestException
+ throws ManifestException, TaskException
{
if( manifest == null )
{
@@ -265,7 +266,7 @@ public class Jar extends Zip
}
protected void zipFile( File file, ZipOutputStream zOut, String vPath )
- throws IOException
+ throws IOException, TaskException
{
// If the file being added is META-INF/MANIFEST.MF, we warn if it's not the
// one specified in the "manifest" attribute - or if it's being added twice,
@@ -284,7 +285,7 @@ public class Jar extends Zip
}
protected void zipFile( InputStream is, ZipOutputStream zOut, String vPath, long lastModified )
- throws IOException
+ throws IOException, TaskException
{
// If the file being added is META-INF/MANIFEST.MF, we merge it with the
// current manifest
@@ -315,7 +316,7 @@ public class Jar extends Zip
* and adding it to the zip stream.
*/
private void createIndexList( ZipOutputStream zOut )
- throws IOException
+ throws IOException, TaskException
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
// encoding must be UTF8 as specified in the specs.
@@ -371,7 +372,7 @@ public class Jar extends Zip
* @exception IOException Description of Exception
*/
private void zipManifestEntry( InputStream is )
- throws IOException
+ throws IOException, TaskException
{
try
{
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Java.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Java.java
index 24972620c..73a945851 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Java.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Java.java
@@ -61,6 +61,7 @@ public class Java extends Task
* @param s The new Classpath value
*/
public void setClasspath( Path s )
+ throws TaskException
{
createClasspath().append( s );
}
@@ -71,6 +72,7 @@ public class Java extends Task
* @param r The new ClasspathRef value
*/
public void setClasspathRef( Reference r )
+ throws TaskException
{
createClasspath().setRefid( r );
}
@@ -190,6 +192,7 @@ public class Java extends Task
* @return Description of the Returned Value
*/
public Path createClasspath()
+ throws TaskException
{
return cmdl.createClasspath( project ).createPath();
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Javac.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Javac.java
index 24418bcb5..a25188526 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Javac.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Javac.java
@@ -94,6 +94,7 @@ public class Javac extends MatchingTask
* @param r The new BootClasspathRef value
*/
public void setBootClasspathRef( Reference r )
+ throws TaskException
{
createBootclasspath().setRefid( r );
}
@@ -104,6 +105,7 @@ public class Javac extends MatchingTask
* @param bootclasspath The new Bootclasspath value
*/
public void setBootclasspath( Path bootclasspath )
+ throws TaskException
{
if( this.bootclasspath == null )
{
@@ -121,6 +123,7 @@ public class Javac extends MatchingTask
* @param classpath The new Classpath value
*/
public void setClasspath( Path classpath )
+ throws TaskException
{
if( compileClasspath == null )
{
@@ -138,6 +141,7 @@ public class Javac extends MatchingTask
* @param r The new ClasspathRef value
*/
public void setClasspathRef( Reference r )
+ throws TaskException
{
createClasspath().setRefid( r );
}
@@ -209,6 +213,7 @@ public class Javac extends MatchingTask
* @param extdirs The new Extdirs value
*/
public void setExtdirs( Path extdirs )
+ throws TaskException
{
if( this.extdirs == null )
{
@@ -345,6 +350,7 @@ public class Javac extends MatchingTask
* @param srcDir The new Srcdir value
*/
public void setSrcdir( Path srcDir )
+ throws TaskException
{
if( src == null )
{
@@ -649,6 +655,7 @@ public class Javac extends MatchingTask
* @return Description of the Returned Value
*/
public Path createBootclasspath()
+ throws TaskException
{
if( bootclasspath == null )
{
@@ -663,6 +670,7 @@ public class Javac extends MatchingTask
* @return Description of the Returned Value
*/
public Path createClasspath()
+ throws TaskException
{
if( compileClasspath == null )
{
@@ -690,6 +698,7 @@ public class Javac extends MatchingTask
* @return Description of the Returned Value
*/
public Path createExtdirs()
+ throws TaskException
{
if( extdirs == null )
{
@@ -704,6 +713,7 @@ public class Javac extends MatchingTask
* @return a nested src element.
*/
public Path createSrc()
+ throws TaskException
{
if( src == null )
{
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Manifest.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Manifest.java
index 2795b2188..947889912 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Manifest.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Manifest.java
@@ -91,6 +91,7 @@ public class Manifest extends Task
* Construct an empty manifest
*/
public Manifest()
+ throws TaskException
{
mode = new Mode();
mode.setValue( "replace" );
@@ -244,7 +245,7 @@ public class Manifest extends Task
}
public void addConfiguredSection( Section section )
- throws ManifestException
+ throws ManifestException, TaskException
{
if( section.getName() == null )
{
@@ -360,9 +361,7 @@ public class Manifest extends Task
}
catch( IOException e )
{
- throw new TaskException( "Failed to write " + manifestFile
-
- e );
+ throw new TaskException( "Failed to write " + manifestFile, e );
}
finally
{
@@ -726,7 +725,7 @@ public class Manifest extends Task
* section.
*/
public String addAttributeAndCheck( Attribute attribute )
- throws ManifestException
+ throws ManifestException, TaskException
{
if( attribute.getName() == null || attribute.getValue() == null )
{
@@ -773,7 +772,7 @@ public class Manifest extends Task
}
public void addConfiguredAttribute( Attribute attribute )
- throws ManifestException
+ throws ManifestException, TaskException
{
String check = addAttributeAndCheck( attribute );
if( check != null )
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/MatchingTask.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/MatchingTask.java
index cc758cee3..fe4031107 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/MatchingTask.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/MatchingTask.java
@@ -141,6 +141,7 @@ public abstract class MatchingTask extends Task
* @return Description of the Returned Value
*/
public PatternSet createPatternSet()
+ throws TaskException
{
return fileset.createPatternSet();
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Pack.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Pack.java
index 7064cec4a..dc6c88b93 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Pack.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Pack.java
@@ -45,7 +45,8 @@ public abstract class Pack extends Task
pack();
}
- protected abstract void pack();
+ protected abstract void pack()
+ throws TaskException;
protected void zipFile( File file, OutputStream zOut )
throws IOException
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Unpack.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Unpack.java
index cc449a245..4b732d772 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Unpack.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Unpack.java
@@ -44,7 +44,8 @@ public abstract class Unpack extends Task
protected abstract String getDefaultExtension();
- protected abstract void extract();
+ protected abstract void extract()
+ throws TaskException;
private void createDestFile( String defaultExtension )
{
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/War.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/War.java
index 8e1649fa0..328cf7e00 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/War.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/War.java
@@ -90,7 +90,7 @@ public class War extends Jar
}
protected void zipFile( File file, ZipOutputStream zOut, String vPath )
- throws IOException
+ throws IOException, TaskException
{
// If the file being added is WEB-INF/web.xml, we warn if it's not the
// one specified in the "webxml" attribute - or if it's being added twice,
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Zip.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Zip.java
index 5bd0059de..bd3c5beb1 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Zip.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Zip.java
@@ -71,6 +71,7 @@ public class Zip extends MatchingTask
private String encoding;
protected static String[][] grabFileNames( FileScanner[] scanners )
+ throws TaskException
{
String[][] result = new String[ scanners.length ][];
for( int i = 0; i < scanners.length; i++ )
@@ -84,11 +85,6 @@ public class Zip extends MatchingTask
return result;
}
- protected static File[] grabFiles( FileScanner[] scanners )
- {
- return grabFiles( scanners, grabFileNames( scanners ) );
- }
-
protected static File[] grabFiles( FileScanner[] scanners,
String[][] fileNames )
{
@@ -477,7 +473,7 @@ public class Zip extends MatchingTask
*/
protected void addFiles( FileScanner scanner, ZipOutputStream zOut,
String prefix, String fullpath )
- throws IOException
+ throws IOException, TaskException
{
if( prefix.length() > 0 && fullpath.length() > 0 )
throw new TaskException( "Both prefix and fullpath attributes may not be set on the same fileset." );
@@ -534,7 +530,7 @@ public class Zip extends MatchingTask
* @exception IOException Description of Exception
*/
protected void addFiles( Vector filesets, ZipOutputStream zOut )
- throws IOException
+ throws IOException, TaskException
{
// Add each fileset in the Vector.
for( int i = 0; i < filesets.size(); i++ )
@@ -630,7 +626,7 @@ public class Zip extends MatchingTask
protected void addZipEntries( ZipFileSet fs, DirectoryScanner ds,
ZipOutputStream zOut, String prefix, String fullpath )
- throws IOException
+ throws IOException, TaskException
{
if( prefix.length() > 0 && fullpath.length() > 0 )
throw new TaskException( "Both prefix and fullpath attributes may not be set on the same fileset." );
@@ -703,6 +699,7 @@ public class Zip extends MatchingTask
* @return true if the file is then considered up to date.
*/
protected boolean createEmptyZip( File zipFile )
+ throws TaskException
{
// In this case using java.util.zip will not work
// because it does not permit a zero-entry archive.
@@ -777,7 +774,7 @@ public class Zip extends MatchingTask
protected void zipFile( InputStream in, ZipOutputStream zOut, String vPath,
long lastModified )
- throws IOException
+ throws IOException, TaskException
{
ZipEntry ze = new ZipEntry( vPath );
ze.setTime( lastModified );
@@ -846,7 +843,7 @@ public class Zip extends MatchingTask
}
protected void zipFile( File file, ZipOutputStream zOut, String vPath )
- throws IOException
+ throws IOException, TaskException
{
if( file.equals( zipFile ) )
{
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
index d8263ddf5..74fe6ef4c 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
@@ -93,6 +93,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
}
protected Commandline setupJavacCommand()
+ throws TaskException
{
return setupJavacCommand( false );
}
@@ -105,6 +106,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
* @return Description of the Returned Value
*/
protected Commandline setupJavacCommand( boolean debugLevelCheck )
+ throws TaskException
{
Commandline cmd = new Commandline();
setupJavacCommandlineSwitches( cmd, debugLevelCheck );
@@ -112,11 +114,6 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
return cmd;
}
- protected Commandline setupJavacCommandlineSwitches( Commandline cmd )
- {
- return setupJavacCommandlineSwitches( cmd, false );
- }
-
/**
* Does the command line argument processing common to classic and modern.
* Doesn't add the files to compile.
@@ -127,6 +124,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
*/
protected Commandline setupJavacCommandlineSwitches( Commandline cmd,
boolean useDebugLevel )
+ throws TaskException
{
Path classpath = getCompileClasspath();
@@ -292,6 +290,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
* @return Description of the Returned Value
*/
protected Commandline setupModernJavacCommand()
+ throws TaskException
{
Commandline cmd = new Commandline();
setupModernJavacCommandlineSwitches( cmd );
@@ -308,6 +307,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
* @return Description of the Returned Value
*/
protected Commandline setupModernJavacCommandlineSwitches( Commandline cmd )
+ throws TaskException
{
setupJavacCommandlineSwitches( cmd, true );
if( attributes.getSource() != null )
@@ -324,6 +324,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
* @return The CompileClasspath value
*/
protected Path getCompileClasspath()
+ throws TaskException
{
Path classpath = new Path( project );
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Gcj.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Gcj.java
index 015b4dc9a..6656f2291 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Gcj.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Gcj.java
@@ -42,6 +42,7 @@ public class Gcj extends DefaultCompilerAdapter
}
protected Commandline setupGCJCommand()
+ throws TaskException
{
Commandline cmd = new Commandline();
Path classpath = new Path( project );
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Kjc.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Kjc.java
index d0d3ca27f..a497f208d 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Kjc.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Kjc.java
@@ -64,6 +64,7 @@ public class Kjc extends DefaultCompilerAdapter
* @return Description of the Returned Value
*/
protected Commandline setupKjcCommand()
+ throws TaskException
{
Commandline cmd = new Commandline();
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/IContract.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/IContract.java
index 7d6980d65..50a881fb5 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/IContract.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/IContract.java
@@ -1064,6 +1064,7 @@ public class IContract extends MatchingTask
// make it public
public void modify( Path path )
+ throws TaskException
{
// depending on what compiler to use, set the includeJavaRuntime flag
if( "jikes".equals( compiler ) )
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
index 969c125ac..901a56f2d 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
@@ -239,6 +239,7 @@ public class ReplaceRegExp extends Task
Substitution s,
String input,
int options )
+ throws TaskException
{
String res = input;
Regexp regexp = r.getRegexp( project );
@@ -259,7 +260,7 @@ public class ReplaceRegExp extends Task
* @exception IOException Description of Exception
*/
protected void doReplace( File f, int options )
- throws IOException
+ throws IOException, TaskException
{
File parentDir = new File( new File( f.getAbsolutePath() ).getParent() );
File temp = fileUtils.createTempFile( "replace", ".txt", parentDir );
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
index 378c5d1ce..46e42abec 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
@@ -480,6 +480,7 @@ public class BorlandDeploymentTool extends GenericDeploymentTool implements Exec
* @param sourceJar java.io.File representing the produced jar file
*/
private void verifyBorlandJar( File sourceJar )
+ throws TaskException
{
org.apache.tools.ant.taskdefs.Java javaTask = null;
log( "verify " + sourceJar, Project.MSG_INFO );
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
index 7a239fd92..7fc44bf0e 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
@@ -343,6 +343,7 @@ public class WLRun extends Task
}
private void executeWLS6()
+ throws TaskException
{
File securityPolicyFile = findSecurityPolicyFile( DEFAULT_WL60_POLICY_FILE );
if( !beaHome.isDirectory() )
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
index 5cd1f56b0..cacfb1640 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
@@ -747,6 +747,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool
* @param publicId Description of Parameter
*/
private void buildWeblogicJar( File sourceJar, File destJar, String publicId )
+ throws TaskException
{
org.apache.tools.ant.taskdefs.Java javaTask = null;
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
index abb75100e..e234767c6 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
@@ -878,10 +878,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool
File genericJarFile = super.getVendorOutputJarFile( baseName );
super.writeJar( baseName, genericJarFile, files, publicId );
-
-
// create the output .jar, if required
-
if( alwaysRebuild || isRebuildRequired( genericJarFile, jarFile ) )
{
buildWebsphereJar( genericJarFile, jarFile );
@@ -939,6 +936,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool
* jarfile.
*/
private void buildWebsphereJar( File sourceJar, File destJar )
+ throws TaskException
{
try
{
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
index a711952f4..0611be656 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
@@ -19,7 +19,8 @@ import org.apache.tools.ant.types.Commandline;
*
* @author Matthew Watson mattw@i3sp.com
*/
-public class JasperC extends DefaultCompilerAdapter
+public class JasperC
+ extends DefaultCompilerAdapter
{
/*
* ------------------------------------------------------------
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/FileSet.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/FileSet.java
index fdab4b91e..ca5fd88a6 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/FileSet.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/FileSet.java
@@ -274,6 +274,7 @@ public class FileSet extends DataType implements Cloneable
}
catch( TaskException e )
{
+ throw new IllegalStateException( e.getMessage() );
}
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/RegularExpression.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/RegularExpression.java
index a89fccdf4..fa07f6fc1 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/RegularExpression.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/RegularExpression.java
@@ -108,9 +108,12 @@ public class RegularExpression extends DataType
}
public Regexp getRegexp( Project p )
+ throws TaskException
{
if( isReference() )
+ {
return getRef( p ).getRegexp( p );
+ }
return this.regexp;
}