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:31:39 UTC
cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types FileSet.java RegularExpression.java
donaldp 01/12/15 17:31:39
Modified: proposal/myrmidon/src/main/org/apache/tools/ant
AntClassLoader.java Launcher.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs
Chmod.java Copy.java Delete.java Ear.java
ExecTask.java Execute.java ExecuteOn.java
ExecuteStreamHandler.java Input.java Jar.java
Java.java Javac.java Manifest.java
MatchingTask.java Pack.java Unpack.java War.java
Zip.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers
DefaultCompilerAdapter.java Gcj.java Kjc.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional
IContract.java ReplaceRegExp.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb
BorlandDeploymentTool.java WLRun.java
WeblogicDeploymentTool.java
WebsphereDeploymentTool.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers
JasperC.java
proposal/myrmidon/src/main/org/apache/tools/ant/types
FileSet.java RegularExpression.java
Log:
BuildException -> TaskException
Yay - down to 180 errors!!!!!!!!!!!!!!!!!!!!!
Revision Changes Path
1.5 +4 -11 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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AntClassLoader.java 2001/12/16 01:01:19 1.4
+++ AntClassLoader.java 2001/12/16 01:31:37 1.5
@@ -1086,17 +1086,10 @@
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;
}
1.3 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/Launcher.java
Index: Launcher.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/Launcher.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Launcher.java 2001/12/15 15:20:23 1.2
+++ Launcher.java 2001/12/16 01:31:37 1.3
@@ -103,6 +103,7 @@
}
private static void addToolsJar( AntClassLoader antLoader )
+ throws TaskException
{
String javaHome = System.getProperty( "java.home" );
if( javaHome.endsWith( "jre" ) )
1.4 +11 -5 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Chmod.java
Index: Chmod.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Chmod.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Chmod.java 2001/12/16 00:38:01 1.3
+++ Chmod.java 2001/12/16 01:31:37 1.4
@@ -38,11 +38,6 @@
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 @@
* 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 @@
* @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 @@
* @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 void setSkipEmptyFilesets( boolean skip )
+ throws TaskException
{
throw new TaskException( taskType + " doesn\'t support the skipemptyfileset attribute" );
}
@@ -114,6 +116,7 @@
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createExclude()
+ throws TaskException
{
defaultSetDefined = true;
return defaultSet.createExclude();
@@ -125,6 +128,7 @@
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createInclude()
+ throws TaskException
{
defaultSetDefined = true;
return defaultSet.createInclude();
@@ -136,6 +140,7 @@
* @return Description of the Returned Value
*/
public PatternSet createPatternSet()
+ throws TaskException
{
defaultSetDefined = true;
return defaultSet.createPatternSet();
@@ -176,6 +181,7 @@
}
protected void checkConfiguration()
+ throws TaskException
{
if( !havePerm )
{
1.5 +1 -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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Copy.java 2001/12/16 01:01:19 1.4
+++ Copy.java 2001/12/16 01:31:37 1.5
@@ -330,6 +330,7 @@
* good method for subclasses to override.
*/
protected void doFileOperations()
+ throws TaskException
{
if( fileCopyMap.size() > 0 )
{
1.5 +3 -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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Delete.java 2001/12/16 01:01:19 1.4
+++ Delete.java 2001/12/16 01:31:37 1.5
@@ -223,6 +223,7 @@
* @return Description of the Returned Value
*/
public PatternSet createPatternSet()
+ throws TaskException
{
usedMatchingTask = true;
return super.createPatternSet();
@@ -355,6 +356,7 @@
//************************************************************************
protected void removeDir( File d )
+ throws TaskException
{
String[] list = d.list();
if( list == null )
@@ -402,6 +404,7 @@
* @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 )
{
1.4 +1 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Ear.java
Index: Ear.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Ear.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Ear.java 2001/12/16 00:38:01 1.3
+++ Ear.java 2001/12/16 01:31:37 1.4
@@ -79,7 +79,7 @@
}
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,
1.5 +2 -0 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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ExecTask.java 2001/12/16 01:01:19 1.4
+++ ExecTask.java 2001/12/16 01:31:38 1.5
@@ -59,6 +59,7 @@
* @param d The new Dir value
*/
public void setDir( File d )
+ throws TaskException
{
this.dir = d;
}
@@ -69,6 +70,7 @@
* @param value The new Executable value
*/
public void setExecutable( String value )
+ throws TaskException
{
cmdl.setExecutable( value );
}
1.6 +62 -54 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.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Execute.java 2001/12/16 01:01:19 1.5
+++ Execute.java 2001/12/16 01:31:38 1.6
@@ -64,78 +64,86 @@
*/
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" ) )
{
- // JDK 1.1
- baseLauncher = new Java11CommandLauncher();
+ // 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() )
+ {
+ // 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();
}
}
1.5 +4 -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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ExecuteOn.java 2001/12/16 01:01:19 1.4
+++ ExecuteOn.java 2001/12/16 01:31:38 1.5
@@ -82,6 +82,7 @@
* @param skip The new SkipEmptyFilesets value
*/
public void setSkipEmptyFilesets( boolean skip )
+ throws TaskException
{
skipEmpty = skip;
}
@@ -130,6 +131,7 @@
* @return Description of the Returned Value
*/
public Commandline.Marker createSrcfile()
+ throws TaskException
{
if( srcFilePos != null )
{
@@ -146,6 +148,7 @@
* @return Description of the Returned Value
*/
public Commandline.Marker createTargetfile()
+ throws TaskException
{
if( targetFilePos != null )
{
@@ -343,6 +346,7 @@
}
protected void checkConfiguration()
+ throws TaskException
{
super.checkConfiguration();
if( filesets.size() == 0 )
1.3 +3 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteStreamHandler.java
Index: ExecuteStreamHandler.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteStreamHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ExecuteStreamHandler.java 2001/12/16 00:38:01 1.2
+++ ExecuteStreamHandler.java 2001/12/16 01:31:38 1.3
@@ -10,6 +10,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import org.apache.myrmidon.api.TaskException;
/**
* Used by <code>Execute</code> to handle input and output stream of
@@ -19,7 +20,6 @@
*/
public interface ExecuteStreamHandler
{
-
/**
* Install a handler for the input stream of the subprocess.
*
@@ -59,5 +59,6 @@
/**
* Stop handling of the streams - will not be restarted.
*/
- void stop();
+ void stop()
+ throws TaskException;
}
1.3 +2 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Input.java
Index: Input.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Input.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Input.java 2001/12/16 00:38:01 1.2
+++ Input.java 2001/12/16 01:31:38 1.3
@@ -12,6 +12,7 @@
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 @@
* @param msg The feature to be added to the Text attribute
*/
public void addText( String msg )
+ throws TaskException
{
message += project.replaceProperties( msg );
}
1.4 +6 -5 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Jar.java
Index: Jar.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Jar.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Jar.java 2001/12/16 00:38:01 1.3
+++ Jar.java 2001/12/16 01:31:38 1.4
@@ -73,6 +73,7 @@
}
public void setManifest( File manifestFile )
+ throws TaskException
{
if( !manifestFile.exists() )
{
@@ -124,7 +125,7 @@
}
public void addConfiguredManifest( Manifest newManifest )
- throws ManifestException
+ throws ManifestException, TaskException
{
if( manifest == null )
{
@@ -265,7 +266,7 @@
}
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 @@
}
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 @@
* 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 @@
* @exception IOException Description of Exception
*/
private void zipManifestEntry( InputStream is )
- throws IOException
+ throws IOException, TaskException
{
try
{
1.4 +3 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java
Index: Java.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Java.java 2001/12/16 00:38:01 1.3
+++ Java.java 2001/12/16 01:31:38 1.4
@@ -61,6 +61,7 @@
* @param s The new Classpath value
*/
public void setClasspath( Path s )
+ throws TaskException
{
createClasspath().append( s );
}
@@ -71,6 +72,7 @@
* @param r The new ClasspathRef value
*/
public void setClasspathRef( Reference r )
+ throws TaskException
{
createClasspath().setRefid( r );
}
@@ -190,6 +192,7 @@
* @return Description of the Returned Value
*/
public Path createClasspath()
+ throws TaskException
{
return cmdl.createClasspath( project ).createPath();
}
1.5 +10 -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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Javac.java 2001/12/16 01:01:19 1.4
+++ Javac.java 2001/12/16 01:31:38 1.5
@@ -94,6 +94,7 @@
* @param r The new BootClasspathRef value
*/
public void setBootClasspathRef( Reference r )
+ throws TaskException
{
createBootclasspath().setRefid( r );
}
@@ -104,6 +105,7 @@
* @param bootclasspath The new Bootclasspath value
*/
public void setBootclasspath( Path bootclasspath )
+ throws TaskException
{
if( this.bootclasspath == null )
{
@@ -121,6 +123,7 @@
* @param classpath The new Classpath value
*/
public void setClasspath( Path classpath )
+ throws TaskException
{
if( compileClasspath == null )
{
@@ -138,6 +141,7 @@
* @param r The new ClasspathRef value
*/
public void setClasspathRef( Reference r )
+ throws TaskException
{
createClasspath().setRefid( r );
}
@@ -209,6 +213,7 @@
* @param extdirs The new Extdirs value
*/
public void setExtdirs( Path extdirs )
+ throws TaskException
{
if( this.extdirs == null )
{
@@ -345,6 +350,7 @@
* @param srcDir The new Srcdir value
*/
public void setSrcdir( Path srcDir )
+ throws TaskException
{
if( src == null )
{
@@ -649,6 +655,7 @@
* @return Description of the Returned Value
*/
public Path createBootclasspath()
+ throws TaskException
{
if( bootclasspath == null )
{
@@ -663,6 +670,7 @@
* @return Description of the Returned Value
*/
public Path createClasspath()
+ throws TaskException
{
if( compileClasspath == null )
{
@@ -690,6 +698,7 @@
* @return Description of the Returned Value
*/
public Path createExtdirs()
+ throws TaskException
{
if( extdirs == null )
{
@@ -704,6 +713,7 @@
* @return a nested src element.
*/
public Path createSrc()
+ throws TaskException
{
if( src == null )
{
1.5 +5 -6 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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Manifest.java 2001/12/16 01:01:19 1.4
+++ Manifest.java 2001/12/16 01:31:38 1.5
@@ -91,6 +91,7 @@
* Construct an empty manifest
*/
public Manifest()
+ throws TaskException
{
mode = new Mode();
mode.setValue( "replace" );
@@ -244,7 +245,7 @@
}
public void addConfiguredSection( Section section )
- throws ManifestException
+ throws ManifestException, TaskException
{
if( section.getName() == null )
{
@@ -360,9 +361,7 @@
}
catch( IOException e )
{
- throw new TaskException( "Failed to write " + manifestFile
-
- e );
+ throw new TaskException( "Failed to write " + manifestFile, e );
}
finally
{
@@ -726,7 +725,7 @@
* section.
*/
public String addAttributeAndCheck( Attribute attribute )
- throws ManifestException
+ throws ManifestException, TaskException
{
if( attribute.getName() == null || attribute.getValue() == null )
{
@@ -773,7 +772,7 @@
}
public void addConfiguredAttribute( Attribute attribute )
- throws ManifestException
+ throws ManifestException, TaskException
{
String check = addAttributeAndCheck( attribute );
if( check != null )
1.5 +1 -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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- MatchingTask.java 2001/12/16 01:01:19 1.4
+++ MatchingTask.java 2001/12/16 01:31:38 1.5
@@ -141,6 +141,7 @@
* @return Description of the Returned Value
*/
public PatternSet createPatternSet()
+ throws TaskException
{
return fileset.createPatternSet();
}
1.5 +2 -1 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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Pack.java 2001/12/16 01:01:19 1.4
+++ Pack.java 2001/12/16 01:31:38 1.5
@@ -45,7 +45,8 @@
pack();
}
- protected abstract void pack();
+ protected abstract void pack()
+ throws TaskException;
protected void zipFile( File file, OutputStream zOut )
throws IOException
1.4 +2 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Unpack.java
Index: Unpack.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Unpack.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Unpack.java 2001/12/16 00:38:01 1.3
+++ Unpack.java 2001/12/16 01:31:38 1.4
@@ -44,7 +44,8 @@
protected abstract String getDefaultExtension();
- protected abstract void extract();
+ protected abstract void extract()
+ throws TaskException;
private void createDestFile( String defaultExtension )
{
1.4 +1 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/War.java
Index: War.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/War.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- War.java 2001/12/16 00:38:01 1.3
+++ War.java 2001/12/16 01:31:38 1.4
@@ -90,7 +90,7 @@
}
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,
1.4 +7 -10 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java
Index: Zip.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Zip.java 2001/12/16 00:38:01 1.3
+++ Zip.java 2001/12/16 01:31:38 1.4
@@ -71,6 +71,7 @@
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 @@
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 @@
*/
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 @@
* @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 @@
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 @@
* @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 @@
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 @@
}
protected void zipFile( File file, ZipOutputStream zOut, String vPath )
- throws IOException
+ throws IOException, TaskException
{
if( file.equals( zipFile ) )
{
1.4 +6 -5 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
Index: DefaultCompilerAdapter.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DefaultCompilerAdapter.java 2001/12/16 00:38:30 1.3
+++ DefaultCompilerAdapter.java 2001/12/16 01:31:38 1.4
@@ -93,6 +93,7 @@
}
protected Commandline setupJavacCommand()
+ throws TaskException
{
return setupJavacCommand( false );
}
@@ -105,6 +106,7 @@
* @return Description of the Returned Value
*/
protected Commandline setupJavacCommand( boolean debugLevelCheck )
+ throws TaskException
{
Commandline cmd = new Commandline();
setupJavacCommandlineSwitches( cmd, debugLevelCheck );
@@ -112,11 +114,6 @@
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 @@
*/
protected Commandline setupJavacCommandlineSwitches( Commandline cmd,
boolean useDebugLevel )
+ throws TaskException
{
Path classpath = getCompileClasspath();
@@ -292,6 +290,7 @@
* @return Description of the Returned Value
*/
protected Commandline setupModernJavacCommand()
+ throws TaskException
{
Commandline cmd = new Commandline();
setupModernJavacCommandlineSwitches( cmd );
@@ -308,6 +307,7 @@
* @return Description of the Returned Value
*/
protected Commandline setupModernJavacCommandlineSwitches( Commandline cmd )
+ throws TaskException
{
setupJavacCommandlineSwitches( cmd, true );
if( attributes.getSource() != null )
@@ -324,6 +324,7 @@
* @return The CompileClasspath value
*/
protected Path getCompileClasspath()
+ throws TaskException
{
Path classpath = new Path( project );
1.3 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java
Index: Gcj.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Gcj.java 2001/12/16 00:38:30 1.2
+++ Gcj.java 2001/12/16 01:31:38 1.3
@@ -42,6 +42,7 @@
}
protected Commandline setupGCJCommand()
+ throws TaskException
{
Commandline cmd = new Commandline();
Path classpath = new Path( project );
1.4 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Kjc.java
Index: Kjc.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Kjc.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Kjc.java 2001/12/16 00:38:30 1.3
+++ Kjc.java 2001/12/16 01:31:38 1.4
@@ -64,6 +64,7 @@
* @return Description of the Returned Value
*/
protected Commandline setupKjcCommand()
+ throws TaskException
{
Commandline cmd = new Commandline();
1.4 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java
Index: IContract.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- IContract.java 2001/12/16 00:33:54 1.3
+++ IContract.java 2001/12/16 01:31:38 1.4
@@ -1064,6 +1064,7 @@
// make it public
public void modify( Path path )
+ throws TaskException
{
// depending on what compiler to use, set the includeJavaRuntime flag
if( "jikes".equals( compiler ) )
1.3 +2 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
Index: ReplaceRegExp.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ReplaceRegExp.java 2001/12/16 00:33:54 1.2
+++ ReplaceRegExp.java 2001/12/16 01:31:38 1.3
@@ -239,6 +239,7 @@
Substitution s,
String input,
int options )
+ throws TaskException
{
String res = input;
Regexp regexp = r.getRegexp( project );
@@ -259,7 +260,7 @@
* @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 );
1.4 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
Index: BorlandDeploymentTool.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BorlandDeploymentTool.java 2001/12/16 00:37:02 1.3
+++ BorlandDeploymentTool.java 2001/12/16 01:31:38 1.4
@@ -480,6 +480,7 @@
* @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 );
1.4 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
Index: WLRun.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- WLRun.java 2001/12/16 00:37:02 1.3
+++ WLRun.java 2001/12/16 01:31:38 1.4
@@ -343,6 +343,7 @@
}
private void executeWLS6()
+ throws TaskException
{
File securityPolicyFile = findSecurityPolicyFile( DEFAULT_WL60_POLICY_FILE );
if( !beaHome.isDirectory() )
1.4 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
Index: WeblogicDeploymentTool.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- WeblogicDeploymentTool.java 2001/12/16 00:37:02 1.3
+++ WeblogicDeploymentTool.java 2001/12/16 01:31:38 1.4
@@ -747,6 +747,7 @@
* @param publicId Description of Parameter
*/
private void buildWeblogicJar( File sourceJar, File destJar, String publicId )
+ throws TaskException
{
org.apache.tools.ant.taskdefs.Java javaTask = null;
1.3 +1 -3 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
Index: WebsphereDeploymentTool.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- WebsphereDeploymentTool.java 2001/12/15 15:20:24 1.2
+++ WebsphereDeploymentTool.java 2001/12/16 01:31:38 1.3
@@ -878,10 +878,7 @@
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 @@
* jarfile.
*/
private void buildWebsphereJar( File sourceJar, File destJar )
+ throws TaskException
{
try
{
1.4 +2 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
Index: JasperC.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- JasperC.java 2001/12/16 00:36:07 1.3
+++ JasperC.java 2001/12/16 01:31:39 1.4
@@ -19,7 +19,8 @@
*
* @author Matthew Watson <a href="mailto:mattw@i3sp.com">mattw@i3sp.com</a>
*/
-public class JasperC extends DefaultCompilerAdapter
+public class JasperC
+ extends DefaultCompilerAdapter
{
/*
* ------------------------------------------------------------
1.5 +1 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/FileSet.java
Index: FileSet.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/FileSet.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- FileSet.java 2001/12/16 00:38:47 1.4
+++ FileSet.java 2001/12/16 01:31:39 1.5
@@ -274,6 +274,7 @@
}
catch( TaskException e )
{
+ throw new IllegalStateException( e.getMessage() );
}
}
1.3 +3 -0 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/RegularExpression.java
Index: RegularExpression.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/RegularExpression.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RegularExpression.java 2001/12/16 00:38:47 1.2
+++ RegularExpression.java 2001/12/16 01:31:39 1.3
@@ -108,9 +108,12 @@
}
public Regexp getRegexp( Project p )
+ throws TaskException
{
if( isReference() )
+ {
return getRef( p ).getRegexp( p );
+ }
return this.regexp;
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>