git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271189 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -9,11 +9,11 @@ package org.apache.antlib.build; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * Task as a layer on top of patch. Patch applies a diff file to an original. | * Task as a layer on top of patch. Patch applies a diff file to an original. | ||||
| @@ -10,12 +10,12 @@ package org.apache.antlib.cvslib; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.util.Properties; | import java.util.Properties; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| import org.apache.tools.ant.util.FileUtils; | import org.apache.tools.ant.util.FileUtils; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * Task to interact with a CVS repository. | * Task to interact with a CVS repository. | ||||
| @@ -151,8 +151,9 @@ public class Cvs | |||||
| final ExecManager execManager = (ExecManager)getService( ExecManager.class ); | final ExecManager execManager = (ExecManager)getService( ExecManager.class ); | ||||
| final Execute2 exe = new Execute2( execManager ); | final Execute2 exe = new Execute2( execManager ); | ||||
| setupLogger( exe ); | setupLogger( exe ); | ||||
| if( m_dest == null ) { | |||||
| m_dest = getBaseDirectory(); | |||||
| if( m_dest == null ) | |||||
| { | |||||
| m_dest = getBaseDirectory(); | |||||
| } | } | ||||
| exe.setWorkingDirectory( m_dest ); | exe.setWorkingDirectory( m_dest ); | ||||
| @@ -10,8 +10,8 @@ package org.apache.antlib.nativelib; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.util.Properties; | import java.util.Properties; | ||||
| import org.apache.aut.nativelib.Os; | |||||
| import org.apache.aut.nativelib.ExecManager; | import org.apache.aut.nativelib.ExecManager; | ||||
| import org.apache.aut.nativelib.Os; | |||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | import org.apache.avalon.excalibur.i18n.ResourceManager; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | import org.apache.avalon.excalibur.i18n.Resources; | ||||
| import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
| @@ -8,11 +8,11 @@ | |||||
| package org.apache.antlib.security; | package org.apache.antlib.security; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * Generates a key. | * Generates a key. | ||||
| @@ -13,6 +13,7 @@ import java.util.ArrayList; | |||||
| import java.util.Enumeration; | import java.util.Enumeration; | ||||
| import java.util.zip.ZipEntry; | import java.util.zip.ZipEntry; | ||||
| import java.util.zip.ZipFile; | import java.util.zip.ZipFile; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| @@ -20,7 +21,6 @@ import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.tools.ant.types.DirectoryScanner; | import org.apache.tools.ant.types.DirectoryScanner; | ||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| import org.apache.tools.ant.types.ScannerUtil; | import org.apache.tools.ant.types.ScannerUtil; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * Sign a archive. | * Sign a archive. | ||||
| @@ -182,7 +182,8 @@ public class TraXLiaison | |||||
| if( e.getLocator().getSystemId() != null ) | if( e.getLocator().getSystemId() != null ) | ||||
| { | { | ||||
| String url = e.getLocator().getSystemId(); | String url = e.getLocator().getSystemId(); | ||||
| if( url.startsWith( "file:///" ) ) { | |||||
| if( url.startsWith( "file:///" ) ) | |||||
| { | |||||
| url = url.substring( 8 ); | url = url.substring( 8 ); | ||||
| } | } | ||||
| msg.append( url ); | msg.append( url ); | ||||
| @@ -8,32 +8,26 @@ | |||||
| package org.apache.antlib.xml; | package org.apache.antlib.xml; | ||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.FileReader; | import java.io.FileReader; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.net.URL; | import java.net.URL; | ||||
| import java.net.URLClassLoader; | import java.net.URLClassLoader; | ||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Enumeration; | import java.util.Enumeration; | ||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.PathUtil; | import org.apache.tools.ant.types.PathUtil; | ||||
| import org.apache.tools.ant.types.ScannerUtil; | import org.apache.tools.ant.types.ScannerUtil; | ||||
| import org.xml.sax.EntityResolver; | import org.xml.sax.EntityResolver; | ||||
| import org.xml.sax.InputSource; | import org.xml.sax.InputSource; | ||||
| import org.xml.sax.Parser; | import org.xml.sax.Parser; | ||||
| import org.xml.sax.SAXException; | import org.xml.sax.SAXException; | ||||
| import org.xml.sax.SAXNotRecognizedException; | import org.xml.sax.SAXNotRecognizedException; | ||||
| import org.xml.sax.SAXNotSupportedException; | import org.xml.sax.SAXNotSupportedException; | ||||
| import org.xml.sax.XMLReader; | import org.xml.sax.XMLReader; | ||||
| import org.xml.sax.helpers.ParserAdapter; | import org.xml.sax.helpers.ParserAdapter; | ||||
| @@ -7,8 +7,6 @@ | |||||
| */ | */ | ||||
| package org.apache.antlib.xml; | package org.apache.antlib.xml; | ||||
| public final class XSLTParam | public final class XSLTParam | ||||
| { | { | ||||
| private String m_name; | private String m_name; | ||||
| @@ -8,8 +8,8 @@ | |||||
| package org.apache.antlib.xml; | package org.apache.antlib.xml; | ||||
| import java.io.File; | import java.io.File; | ||||
| import java.net.URLClassLoader; | |||||
| import java.net.URL; | import java.net.URL; | ||||
| import java.net.URLClassLoader; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| @@ -244,7 +244,8 @@ public class XSLTProcess | |||||
| for( int j = 0; j < dirs.length; ++j ) | for( int j = 0; j < dirs.length; ++j ) | ||||
| { | { | ||||
| list = new File( m_baseDir, dirs[ j ] ).list(); | list = new File( m_baseDir, dirs[ j ] ).list(); | ||||
| for( int i = 0; i < list.length; ++i ) { | |||||
| for( int i = 0; i < list.length; ++i ) | |||||
| { | |||||
| process( m_baseDir, list[ i ], m_destDir, stylesheet ); | process( m_baseDir, list[ i ], m_destDir, stylesheet ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -471,7 +472,8 @@ public class XSLTProcess | |||||
| catch( Exception ex ) | catch( Exception ex ) | ||||
| { | { | ||||
| getLogger().info( "Failed to process " + inFile ); | getLogger().info( "Failed to process " + inFile ); | ||||
| if( outFile != null ) { | |||||
| if( outFile != null ) | |||||
| { | |||||
| outFile.delete(); | outFile.delete(); | ||||
| } | } | ||||
| throw new TaskException( "Error", ex ); | throw new TaskException( "Error", ex ); | ||||
| @@ -175,7 +175,8 @@ public class CBZip2InputStream | |||||
| m_blockSize100k = newSize100k; | m_blockSize100k = newSize100k; | ||||
| if( newSize100k == 0 ) { | |||||
| if( newSize100k == 0 ) | |||||
| { | |||||
| return; | return; | ||||
| } | } | ||||
| @@ -303,7 +304,8 @@ public class CBZip2InputStream | |||||
| { | { | ||||
| m_rNToGo = RAND_NUMS[ m_rTPos ]; | m_rNToGo = RAND_NUMS[ m_rTPos ]; | ||||
| m_rTPos++; | m_rTPos++; | ||||
| if( m_rTPos == 512 ) { | |||||
| if( m_rTPos == 512 ) | |||||
| { | |||||
| m_rTPos = 0; | m_rTPos = 0; | ||||
| } | } | ||||
| } | } | ||||
| @@ -342,7 +344,8 @@ public class CBZip2InputStream | |||||
| { | { | ||||
| m_rNToGo = RAND_NUMS[ m_rTPos ]; | m_rNToGo = RAND_NUMS[ m_rTPos ]; | ||||
| m_rTPos++; | m_rTPos++; | ||||
| if( m_rTPos == 512 ) { | |||||
| if( m_rTPos == 512 ) | |||||
| { | |||||
| m_rTPos = 0; | m_rTPos = 0; | ||||
| } | } | ||||
| } | } | ||||
| @@ -467,11 +470,14 @@ public class CBZip2InputStream | |||||
| int N = 1; | int N = 1; | ||||
| do | do | ||||
| { | { | ||||
| if( nextSym == RUNA ) { | |||||
| if( nextSym == RUNA ) | |||||
| { | |||||
| s = s + ( 0 + 1 ) * N; | s = s + ( 0 + 1 ) * N; | ||||
| } else if( nextSym == RUNB ) { | |||||
| } | |||||
| else if( nextSym == RUNB ) | |||||
| { | |||||
| s = s + ( 1 + 1 ) * N; | s = s + ( 1 + 1 ) * N; | ||||
| } | |||||
| } | |||||
| N = N * 2; | N = N * 2; | ||||
| if( groupPos == 0 ) | if( groupPos == 0 ) | ||||
| @@ -12,7 +12,6 @@ import java.io.IOException; | |||||
| import java.io.OutputStream; | import java.io.OutputStream; | ||||
| import org.apache.aut.nativelib.ExecOutputHandler; | import org.apache.aut.nativelib.ExecOutputHandler; | ||||
| /** | /** | ||||
| * Logs each line written to this stream to the specified | * Logs each line written to this stream to the specified | ||||
| * <code>ExecOutputHandler</code>. Tries to be smart about | * <code>ExecOutputHandler</code>. Tries to be smart about | ||||
| @@ -256,8 +256,9 @@ class ProcessMonitor | |||||
| try | try | ||||
| { | { | ||||
| final int available = input.available(); | final int available = input.available(); | ||||
| if( 0 >= available ) { | |||||
| return; | |||||
| if( 0 >= available ) | |||||
| { | |||||
| return; | |||||
| } | } | ||||
| final byte[] data = new byte[ available ]; | final byte[] data = new byte[ available ]; | ||||
| @@ -8,8 +8,8 @@ | |||||
| package org.apache.aut.nativelib.impl.launchers; | package org.apache.aut.nativelib.impl.launchers; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import org.apache.aut.nativelib.ExecMetaData; | |||||
| import org.apache.aut.nativelib.ExecException; | import org.apache.aut.nativelib.ExecException; | ||||
| import org.apache.aut.nativelib.ExecMetaData; | |||||
| /** | /** | ||||
| * This is the interface implemented by objects which are capable of | * This is the interface implemented by objects which are capable of | ||||
| @@ -11,12 +11,10 @@ import java.io.File; | |||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.lang.reflect.InvocationTargetException; | import java.lang.reflect.InvocationTargetException; | ||||
| import java.lang.reflect.Method; | import java.lang.reflect.Method; | ||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | |||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| import org.apache.aut.nativelib.ExecException; | import org.apache.aut.nativelib.ExecException; | ||||
| import org.apache.aut.nativelib.ExecMetaData; | import org.apache.aut.nativelib.ExecMetaData; | ||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | |||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| /** | /** | ||||
| * A command launcher for a particular JVM/OS platform. This class is a | * A command launcher for a particular JVM/OS platform. This class is a | ||||
| @@ -9,8 +9,8 @@ | |||||
| */ | */ | ||||
| package org.apache.aut.vfs; | package org.apache.aut.vfs; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | import org.apache.avalon.excalibur.i18n.ResourceManager; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| /** | /** | ||||
| * An enumeration that represents a file's type. | * An enumeration that represents a file's type. | ||||
| @@ -7,20 +7,20 @@ | |||||
| */ | */ | ||||
| package org.apache.aut.vfs.impl; | package org.apache.aut.vfs.impl; | ||||
| import java.io.File; | |||||
| import java.util.HashMap; | import java.util.HashMap; | ||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| import java.io.File; | |||||
| import org.apache.aut.vfs.FileObject; | import org.apache.aut.vfs.FileObject; | ||||
| import org.apache.aut.vfs.FileSystemException; | import org.apache.aut.vfs.FileSystemException; | ||||
| import org.apache.aut.vfs.FileSystemManager; | import org.apache.aut.vfs.FileSystemManager; | ||||
| import org.apache.aut.vfs.provider.local.LocalFileSystemProvider; | |||||
| import org.apache.aut.vfs.provider.FileSystem; | |||||
| import org.apache.aut.vfs.provider.FileSystemProvider; | import org.apache.aut.vfs.provider.FileSystemProvider; | ||||
| import org.apache.aut.vfs.provider.UriParser; | |||||
| import org.apache.aut.vfs.provider.FileSystemProviderContext; | import org.apache.aut.vfs.provider.FileSystemProviderContext; | ||||
| import org.apache.aut.vfs.provider.FileSystem; | |||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| import org.apache.aut.vfs.provider.UriParser; | |||||
| import org.apache.aut.vfs.provider.local.LocalFileSystemProvider; | |||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | import org.apache.avalon.excalibur.i18n.ResourceManager; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| /** | /** | ||||
| * A default file system manager implementation. | * A default file system manager implementation. | ||||
| @@ -19,8 +19,8 @@ import org.apache.aut.vfs.FileObject; | |||||
| import org.apache.aut.vfs.FileSystemException; | import org.apache.aut.vfs.FileSystemException; | ||||
| import org.apache.aut.vfs.FileType; | import org.apache.aut.vfs.FileType; | ||||
| import org.apache.aut.vfs.NameScope; | import org.apache.aut.vfs.NameScope; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | import org.apache.avalon.excalibur.i18n.ResourceManager; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| /** | /** | ||||
| * A partial file object implementation. | * A partial file object implementation. | ||||
| @@ -348,7 +348,7 @@ public abstract class AbstractFileObject implements FileObject | |||||
| } | } | ||||
| // Update cached info | // Update cached info | ||||
| updateType(null); | |||||
| updateType( null ); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -462,7 +462,7 @@ public abstract class AbstractFileObject implements FileObject | |||||
| } | } | ||||
| // Update cached info | // Update cached info | ||||
| updateType(type); | |||||
| updateType( type ); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -604,7 +604,7 @@ public abstract class AbstractFileObject implements FileObject | |||||
| /** | /** | ||||
| * Update cached info when this file's type changes. | * Update cached info when this file's type changes. | ||||
| */ | */ | ||||
| private void updateType(FileType type) | |||||
| private void updateType( FileType type ) | |||||
| { | { | ||||
| // Notify parent that its child list may no longer be valid | // Notify parent that its child list may no longer be valid | ||||
| notifyParent(); | notifyParent(); | ||||
| @@ -9,8 +9,8 @@ package org.apache.aut.vfs.provider; | |||||
| import org.apache.aut.vfs.FileObject; | import org.apache.aut.vfs.FileObject; | ||||
| import org.apache.aut.vfs.FileSystemException; | import org.apache.aut.vfs.FileSystemException; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | import org.apache.avalon.excalibur.i18n.ResourceManager; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| /** | /** | ||||
| * A partial file system provider implementation. | * A partial file system provider implementation. | ||||
| @@ -10,8 +10,8 @@ package org.apache.aut.vfs.provider; | |||||
| import java.util.HashSet; | import java.util.HashSet; | ||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import org.apache.aut.vfs.FileSystemException; | import org.apache.aut.vfs.FileSystemException; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | import org.apache.avalon.excalibur.i18n.ResourceManager; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| /** | /** | ||||
| * A name parser which parses absolute URIs. See RFC 2396 for details. | * A name parser which parses absolute URIs. See RFC 2396 for details. | ||||
| @@ -7,9 +7,9 @@ | |||||
| */ | */ | ||||
| package org.apache.aut.vfs.provider.ftp; | package org.apache.aut.vfs.provider.ftp; | ||||
| import org.apache.aut.vfs.provider.UriParser; | |||||
| import org.apache.aut.vfs.provider.ParsedUri; | |||||
| import org.apache.aut.vfs.FileSystemException; | import org.apache.aut.vfs.FileSystemException; | ||||
| import org.apache.aut.vfs.provider.ParsedUri; | |||||
| import org.apache.aut.vfs.provider.UriParser; | |||||
| /** | /** | ||||
| * A parser for FTP URI. | * A parser for FTP URI. | ||||
| @@ -32,15 +32,15 @@ public class FtpFileNameParser extends UriParser | |||||
| String userInfo = uri.getUserInfo(); | String userInfo = uri.getUserInfo(); | ||||
| if( userInfo != null ) | if( userInfo != null ) | ||||
| { | { | ||||
| int idx = userInfo.indexOf(':'); | |||||
| int idx = userInfo.indexOf( ':' ); | |||||
| if( idx == -1 ) | if( idx == -1 ) | ||||
| { | { | ||||
| uri.setUserName( userInfo ); | uri.setUserName( userInfo ); | ||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| String userName = userInfo.substring(0, idx); | |||||
| String password = userInfo.substring(idx+1); | |||||
| String userName = userInfo.substring( 0, idx ); | |||||
| String password = userInfo.substring( idx + 1 ); | |||||
| uri.setUserName( userName ); | uri.setUserName( userName ); | ||||
| uri.setPassword( password ); | uri.setPassword( password ); | ||||
| } | } | ||||
| @@ -14,8 +14,8 @@ import org.apache.aut.vfs.FileName; | |||||
| import org.apache.aut.vfs.FileSystemException; | import org.apache.aut.vfs.FileSystemException; | ||||
| import org.apache.aut.vfs.FileType; | import org.apache.aut.vfs.FileType; | ||||
| import org.apache.aut.vfs.provider.AbstractFileObject; | import org.apache.aut.vfs.provider.AbstractFileObject; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | import org.apache.avalon.excalibur.i18n.ResourceManager; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| /** | /** | ||||
| * An FTP file. | * An FTP file. | ||||
| @@ -15,8 +15,8 @@ import org.apache.aut.vfs.FileName; | |||||
| import org.apache.aut.vfs.FileObject; | import org.apache.aut.vfs.FileObject; | ||||
| import org.apache.aut.vfs.FileSystemException; | import org.apache.aut.vfs.FileSystemException; | ||||
| import org.apache.aut.vfs.provider.AbstractFileSystem; | import org.apache.aut.vfs.provider.AbstractFileSystem; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | import org.apache.avalon.excalibur.i18n.ResourceManager; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| /** | /** | ||||
| * An FTP file system. | * An FTP file system. | ||||
| @@ -17,8 +17,8 @@ import org.apache.aut.vfs.FileObject; | |||||
| import org.apache.aut.vfs.FileSystemException; | import org.apache.aut.vfs.FileSystemException; | ||||
| import org.apache.aut.vfs.FileType; | import org.apache.aut.vfs.FileType; | ||||
| import org.apache.aut.vfs.provider.AbstractFileObject; | import org.apache.aut.vfs.provider.AbstractFileObject; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | import org.apache.avalon.excalibur.i18n.ResourceManager; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| /** | /** | ||||
| * A file object implementation which uses direct file access. | * A file object implementation which uses direct file access. | ||||
| @@ -11,8 +11,8 @@ import java.io.File; | |||||
| import org.apache.aut.vfs.FileSystemException; | import org.apache.aut.vfs.FileSystemException; | ||||
| import org.apache.aut.vfs.provider.ParsedUri; | import org.apache.aut.vfs.provider.ParsedUri; | ||||
| import org.apache.aut.vfs.provider.UriParser; | import org.apache.aut.vfs.provider.UriParser; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | import org.apache.avalon.excalibur.i18n.ResourceManager; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| /** | /** | ||||
| * A name parser. | * A name parser. | ||||
| @@ -10,8 +10,8 @@ package org.apache.aut.vfs.provider.smb; | |||||
| import org.apache.aut.vfs.FileSystemException; | import org.apache.aut.vfs.FileSystemException; | ||||
| import org.apache.aut.vfs.provider.ParsedUri; | import org.apache.aut.vfs.provider.ParsedUri; | ||||
| import org.apache.aut.vfs.provider.UriParser; | import org.apache.aut.vfs.provider.UriParser; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | import org.apache.avalon.excalibur.i18n.ResourceManager; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| /** | /** | ||||
| * A parser for SMB URI. | * A parser for SMB URI. | ||||
| @@ -18,8 +18,8 @@ import org.apache.aut.vfs.FileSystemException; | |||||
| import org.apache.aut.vfs.provider.AbstractFileSystem; | import org.apache.aut.vfs.provider.AbstractFileSystem; | ||||
| import org.apache.aut.vfs.provider.DefaultFileName; | import org.apache.aut.vfs.provider.DefaultFileName; | ||||
| import org.apache.aut.vfs.provider.FileSystem; | import org.apache.aut.vfs.provider.FileSystem; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | import org.apache.avalon.excalibur.i18n.ResourceManager; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| /** | /** | ||||
| * A read-only file system for Zip/Jar files. | * A read-only file system for Zip/Jar files. | ||||
| @@ -73,11 +73,15 @@ public class ATIProjectBuilder | |||||
| final String target = reactorHandler.getTarget( i ); | final String target = reactorHandler.getTarget( i ); | ||||
| final String data = reactorHandler.getData( i ); | final String data = reactorHandler.getData( i ); | ||||
| if( target.equals( "xsl-param" ) ) { | |||||
| if( target.equals( "xsl-param" ) ) | |||||
| { | |||||
| handleParameter( data ); | handleParameter( data ); | ||||
| } else if( target.equals( "xsl-params" ) ) { | |||||
| } | |||||
| else if( target.equals( "xsl-params" ) ) | |||||
| { | |||||
| handleParameters( data, sourceID ); | handleParameters( data, sourceID ); | ||||
| } else if( target.equals( "xsl-stylesheet" ) ) | |||||
| } | |||||
| else if( target.equals( "xsl-stylesheet" ) ) | |||||
| { | { | ||||
| if( null != transformer ) | if( null != transformer ) | ||||
| { | { | ||||
| @@ -23,8 +23,9 @@ public class DefaultConverterRegistry | |||||
| public String getConverterName( final String source, final String destination ) | public String getConverterName( final String source, final String destination ) | ||||
| { | { | ||||
| final HashMap map = (HashMap)m_mapping.get( source ); | final HashMap map = (HashMap)m_mapping.get( source ); | ||||
| if( null == map ) { | |||||
| return null; | |||||
| if( null == map ) | |||||
| { | |||||
| return null; | |||||
| } | } | ||||
| return (String)map.get( destination ); | return (String)map.get( destination ); | ||||
| } | } | ||||
| @@ -149,7 +149,7 @@ public class DefaultDeployer | |||||
| checkFile( canonFile ); | checkFile( canonFile ); | ||||
| final File[] extensions = getOptionalPackagesFor( canonFile ); | final File[] extensions = getOptionalPackagesFor( canonFile ); | ||||
| final URL[] urls = buildClasspath( canonFile, extensions ); | final URL[] urls = buildClasspath( canonFile, extensions ); | ||||
| classLoader = new URLClassLoader( urls, Thread.currentThread().getContextClassLoader() ); | |||||
| classLoader = new URLClassLoader( urls, Thread.currentThread().getContextClassLoader() ); | |||||
| m_fileDeployers.put( canonFile, classLoader ); | m_fileDeployers.put( canonFile, classLoader ); | ||||
| } | } | ||||
| return classLoader; | return classLoader; | ||||
| @@ -142,7 +142,7 @@ class Deployment | |||||
| for( int i = 0; i < m_descriptors.length; i++ ) | for( int i = 0; i < m_descriptors.length; i++ ) | ||||
| { | { | ||||
| Configuration descriptor = m_descriptors[ i ]; | Configuration descriptor = m_descriptors[ i ]; | ||||
| deployFromDescriptor( descriptor, m_classLoader, m_descriptorUrls[i] ); | |||||
| deployFromDescriptor( descriptor, m_classLoader, m_descriptorUrls[ i ] ); | |||||
| } | } | ||||
| } | } | ||||
| @@ -338,7 +338,7 @@ class Deployment | |||||
| /** | /** | ||||
| * Returns the type factory for a role. | * Returns the type factory for a role. | ||||
| */ | */ | ||||
| private DefaultTypeFactory getFactory( final Class roleType) | |||||
| private DefaultTypeFactory getFactory( final Class roleType ) | |||||
| { | { | ||||
| DefaultTypeFactory factory = (DefaultTypeFactory)m_factories.get( roleType ); | DefaultTypeFactory factory = (DefaultTypeFactory)m_factories.get( roleType ); | ||||
| @@ -138,14 +138,17 @@ public class AspectAwareExecutor | |||||
| final ArrayList elementList = (ArrayList)elementMap.remove( names[ i ] ); | final ArrayList elementList = (ArrayList)elementMap.remove( names[ i ] ); | ||||
| Parameters parameters = (Parameters)parameterMap.remove( names[ i ] ); | Parameters parameters = (Parameters)parameterMap.remove( names[ i ] ); | ||||
| if( null == parameters ) { | |||||
| parameters = Parameters.EMPTY_PARAMETERS; | |||||
| if( null == parameters ) | |||||
| { | |||||
| parameters = Parameters.EMPTY_PARAMETERS; | |||||
| } | } | ||||
| Configuration[] elements = null; | Configuration[] elements = null; | ||||
| if( null == elementList ) { | |||||
| if( null == elementList ) | |||||
| { | |||||
| elements = EMPTY_ELEMENTS; | elements = EMPTY_ELEMENTS; | ||||
| } else | |||||
| } | |||||
| else | |||||
| { | { | ||||
| elements = (Configuration[])elementList.toArray( EMPTY_ELEMENTS ); | elements = (Configuration[])elementList.toArray( EMPTY_ELEMENTS ); | ||||
| } | } | ||||
| @@ -171,9 +174,11 @@ public class AspectAwareExecutor | |||||
| Configuration[] elements = null; | Configuration[] elements = null; | ||||
| if( null == elementList ) { | |||||
| if( null == elementList ) | |||||
| { | |||||
| elements = EMPTY_ELEMENTS; | elements = EMPTY_ELEMENTS; | ||||
| } else | |||||
| } | |||||
| else | |||||
| { | { | ||||
| elements = (Configuration[])elementList.toArray( EMPTY_ELEMENTS ); | elements = (Configuration[])elementList.toArray( EMPTY_ELEMENTS ); | ||||
| } | } | ||||
| @@ -99,14 +99,14 @@ public class DefaultRoleManager | |||||
| throws IllegalArgumentException | throws IllegalArgumentException | ||||
| { | { | ||||
| final String oldRole = (String)m_names.get( name ); | final String oldRole = (String)m_names.get( name ); | ||||
| if( null != oldRole && ! oldRole.equals( role ) ) | |||||
| if( null != oldRole && !oldRole.equals( role ) ) | |||||
| { | { | ||||
| final String message = REZ.getString( "duplicate-name.error", oldRole ); | final String message = REZ.getString( "duplicate-name.error", oldRole ); | ||||
| throw new IllegalArgumentException( message ); | throw new IllegalArgumentException( message ); | ||||
| } | } | ||||
| final String oldName = (String)m_roles.get( role ); | final String oldName = (String)m_roles.get( role ); | ||||
| if( null != oldName && ! oldName.equals( name ) ) | |||||
| if( null != oldName && !oldName.equals( name ) ) | |||||
| { | { | ||||
| final String message = REZ.getString( "duplicate-role.error", oldName ); | final String message = REZ.getString( "duplicate-role.error", oldName ); | ||||
| throw new IllegalArgumentException( message ); | throw new IllegalArgumentException( message ); | ||||
| @@ -50,8 +50,9 @@ public class ProjectListenerSupport | |||||
| } | } | ||||
| } | } | ||||
| if( -1 == found ) { | |||||
| return; | |||||
| if( -1 == found ) | |||||
| { | |||||
| return; | |||||
| } | } | ||||
| final ProjectListener[] listeners = new ProjectListener[ m_listeners.length - 1 ]; | final ProjectListener[] listeners = new ProjectListener[ m_listeners.length - 1 ]; | ||||
| @@ -108,7 +108,6 @@ public class Pattern | |||||
| return null; | return null; | ||||
| } | } | ||||
| public String toString() | public String toString() | ||||
| { | { | ||||
| String result = "Pattern['" + m_name + "',"; | String result = "Pattern['" + m_name + "',"; | ||||
| @@ -96,7 +96,8 @@ public class Project | |||||
| */ | */ | ||||
| public String getProperty( String name ) | public String getProperty( String name ) | ||||
| { | { | ||||
| if( name == null ) { | |||||
| if( name == null ) | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| String property = (String)properties.get( name ); | String property = (String)properties.get( name ); | ||||
| @@ -11,10 +11,8 @@ import java.io.File; | |||||
| import java.net.URL; | import java.net.URL; | ||||
| import java.net.URLClassLoader; | import java.net.URLClassLoader; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.api.AbstractTask; | |||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.taskdefs.condition.Condition; | import org.apache.tools.ant.taskdefs.condition.Condition; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.PathUtil; | import org.apache.tools.ant.types.PathUtil; | ||||
| @@ -55,13 +53,13 @@ public class Available | |||||
| public void addClasspath( Path classpath ) | public void addClasspath( Path classpath ) | ||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| if ( m_classpath == null ) | |||||
| if( m_classpath == null ) | |||||
| { | { | ||||
| m_classpath = classpath; | m_classpath = classpath; | ||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| m_classpath.addPath(classpath); | |||||
| m_classpath.addPath( classpath ); | |||||
| } | } | ||||
| } | } | ||||
| @@ -11,9 +11,9 @@ import java.io.BufferedReader; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.FileInputStream; | import java.io.FileInputStream; | ||||
| import java.io.FileOutputStream; | import java.io.FileOutputStream; | ||||
| import java.io.InputStreamReader; | |||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.io.InputStream; | import java.io.InputStream; | ||||
| import java.io.InputStreamReader; | |||||
| import java.security.DigestInputStream; | import java.security.DigestInputStream; | ||||
| import java.security.MessageDigest; | import java.security.MessageDigest; | ||||
| import java.security.NoSuchAlgorithmException; | import java.security.NoSuchAlgorithmException; | ||||
| @@ -23,7 +23,6 @@ import java.util.Enumeration; | |||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| import org.apache.avalon.excalibur.io.IOUtil; | import org.apache.avalon.excalibur.io.IOUtil; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.api.AbstractTask; | |||||
| import org.apache.tools.ant.taskdefs.condition.Condition; | import org.apache.tools.ant.taskdefs.condition.Condition; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | import org.apache.tools.ant.types.DirectoryScanner; | ||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| @@ -285,7 +284,6 @@ public class Checksum | |||||
| final byte[] fileDigest = buildDigest( fis ); | final byte[] fileDigest = buildDigest( fis ); | ||||
| IOUtil.shutdownStream( fis ); | IOUtil.shutdownStream( fis ); | ||||
| String checksum = ""; | String checksum = ""; | ||||
| for( int i = 0; i < fileDigest.length; i++ ) | for( int i = 0; i < fileDigest.length; i++ ) | ||||
| { | { | ||||
| @@ -8,7 +8,6 @@ | |||||
| package org.apache.tools.ant.taskdefs; | package org.apache.tools.ant.taskdefs; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.api.AbstractTask; | |||||
| import org.apache.tools.ant.taskdefs.condition.Condition; | import org.apache.tools.ant.taskdefs.condition.Condition; | ||||
| import org.apache.tools.ant.taskdefs.condition.ConditionBase; | import org.apache.tools.ant.taskdefs.condition.ConditionBase; | ||||
| @@ -11,8 +11,8 @@ import java.io.File; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.aut.nativelib.Os; | import org.apache.aut.nativelib.Os; | ||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.tools.ant.types.DirectoryScanner; | import org.apache.tools.ant.types.DirectoryScanner; | ||||
| import org.apache.tools.ant.types.FileList; | import org.apache.tools.ant.types.FileList; | ||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| @@ -14,8 +14,8 @@ import java.net.URLClassLoader; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.SysProperties; | |||||
| import org.apache.tools.ant.types.PathUtil; | import org.apache.tools.ant.types.PathUtil; | ||||
| import org.apache.tools.ant.types.SysProperties; | |||||
| /* | /* | ||||
| * @author thomas.haas@softwired-inc.com | * @author thomas.haas@softwired-inc.com | ||||
| @@ -239,7 +239,8 @@ public class Get extends Task | |||||
| if( is == null ) | if( is == null ) | ||||
| { | { | ||||
| getLogger().info( "Can't get " + source + " to " + dest ); | getLogger().info( "Can't get " + source + " to " + dest ); | ||||
| if( ignoreErrors ) { | |||||
| if( ignoreErrors ) | |||||
| { | |||||
| return; | return; | ||||
| } | } | ||||
| throw new TaskException( "Can't get " + source + " to " + dest ); | throw new TaskException( "Can't get " + source + " to " + dest ); | ||||
| @@ -251,11 +252,13 @@ public class Get extends Task | |||||
| while( ( length = is.read( buffer ) ) >= 0 ) | while( ( length = is.read( buffer ) ) >= 0 ) | ||||
| { | { | ||||
| fos.write( buffer, 0, length ); | fos.write( buffer, 0, length ); | ||||
| if( verbose ) { | |||||
| if( verbose ) | |||||
| { | |||||
| System.out.print( "." ); | System.out.print( "." ); | ||||
| } | } | ||||
| } | } | ||||
| if( verbose ) { | |||||
| if( verbose ) | |||||
| { | |||||
| System.out.println(); | System.out.println(); | ||||
| } | } | ||||
| fos.close(); | fos.close(); | ||||
| @@ -282,7 +285,8 @@ public class Get extends Task | |||||
| catch( IOException ioe ) | catch( IOException ioe ) | ||||
| { | { | ||||
| getLogger().info( "Error getting " + source + " to " + dest ); | getLogger().info( "Error getting " + source + " to " + dest ); | ||||
| if( ignoreErrors ) { | |||||
| if( ignoreErrors ) | |||||
| { | |||||
| return; | return; | ||||
| } | } | ||||
| throw new TaskException( "Error", ioe ); | throw new TaskException( "Error", ioe ); | ||||
| @@ -13,7 +13,6 @@ import java.io.InputStreamReader; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.StringTokenizer; | import java.util.StringTokenizer; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.api.AbstractTask; | |||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| /** | /** | ||||
| @@ -11,6 +11,7 @@ import java.io.File; | |||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.io.PrintStream; | import java.io.PrintStream; | ||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| @@ -19,7 +20,6 @@ import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.tools.ant.types.CommandlineJava; | import org.apache.tools.ant.types.CommandlineJava; | ||||
| import org.apache.tools.ant.types.EnvironmentVariable; | import org.apache.tools.ant.types.EnvironmentVariable; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * This task acts as a loader for java applications but allows to use the same | * This task acts as a loader for java applications but allows to use the same | ||||
| @@ -10,16 +10,16 @@ package org.apache.tools.ant.taskdefs; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import org.apache.aut.nativelib.Os; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.framework.JavaVersion; | import org.apache.myrmidon.framework.JavaVersion; | ||||
| import org.apache.aut.nativelib.Os; | |||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.taskdefs.compilers.CompilerAdapter; | import org.apache.tools.ant.taskdefs.compilers.CompilerAdapter; | ||||
| import org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory; | import org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory; | ||||
| import org.apache.tools.ant.types.Argument; | import org.apache.tools.ant.types.Argument; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.util.mappers.GlobPatternMapper; | |||||
| import org.apache.tools.ant.types.SourceFileScanner; | import org.apache.tools.ant.types.SourceFileScanner; | ||||
| import org.apache.tools.ant.util.mappers.GlobPatternMapper; | |||||
| /** | /** | ||||
| * Task to compile Java source files. This task can take the following | * Task to compile Java source files. This task can take the following | ||||
| @@ -10,7 +10,6 @@ package org.apache.tools.ant.taskdefs; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.api.AbstractTask; | |||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| @@ -150,7 +149,8 @@ public class PathConvert extends Task | |||||
| elem = elem.replace( fromDirSep, toDirSep ); | elem = elem.replace( fromDirSep, toDirSep ); | ||||
| if( i != 0 ) { | |||||
| if( i != 0 ) | |||||
| { | |||||
| rslt.append( m_pathSep ); | rslt.append( m_pathSep ); | ||||
| } | } | ||||
| rslt.append( elem ); | rslt.append( elem ); | ||||
| @@ -212,17 +212,20 @@ public class PathConvert extends Task | |||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| if( m_path == null ) { | |||||
| if( m_path == null ) | |||||
| { | |||||
| throw new TaskException( "You must specify a path to convert" ); | throw new TaskException( "You must specify a path to convert" ); | ||||
| } | } | ||||
| if( m_property == null ) { | |||||
| if( m_property == null ) | |||||
| { | |||||
| throw new TaskException( "You must specify a property" ); | throw new TaskException( "You must specify a property" ); | ||||
| } | } | ||||
| // Must either have a target OS or both a dirSep and pathSep | // Must either have a target OS or both a dirSep and pathSep | ||||
| if( m_targetOS == null && m_pathSep == null && m_dirSep == null ) { | |||||
| if( m_targetOS == null && m_pathSep == null && m_dirSep == null ) | |||||
| { | |||||
| throw new TaskException( "You must specify at least one of targetOS, dirSep, or pathSep" ); | throw new TaskException( "You must specify at least one of targetOS, dirSep, or pathSep" ); | ||||
| } | } | ||||
| @@ -15,7 +15,6 @@ import java.net.URLClassLoader; | |||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import java.util.Properties; | import java.util.Properties; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.api.AbstractTask; | |||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.PathUtil; | import org.apache.tools.ant.types.PathUtil; | ||||
| @@ -82,7 +81,8 @@ public class Property | |||||
| getContext().setProperty( name, value ); | getContext().setProperty( name, value ); | ||||
| } | } | ||||
| if( m_resource != null ) { | |||||
| if( m_resource != null ) | |||||
| { | |||||
| loadResource( m_resource ); | loadResource( m_resource ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -13,9 +13,9 @@ import java.io.IOException; | |||||
| import java.io.PrintStream; | import java.io.PrintStream; | ||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.framework.LogLevel; | |||||
| import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.myrmidon.framework.LogLevel; | |||||
| /** | /** | ||||
| * This task is the manager for RecorderEntry's. It is this class that holds all | * This task is the manager for RecorderEntry's. It is this class that holds all | ||||
| @@ -9,19 +9,19 @@ package org.apache.tools.ant.taskdefs; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.net.URLClassLoader; | |||||
| import java.net.URL; | import java.net.URL; | ||||
| import java.net.URLClassLoader; | |||||
| import java.rmi.Remote; | import java.rmi.Remote; | ||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import org.apache.avalon.excalibur.io.FileUtil; | import org.apache.avalon.excalibur.io.FileUtil; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.taskdefs.rmic.RmicAdapter; | import org.apache.tools.ant.taskdefs.rmic.RmicAdapter; | ||||
| import org.apache.tools.ant.taskdefs.rmic.RmicAdapterFactory; | import org.apache.tools.ant.taskdefs.rmic.RmicAdapterFactory; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.util.mappers.FileNameMapper; | |||||
| import org.apache.tools.ant.types.SourceFileScanner; | |||||
| import org.apache.tools.ant.types.PathUtil; | import org.apache.tools.ant.types.PathUtil; | ||||
| import org.apache.tools.ant.types.SourceFileScanner; | |||||
| import org.apache.tools.ant.util.mappers.FileNameMapper; | |||||
| /** | /** | ||||
| * Task to compile RMI stubs and skeletons. This task can take the following | * Task to compile RMI stubs and skeletons. This task can take the following | ||||
| @@ -18,8 +18,8 @@ import java.io.InputStreamReader; | |||||
| import java.io.PrintStream; | import java.io.PrintStream; | ||||
| import java.io.Reader; | import java.io.Reader; | ||||
| import java.io.StringReader; | import java.io.StringReader; | ||||
| import java.net.URLClassLoader; | |||||
| import java.net.URL; | import java.net.URL; | ||||
| import java.net.URLClassLoader; | |||||
| import java.sql.Connection; | import java.sql.Connection; | ||||
| import java.sql.DatabaseMetaData; | import java.sql.DatabaseMetaData; | ||||
| import java.sql.Driver; | import java.sql.Driver; | ||||
| @@ -33,8 +33,8 @@ import java.util.Iterator; | |||||
| import java.util.Properties; | import java.util.Properties; | ||||
| import java.util.StringTokenizer; | import java.util.StringTokenizer; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.EnumeratedAttribute; | import org.apache.tools.ant.types.EnumeratedAttribute; | ||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| @@ -469,7 +469,8 @@ public class SQLExec | |||||
| throw new SQLException( "No suitable Driver for " + url ); | throw new SQLException( "No suitable Driver for " + url ); | ||||
| } | } | ||||
| if( !isValidRdbms( conn ) ) { | |||||
| if( !isValidRdbms( conn ) ) | |||||
| { | |||||
| return; | return; | ||||
| } | } | ||||
| @@ -565,7 +566,8 @@ public class SQLExec | |||||
| */ | */ | ||||
| protected boolean isValidRdbms( Connection conn ) | protected boolean isValidRdbms( Connection conn ) | ||||
| { | { | ||||
| if( rdbms == null && version == null ) { | |||||
| if( rdbms == null && version == null ) | |||||
| { | |||||
| return true; | return true; | ||||
| } | } | ||||
| @@ -620,7 +622,8 @@ public class SQLExec | |||||
| throws SQLException | throws SQLException | ||||
| { | { | ||||
| // Check and ignore empty statements | // Check and ignore empty statements | ||||
| if( "".equals( sql.trim() ) ) { | |||||
| if( "".equals( sql.trim() ) ) | |||||
| { | |||||
| return; | return; | ||||
| } | } | ||||
| @@ -651,7 +654,8 @@ public class SQLExec | |||||
| catch( SQLException e ) | catch( SQLException e ) | ||||
| { | { | ||||
| getLogger().error( "Failed to execute: " + sql ); | getLogger().error( "Failed to execute: " + sql ); | ||||
| if( !onError.equals( "continue" ) ) { | |||||
| if( !onError.equals( "continue" ) ) | |||||
| { | |||||
| throw e; | throw e; | ||||
| } | } | ||||
| getLogger().error( e.toString() ); | getLogger().error( e.toString() ); | ||||
| @@ -731,10 +735,12 @@ public class SQLExec | |||||
| { | { | ||||
| line = line.trim(); | line = line.trim(); | ||||
| line = "" + resolveValue( line ); | line = "" + resolveValue( line ); | ||||
| if( line.startsWith( "//" ) ) { | |||||
| if( line.startsWith( "//" ) ) | |||||
| { | |||||
| continue; | continue; | ||||
| } | } | ||||
| if( line.startsWith( "--" ) ) { | |||||
| if( line.startsWith( "--" ) ) | |||||
| { | |||||
| continue; | continue; | ||||
| } | } | ||||
| StringTokenizer st = new StringTokenizer( line ); | StringTokenizer st = new StringTokenizer( line ); | ||||
| @@ -753,7 +759,8 @@ public class SQLExec | |||||
| // SQL defines "--" as a comment to EOL | // SQL defines "--" as a comment to EOL | ||||
| // and in Oracle it may contain a hint | // and in Oracle it may contain a hint | ||||
| // so we cannot just remove it, instead we must end it | // so we cannot just remove it, instead we must end it | ||||
| if( line.indexOf( "--" ) >= 0 ) { | |||||
| if( line.indexOf( "--" ) >= 0 ) | |||||
| { | |||||
| sql += "\n"; | sql += "\n"; | ||||
| } | } | ||||
| @@ -18,7 +18,6 @@ import java.util.NoSuchElementException; | |||||
| import java.util.StringTokenizer; | import java.util.StringTokenizer; | ||||
| import java.util.TimeZone; | import java.util.TimeZone; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.api.AbstractTask; | |||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.types.EnumeratedAttribute; | import org.apache.tools.ant.types.EnumeratedAttribute; | ||||
| @@ -11,15 +11,14 @@ import java.io.File; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.api.AbstractTask; | |||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.taskdefs.condition.Condition; | import org.apache.tools.ant.taskdefs.condition.Condition; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| import org.apache.tools.ant.util.mappers.Mapper; | |||||
| import org.apache.tools.ant.types.ScannerUtil; | |||||
| import org.apache.tools.ant.types.SourceFileScanner; | |||||
| import org.apache.tools.ant.util.mappers.FileNameMapper; | import org.apache.tools.ant.util.mappers.FileNameMapper; | ||||
| import org.apache.tools.ant.util.mappers.Mapper; | |||||
| import org.apache.tools.ant.util.mappers.MergingMapper; | import org.apache.tools.ant.util.mappers.MergingMapper; | ||||
| import org.apache.tools.ant.types.SourceFileScanner; | |||||
| import org.apache.tools.ant.types.ScannerUtil; | |||||
| /** | /** | ||||
| * Will set the given property if the specified target has a timestamp greater | * Will set the given property if the specified target has a timestamp greater | ||||
| @@ -121,7 +120,8 @@ public class UpToDate extends MatchingTask implements Condition | |||||
| } | } | ||||
| // if not there then it can't be up to date | // if not there then it can't be up to date | ||||
| if( _targetFile != null && !_targetFile.exists() ) { | |||||
| if( _targetFile != null && !_targetFile.exists() ) | |||||
| { | |||||
| return false; | return false; | ||||
| } | } | ||||
| @@ -9,7 +9,6 @@ package org.apache.tools.ant.taskdefs; | |||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.api.AbstractTask; | |||||
| import org.apache.tools.ant.taskdefs.condition.Condition; | import org.apache.tools.ant.taskdefs.condition.Condition; | ||||
| import org.apache.tools.ant.taskdefs.condition.ConditionBase; | import org.apache.tools.ant.taskdefs.condition.ConditionBase; | ||||
| import org.apache.tools.ant.types.EnumeratedAttribute; | import org.apache.tools.ant.types.EnumeratedAttribute; | ||||
| @@ -9,8 +9,8 @@ package org.apache.tools.ant.taskdefs.archive; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.aut.zip.ZipOutputStream; | import org.apache.aut.zip.ZipOutputStream; | ||||
| import org.apache.myrmidon.api.TaskException; | |||||
| /** | /** | ||||
| * Creates a EAR archive. Based on WAR task | * Creates a EAR archive. Based on WAR task | ||||
| @@ -20,11 +20,11 @@ import java.io.Reader; | |||||
| import java.util.Enumeration; | import java.util.Enumeration; | ||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import java.util.zip.ZipFile; | import java.util.zip.ZipFile; | ||||
| import org.apache.aut.zip.ZipOutputStream; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.FileScanner; | |||||
| import org.apache.tools.ant.taskdefs.Manifest; | import org.apache.tools.ant.taskdefs.Manifest; | ||||
| import org.apache.tools.ant.taskdefs.ManifestException; | import org.apache.tools.ant.taskdefs.ManifestException; | ||||
| import org.apache.aut.zip.ZipOutputStream; | |||||
| import org.apache.tools.ant.types.FileScanner; | |||||
| /** | /** | ||||
| * Creates a JAR archive. | * Creates a JAR archive. | ||||
| @@ -17,10 +17,10 @@ import org.apache.aut.tar.TarEntry; | |||||
| import org.apache.aut.tar.TarOutputStream; | import org.apache.aut.tar.TarOutputStream; | ||||
| import org.apache.avalon.excalibur.io.IOUtil; | import org.apache.avalon.excalibur.io.IOUtil; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.SourceFileScanner; | |||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | |||||
| import org.apache.tools.ant.types.ScannerUtil; | import org.apache.tools.ant.types.ScannerUtil; | ||||
| import org.apache.tools.ant.types.SourceFileScanner; | |||||
| import org.apache.tools.ant.util.mappers.MergingMapper; | import org.apache.tools.ant.util.mappers.MergingMapper; | ||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | |||||
| /** | /** | ||||
| * Creates a TAR archive. | * Creates a TAR archive. | ||||
| @@ -9,8 +9,8 @@ package org.apache.tools.ant.taskdefs.archive; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.aut.zip.ZipOutputStream; | import org.apache.aut.zip.ZipOutputStream; | ||||
| import org.apache.myrmidon.api.TaskException; | |||||
| /** | /** | ||||
| * Creates a WAR archive. | * Creates a WAR archive. | ||||
| @@ -41,7 +41,7 @@ public class War | |||||
| throw new TaskException( message ); | throw new TaskException( message ); | ||||
| } | } | ||||
| addFileAs(descr, "WEB-INF/web.xml" ); | |||||
| addFileAs( descr, "WEB-INF/web.xml" ); | |||||
| } | } | ||||
| public void addClasses( final ZipFileSet fs ) | public void addClasses( final ZipFileSet fs ) | ||||
| @@ -22,15 +22,15 @@ import java.util.zip.CRC32; | |||||
| import java.util.zip.ZipInputStream; | import java.util.zip.ZipInputStream; | ||||
| import org.apache.aut.zip.ZipEntry; | import org.apache.aut.zip.ZipEntry; | ||||
| import org.apache.aut.zip.ZipOutputStream; | import org.apache.aut.zip.ZipOutputStream; | ||||
| import org.apache.avalon.excalibur.io.IOUtil; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | |||||
| import org.apache.tools.ant.types.DirectoryScanner; | import org.apache.tools.ant.types.DirectoryScanner; | ||||
| import org.apache.tools.ant.types.FileScanner; | import org.apache.tools.ant.types.FileScanner; | ||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| import org.apache.tools.ant.types.ScannerUtil; | import org.apache.tools.ant.types.ScannerUtil; | ||||
| import org.apache.tools.ant.types.SourceFileScanner; | import org.apache.tools.ant.types.SourceFileScanner; | ||||
| import org.apache.tools.ant.util.mappers.MergingMapper; | import org.apache.tools.ant.util.mappers.MergingMapper; | ||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | |||||
| import org.apache.avalon.excalibur.io.IOUtil; | |||||
| /** | /** | ||||
| * Create a ZIP archive. | * Create a ZIP archive. | ||||
| @@ -11,6 +11,7 @@ import java.io.File; | |||||
| import java.io.FileWriter; | import java.io.FileWriter; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.io.PrintWriter; | import java.io.PrintWriter; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.avalon.excalibur.io.IOUtil; | import org.apache.avalon.excalibur.io.IOUtil; | ||||
| import org.apache.avalon.excalibur.util.StringUtil; | import org.apache.avalon.excalibur.util.StringUtil; | ||||
| import org.apache.avalon.framework.logger.AbstractLogEnabled; | import org.apache.avalon.framework.logger.AbstractLogEnabled; | ||||
| @@ -21,7 +22,6 @@ import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.PathUtil; | import org.apache.tools.ant.types.PathUtil; | ||||
| import org.apache.tools.ant.util.FileUtils; | import org.apache.tools.ant.util.FileUtils; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * This is the default implementation for the CompilerAdapter interface. | * This is the default implementation for the CompilerAdapter interface. | ||||
| @@ -83,7 +83,8 @@ public class Jikes | |||||
| Commandline cmd = new Commandline(); | Commandline cmd = new Commandline(); | ||||
| cmd.setExecutable( "jikes" ); | cmd.setExecutable( "jikes" ); | ||||
| if( m_deprecation == true ) { | |||||
| if( m_deprecation == true ) | |||||
| { | |||||
| cmd.addArgument( "-deprecation" ); | cmd.addArgument( "-deprecation" ); | ||||
| } | } | ||||
| @@ -18,7 +18,6 @@ import java.util.Iterator; | |||||
| import java.util.Properties; | import java.util.Properties; | ||||
| import org.apache.avalon.excalibur.util.StringUtil; | import org.apache.avalon.excalibur.util.StringUtil; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.api.AbstractTask; | |||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.types.Argument; | import org.apache.tools.ant.types.Argument; | ||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| @@ -316,10 +315,12 @@ public class ExecTask | |||||
| { | { | ||||
| try | try | ||||
| { | { | ||||
| if( m_ouput != null ) { | |||||
| if( m_ouput != null ) | |||||
| { | |||||
| m_ouput.close(); | m_ouput.close(); | ||||
| } | } | ||||
| if( m_byteArrayOutput != null ) { | |||||
| if( m_byteArrayOutput != null ) | |||||
| { | |||||
| m_byteArrayOutput.close(); | m_byteArrayOutput.close(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -350,8 +351,9 @@ public class ExecTask | |||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| // default directory to the project's base directory | // default directory to the project's base directory | ||||
| if( m_workingDirectory == null ) { | |||||
| m_workingDirectory = getBaseDirectory(); | |||||
| if( m_workingDirectory == null ) | |||||
| { | |||||
| m_workingDirectory = getBaseDirectory(); | |||||
| } | } | ||||
| // show the command | // show the command | ||||
| getLogger().debug( m_command.toString() ); | getLogger().debug( m_command.toString() ); | ||||
| @@ -13,12 +13,11 @@ import java.util.ArrayList; | |||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| import org.apache.avalon.excalibur.util.StringUtil; | import org.apache.avalon.excalibur.util.StringUtil; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.api.AbstractTask; | |||||
| import org.apache.tools.ant.types.DirectoryScanner; | import org.apache.tools.ant.types.DirectoryScanner; | ||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| import org.apache.tools.ant.types.Marker; | import org.apache.tools.ant.types.Marker; | ||||
| import org.apache.tools.ant.types.SourceFileScanner; | |||||
| import org.apache.tools.ant.types.ScannerUtil; | import org.apache.tools.ant.types.ScannerUtil; | ||||
| import org.apache.tools.ant.types.SourceFileScanner; | |||||
| import org.apache.tools.ant.util.mappers.FileNameMapper; | import org.apache.tools.ant.util.mappers.FileNameMapper; | ||||
| import org.apache.tools.ant.util.mappers.Mapper; | import org.apache.tools.ant.util.mappers.Mapper; | ||||
| @@ -50,7 +50,8 @@ public class Move | |||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| String[] list = d.list(); | String[] list = d.list(); | ||||
| if( list == null ) { | |||||
| if( list == null ) | |||||
| { | |||||
| return; | return; | ||||
| }// on an io error list() can return null | }// on an io error list() can return null | ||||
| @@ -225,7 +226,8 @@ public class Move | |||||
| protected boolean okToDelete( File d ) | protected boolean okToDelete( File d ) | ||||
| { | { | ||||
| String[] list = d.list(); | String[] list = d.list(); | ||||
| if( list == null ) { | |||||
| if( list == null ) | |||||
| { | |||||
| return false; | return false; | ||||
| }// maybe io error? | }// maybe io error? | ||||
| @@ -235,7 +237,8 @@ public class Move | |||||
| File f = new File( d, s ); | File f = new File( d, s ); | ||||
| if( f.isDirectory() ) | if( f.isDirectory() ) | ||||
| { | { | ||||
| if( !okToDelete( f ) ) { | |||||
| if( !okToDelete( f ) ) | |||||
| { | |||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||
| @@ -15,19 +15,19 @@ import java.io.PrintWriter; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import java.util.StringTokenizer; | import java.util.StringTokenizer; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.aut.nativelib.ExecOutputHandler; | |||||
| import org.apache.aut.nativelib.Os; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.framework.Pattern; | import org.apache.myrmidon.framework.Pattern; | ||||
| import org.apache.aut.nativelib.Os; | |||||
| import org.apache.aut.nativelib.ExecOutputHandler; | |||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.util.FileUtils; | |||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.ScannerUtil; | import org.apache.tools.ant.types.ScannerUtil; | ||||
| import org.apache.tools.ant.util.FileUtils; | |||||
| /** | /** | ||||
| * This task makes it easy to generate Javadoc documentation for a collection of | * This task makes it easy to generate Javadoc documentation for a collection of | ||||
| @@ -567,17 +567,19 @@ public class Javadoc | |||||
| // Build the classpath to pass to Javadoc | // Build the classpath to pass to Javadoc | ||||
| Path classpath = new Path(); | Path classpath = new Path(); | ||||
| classpath.addPath( m_sourcePath ); | classpath.addPath( m_sourcePath ); | ||||
| if ( m_classpath != null ) | |||||
| if( m_classpath != null ) | |||||
| { | { | ||||
| classpath.addPath( m_classpath ); | classpath.addPath( m_classpath ); | ||||
| } | } | ||||
| cmd.addArgument( "-classpath" ); | cmd.addArgument( "-classpath" ); | ||||
| cmd.addArgument( classpath.toString() ); | cmd.addArgument( classpath.toString() ); | ||||
| if( m_version && m_doclet == null ) { | |||||
| if( m_version && m_doclet == null ) | |||||
| { | |||||
| cmd.addArgument( "-version" ); | cmd.addArgument( "-version" ); | ||||
| } | } | ||||
| if( m_author && m_doclet == null ) { | |||||
| if( m_author && m_doclet == null ) | |||||
| { | |||||
| cmd.addArgument( "-author" ); | cmd.addArgument( "-author" ); | ||||
| } | } | ||||
| @@ -938,7 +940,8 @@ public class Javadoc | |||||
| ArrayList addedPackages = new ArrayList(); | ArrayList addedPackages = new ArrayList(); | ||||
| String[] list = sourcePath.list(); | String[] list = sourcePath.list(); | ||||
| if( list == null ) { | |||||
| if( list == null ) | |||||
| { | |||||
| list = new String[ 0 ]; | list = new String[ 0 ]; | ||||
| } | } | ||||
| @@ -12,15 +12,15 @@ import java.io.File; | |||||
| import java.io.FileReader; | import java.io.FileReader; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.net.URL; | import java.net.URL; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.taskdefs.ExecuteJava; | import org.apache.tools.ant.taskdefs.ExecuteJava; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.types.Argument; | import org.apache.tools.ant.types.Argument; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.tools.ant.types.CommandlineJava; | import org.apache.tools.ant.types.CommandlineJava; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * ANTLR task. | * ANTLR task. | ||||
| @@ -14,13 +14,13 @@ import java.io.OutputStream; | |||||
| import java.io.PrintWriter; | import java.io.PrintWriter; | ||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import org.apache.aut.nativelib.Os; | |||||
| import org.apache.aut.nativelib.ExecManager; | import org.apache.aut.nativelib.ExecManager; | ||||
| import org.apache.aut.nativelib.Os; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | import org.apache.tools.ant.taskdefs.MatchingTask; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| import org.apache.tools.ant.types.ScannerUtil; | import org.apache.tools.ant.types.ScannerUtil; | ||||
| @@ -198,7 +198,8 @@ public class Cab | |||||
| { | { | ||||
| String file = files.get( i ).toString(); | String file = files.get( i ).toString(); | ||||
| if( new File( m_baseDir, file ).lastModified() > | if( new File( m_baseDir, file ).lastModified() > | ||||
| m_cabFile.lastModified() ) { | |||||
| m_cabFile.lastModified() ) | |||||
| { | |||||
| upToDate = false; | upToDate = false; | ||||
| } | } | ||||
| } | } | ||||
| @@ -159,7 +159,8 @@ public class Entry | |||||
| GregorianCalendar value = new GregorianCalendar(); | GregorianCalendar value = new GregorianCalendar(); | ||||
| GregorianCalendar newValue = new GregorianCalendar(); | GregorianCalendar newValue = new GregorianCalendar(); | ||||
| if( m_pattern == null ) { | |||||
| if( m_pattern == null ) | |||||
| { | |||||
| m_pattern = "yyyy/MM/dd HH:mm"; | m_pattern = "yyyy/MM/dd HH:mm"; | ||||
| } | } | ||||
| DateFormat fmt = new SimpleDateFormat( m_pattern ); | DateFormat fmt = new SimpleDateFormat( m_pattern ); | ||||
| @@ -12,9 +12,8 @@ import java.util.ArrayList; | |||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import java.util.StringTokenizer; | import java.util.StringTokenizer; | ||||
| import org.apache.avalon.excalibur.util.StringUtil; | import org.apache.avalon.excalibur.util.StringUtil; | ||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.util.FileUtils; | import org.apache.tools.ant.util.FileUtils; | ||||
| @@ -20,8 +20,8 @@ import netrexx.lang.Rexx; | |||||
| import org.apache.avalon.excalibur.io.FileUtil; | import org.apache.avalon.excalibur.io.FileUtil; | ||||
| import org.apache.avalon.excalibur.util.StringUtil; | import org.apache.avalon.excalibur.util.StringUtil; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | import org.apache.tools.ant.taskdefs.MatchingTask; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| /** | /** | ||||
| * Task to compile NetRexx source files. This task can take the following | * Task to compile NetRexx source files. This task can take the following | ||||
| @@ -169,7 +169,8 @@ public class NetRexxC extends MatchingTask | |||||
| public void setCompile( boolean compile ) | public void setCompile( boolean compile ) | ||||
| { | { | ||||
| this.compile = compile; | this.compile = compile; | ||||
| if( !this.compile && !this.keep ) { | |||||
| if( !this.compile && !this.keep ) | |||||
| { | |||||
| this.keep = true; | this.keep = true; | ||||
| } | } | ||||
| } | } | ||||
| @@ -46,7 +46,8 @@ public class Script extends Task | |||||
| public void setSrc( String fileName ) | public void setSrc( String fileName ) | ||||
| { | { | ||||
| File file = new File( fileName ); | File file = new File( fileName ); | ||||
| if( !file.exists() ) { | |||||
| if( !file.exists() ) | |||||
| { | |||||
| throw new TaskException( "file " + fileName + " not found." ); | throw new TaskException( "file " + fileName + " not found." ); | ||||
| } | } | ||||
| @@ -140,11 +141,13 @@ public class Script extends Task | |||||
| boolean isValid = key.length() > 0 && | boolean isValid = key.length() > 0 && | ||||
| Character.isJavaIdentifierStart( key.charAt( 0 ) ); | Character.isJavaIdentifierStart( key.charAt( 0 ) ); | ||||
| for( int i = 1; isValid && i < key.length(); i++ ) { | |||||
| for( int i = 1; isValid && i < key.length(); i++ ) | |||||
| { | |||||
| isValid = Character.isJavaIdentifierPart( key.charAt( i ) ); | isValid = Character.isJavaIdentifierPart( key.charAt( i ) ); | ||||
| } | } | ||||
| if( isValid ) { | |||||
| if( isValid ) | |||||
| { | |||||
| beans.put( key, dictionary.get( key ) ); | beans.put( key, dictionary.get( key ) ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -7,8 +7,8 @@ | |||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.ccm; | package org.apache.tools.ant.taskdefs.optional.ccm; | ||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.aut.nativelib.ExecOutputHandler; | import org.apache.aut.nativelib.ExecOutputHandler; | ||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| /** | /** | ||||
| @@ -9,10 +9,10 @@ package org.apache.tools.ant.taskdefs.optional.ccm; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.aut.nativelib.ExecOutputHandler; | |||||
| import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.aut.nativelib.ExecOutputHandler; | |||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| @@ -9,11 +9,11 @@ package org.apache.tools.ant.taskdefs.optional.clearcase; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * A base class for creating tasks for executing commands on ClearCase. <p> | * A base class for creating tasks for executing commands on ClearCase. <p> | ||||
| @@ -21,8 +21,8 @@ import java.util.Enumeration; | |||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | import org.apache.tools.ant.taskdefs.MatchingTask; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.PathUtil; | import org.apache.tools.ant.types.PathUtil; | ||||
| @@ -9,9 +9,9 @@ package org.apache.tools.ant.taskdefs.optional.dotnet; | |||||
| import java.io.File; | import java.io.File; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | |||||
| import org.apache.tools.ant.types.DirectoryScanner; | import org.apache.tools.ant.types.DirectoryScanner; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | |||||
| // ==================================================================== | // ==================================================================== | ||||
| @@ -420,7 +420,8 @@ public class CSharp | |||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| //demand create pathlist | //demand create pathlist | ||||
| if( _referenceFiles == null ) { | |||||
| if( _referenceFiles == null ) | |||||
| { | |||||
| _referenceFiles = new Path(); | _referenceFiles = new Path(); | ||||
| } | } | ||||
| _referenceFiles.append( path ); | _referenceFiles.append( path ); | ||||
| @@ -462,7 +463,8 @@ public class CSharp | |||||
| { | { | ||||
| _targetType = targetType; | _targetType = targetType; | ||||
| } | } | ||||
| else { | |||||
| else | |||||
| { | |||||
| throw new TaskException( "targetType " + targetType + " is not a valid type" ); | throw new TaskException( "targetType " + targetType + " is not a valid type" ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -650,8 +652,9 @@ public class CSharp | |||||
| public void execute() | public void execute() | ||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| if( _srcDir == null ) { | |||||
| _srcDir = getBaseDirectory(); | |||||
| if( _srcDir == null ) | |||||
| { | |||||
| _srcDir = getBaseDirectory(); | |||||
| } | } | ||||
| NetCommand command = new NetCommand( this, "CSC", csc_exe_name ); | NetCommand command = new NetCommand( this, "CSC", csc_exe_name ); | ||||
| @@ -710,9 +713,12 @@ public class CSharp | |||||
| */ | */ | ||||
| protected String getAdditionalModulesParameter() | protected String getAdditionalModulesParameter() | ||||
| { | { | ||||
| if( notEmpty( _additionalModules ) ) { | |||||
| if( notEmpty( _additionalModules ) ) | |||||
| { | |||||
| return "/addmodule:" + _additionalModules; | return "/addmodule:" + _additionalModules; | ||||
| } else { | |||||
| } | |||||
| else | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||
| @@ -740,7 +746,8 @@ public class CSharp | |||||
| s.append( DEFAULT_REFERENCE_LIST ); | s.append( DEFAULT_REFERENCE_LIST ); | ||||
| return new String( s ); | return new String( s ); | ||||
| } | } | ||||
| else { | |||||
| else | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||
| @@ -752,9 +759,12 @@ public class CSharp | |||||
| */ | */ | ||||
| protected String getDefinitionsParameter() | protected String getDefinitionsParameter() | ||||
| { | { | ||||
| if( notEmpty( _definitions ) ) { | |||||
| if( notEmpty( _definitions ) ) | |||||
| { | |||||
| return "/define:" + _definitions; | return "/define:" + _definitions; | ||||
| } else { | |||||
| } | |||||
| else | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||
| @@ -766,9 +776,12 @@ public class CSharp | |||||
| */ | */ | ||||
| protected String getDocFileParameter() | protected String getDocFileParameter() | ||||
| { | { | ||||
| if( _docFile != null ) { | |||||
| if( _docFile != null ) | |||||
| { | |||||
| return "/doc:" + _docFile.toString(); | return "/doc:" + _docFile.toString(); | ||||
| } else { | |||||
| } | |||||
| else | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||
| @@ -780,9 +793,12 @@ public class CSharp | |||||
| */ | */ | ||||
| protected String getExtraOptionsParameter() | protected String getExtraOptionsParameter() | ||||
| { | { | ||||
| if( _extraOptions != null && _extraOptions.length() != 0 ) { | |||||
| if( _extraOptions != null && _extraOptions.length() != 0 ) | |||||
| { | |||||
| return _extraOptions; | return _extraOptions; | ||||
| } else { | |||||
| } | |||||
| else | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||
| @@ -819,9 +835,12 @@ public class CSharp | |||||
| */ | */ | ||||
| protected String getMainClassParameter() | protected String getMainClassParameter() | ||||
| { | { | ||||
| if( _mainClass != null && _mainClass.length() != 0 ) { | |||||
| if( _mainClass != null && _mainClass.length() != 0 ) | |||||
| { | |||||
| return "/main:" + _mainClass; | return "/main:" + _mainClass; | ||||
| } else { | |||||
| } | |||||
| else | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||
| @@ -853,7 +872,8 @@ public class CSharp | |||||
| File f = _outputFile; | File f = _outputFile; | ||||
| return "/out:" + f.toString(); | return "/out:" + f.toString(); | ||||
| } | } | ||||
| else { | |||||
| else | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||
| @@ -866,7 +886,8 @@ public class CSharp | |||||
| protected String getReferenceFilesParameter() | protected String getReferenceFilesParameter() | ||||
| { | { | ||||
| //bail on no references | //bail on no references | ||||
| if( _references == null ) { | |||||
| if( _references == null ) | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| //iterate through the ref list & generate an entry for each | //iterate through the ref list & generate an entry for each | ||||
| @@ -875,7 +896,8 @@ public class CSharp | |||||
| String refpath = _references.toString(); | String refpath = _references.toString(); | ||||
| //bail on no references listed | //bail on no references listed | ||||
| if( refpath.length() == 0 ) { | |||||
| if( refpath.length() == 0 ) | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| @@ -892,9 +914,12 @@ public class CSharp | |||||
| protected String getReferencesParameter() | protected String getReferencesParameter() | ||||
| { | { | ||||
| //bail on no references | //bail on no references | ||||
| if( notEmpty( _references ) ) { | |||||
| if( notEmpty( _references ) ) | |||||
| { | |||||
| return "/reference:" + _references; | return "/reference:" + _references; | ||||
| } else { | |||||
| } | |||||
| else | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||
| @@ -906,9 +931,12 @@ public class CSharp | |||||
| */ | */ | ||||
| protected String getTargetTypeParameter() | protected String getTargetTypeParameter() | ||||
| { | { | ||||
| if( notEmpty( _targetType ) ) { | |||||
| if( notEmpty( _targetType ) ) | |||||
| { | |||||
| return "/target:" + _targetType; | return "/target:" + _targetType; | ||||
| } else { | |||||
| } | |||||
| else | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||
| @@ -945,9 +973,12 @@ public class CSharp | |||||
| */ | */ | ||||
| protected String getWin32IconParameter() | protected String getWin32IconParameter() | ||||
| { | { | ||||
| if( _win32icon != null ) { | |||||
| if( _win32icon != null ) | |||||
| { | |||||
| return "/win32icon:" + _win32icon.toString(); | return "/win32icon:" + _win32icon.toString(); | ||||
| } else { | |||||
| } | |||||
| else | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||
| @@ -959,9 +990,12 @@ public class CSharp | |||||
| */ | */ | ||||
| protected String getWin32ResParameter() | protected String getWin32ResParameter() | ||||
| { | { | ||||
| if( _win32res != null ) { | |||||
| if( _win32res != null ) | |||||
| { | |||||
| return "/win32res:" + _win32res.toString(); | return "/win32res:" + _win32res.toString(); | ||||
| } else { | |||||
| } | |||||
| else | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||
| @@ -226,7 +226,8 @@ public class Ilasm | |||||
| { | { | ||||
| _targetType = targetType; | _targetType = targetType; | ||||
| } | } | ||||
| else { | |||||
| else | |||||
| { | |||||
| throw new TaskException( "targetType " + targetType + " is not a valid type" ); | throw new TaskException( "targetType " + targetType + " is not a valid type" ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -306,8 +307,9 @@ public class Ilasm | |||||
| public void execute() | public void execute() | ||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| if( _srcDir == null ) { | |||||
| _srcDir = getBaseDirectory(); | |||||
| if( _srcDir == null ) | |||||
| { | |||||
| _srcDir = getBaseDirectory(); | |||||
| } | } | ||||
| //get dependencies list. | //get dependencies list. | ||||
| @@ -375,9 +377,12 @@ public class Ilasm | |||||
| */ | */ | ||||
| protected String getExtraOptionsParameter() | protected String getExtraOptionsParameter() | ||||
| { | { | ||||
| if( _extraOptions != null && _extraOptions.length() != 0 ) { | |||||
| if( _extraOptions != null && _extraOptions.length() != 0 ) | |||||
| { | |||||
| return _extraOptions; | return _extraOptions; | ||||
| } else { | |||||
| } | |||||
| else | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||
| @@ -389,9 +394,12 @@ public class Ilasm | |||||
| */ | */ | ||||
| protected String getKeyfileParameter() | protected String getKeyfileParameter() | ||||
| { | { | ||||
| if( _keyfile != null ) { | |||||
| if( _keyfile != null ) | |||||
| { | |||||
| return "/keyfile:" + _keyfile.toString(); | return "/keyfile:" + _keyfile.toString(); | ||||
| } else { | |||||
| } | |||||
| else | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||
| @@ -413,7 +421,8 @@ public class Ilasm | |||||
| */ | */ | ||||
| protected String getOutputFileParameter() | protected String getOutputFileParameter() | ||||
| { | { | ||||
| if( _outputFile == null || _outputFile.length() == 0 ) { | |||||
| if( _outputFile == null || _outputFile.length() == 0 ) | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| File f = _outputFile; | File f = _outputFile; | ||||
| @@ -440,16 +449,22 @@ public class Ilasm | |||||
| protected String getTargetTypeParameter() | protected String getTargetTypeParameter() | ||||
| { | { | ||||
| if( !notEmpty( _targetType ) ) { | |||||
| if( !notEmpty( _targetType ) ) | |||||
| { | |||||
| return null; | return null; | ||||
| } | } | ||||
| if( _targetType.equals( "exe" ) ) { | |||||
| if( _targetType.equals( "exe" ) ) | |||||
| { | |||||
| return "/exe"; | return "/exe"; | ||||
| } else if( _targetType.equals( "library" ) ) { | |||||
| } | |||||
| else if( _targetType.equals( "library" ) ) | |||||
| { | |||||
| return "/dll"; | return "/dll"; | ||||
| } else { | |||||
| } | |||||
| else | |||||
| { | |||||
| return null; | return null; | ||||
| } | |||||
| } | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -9,12 +9,12 @@ package org.apache.tools.ant.taskdefs.optional.dotnet;// imports | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.avalon.framework.logger.AbstractLogEnabled; | import org.apache.avalon.framework.logger.AbstractLogEnabled; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * This is a helper class to spawn net commands out. In its initial form it | * This is a helper class to spawn net commands out. In its initial form it | ||||
| @@ -16,6 +16,7 @@ import java.io.OutputStream; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.taskdefs.Java; | import org.apache.tools.ant.taskdefs.Java; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| @@ -24,7 +25,6 @@ import org.apache.tools.ant.types.Argument; | |||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.util.FileUtils; | import org.apache.tools.ant.util.FileUtils; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * BorlandDeploymentTool is dedicated to the Borland Application Server 4.5 and | * BorlandDeploymentTool is dedicated to the Borland Application Server 4.5 and | ||||
| @@ -8,13 +8,13 @@ | |||||
| package org.apache.tools.ant.taskdefs.optional.ejb; | package org.apache.tools.ant.taskdefs.optional.ejb; | ||||
| import java.io.File; | import java.io.File; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.types.Argument; | |||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.Argument; | |||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * BorlandGenerateClient is dedicated to the Borland Application Server 4.5 This | * BorlandGenerateClient is dedicated to the Borland Application Server 4.5 This | ||||
| @@ -9,10 +9,10 @@ package org.apache.tools.ant.taskdefs.optional.ejb; | |||||
| import java.io.File; | import java.io.File; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.taskdefs.Java; | import org.apache.tools.ant.taskdefs.Java; | ||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | import org.apache.tools.ant.taskdefs.MatchingTask; | ||||
| import org.apache.tools.ant.types.Argument; | import org.apache.tools.ant.types.Argument; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| /** | /** | ||||
| @@ -15,8 +15,8 @@ import javax.xml.parsers.ParserConfigurationException; | |||||
| import javax.xml.parsers.SAXParser; | import javax.xml.parsers.SAXParser; | ||||
| import javax.xml.parsers.SAXParserFactory; | import javax.xml.parsers.SAXParserFactory; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | import org.apache.tools.ant.taskdefs.MatchingTask; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.EnumeratedAttribute; | import org.apache.tools.ant.types.EnumeratedAttribute; | ||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| @@ -9,10 +9,10 @@ package org.apache.tools.ant.taskdefs.optional.ejb; | |||||
| import java.io.File; | import java.io.File; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.taskdefs.Java; | import org.apache.tools.ant.taskdefs.Java; | ||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | import org.apache.tools.ant.taskdefs.MatchingTask; | ||||
| import org.apache.tools.ant.types.Argument; | import org.apache.tools.ant.types.Argument; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| /** | /** | ||||
| @@ -12,8 +12,8 @@ import java.io.FileInputStream; | |||||
| import java.io.FileOutputStream; | import java.io.FileOutputStream; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.io.InputStream; | import java.io.InputStream; | ||||
| import java.net.URLClassLoader; | |||||
| import java.net.URL; | import java.net.URL; | ||||
| import java.net.URLClassLoader; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.HashSet; | import java.util.HashSet; | ||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| @@ -26,13 +26,12 @@ import java.util.jar.Manifest; | |||||
| import java.util.zip.ZipEntry; | import java.util.zip.ZipEntry; | ||||
| import javax.xml.parsers.SAXParser; | import javax.xml.parsers.SAXParser; | ||||
| import org.apache.avalon.framework.logger.AbstractLogEnabled; | import org.apache.avalon.framework.logger.AbstractLogEnabled; | ||||
| import org.apache.bcel.classfile.JavaClass; | |||||
| import org.apache.bcel.classfile.ClassParser; | import org.apache.bcel.classfile.ClassParser; | ||||
| import org.apache.bcel.classfile.JavaClass; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.PathUtil; | import org.apache.tools.ant.types.PathUtil; | ||||
| @@ -608,7 +607,8 @@ public class GenericDeploymentTool | |||||
| while( i.hasNext() ) | while( i.hasNext() ) | ||||
| { | { | ||||
| String entryName = (String)i.next(); | String entryName = (String)i.next(); | ||||
| if( entryName.endsWith( ".class" ) ) { | |||||
| if( entryName.endsWith( ".class" ) ) | |||||
| { | |||||
| newSet.add( entryName.substring( 0, entryName.length() - ".class".length() ).replace( File.separatorChar, '/' ) ); | newSet.add( entryName.substring( 0, entryName.length() - ".class".length() ).replace( File.separatorChar, '/' ) ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -12,8 +12,8 @@ import java.io.FileInputStream; | |||||
| import java.io.FileOutputStream; | import java.io.FileOutputStream; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.io.InputStream; | import java.io.InputStream; | ||||
| import java.net.URLClassLoader; | |||||
| import java.net.URL; | import java.net.URL; | ||||
| import java.net.URLClassLoader; | |||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import java.util.jar.JarEntry; | import java.util.jar.JarEntry; | ||||
| @@ -11,8 +11,8 @@ import java.io.File; | |||||
| import java.io.FileOutputStream; | import java.io.FileOutputStream; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.io.InputStream; | import java.io.InputStream; | ||||
| import java.net.URLClassLoader; | |||||
| import java.net.URL; | import java.net.URL; | ||||
| import java.net.URLClassLoader; | |||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import java.util.jar.JarEntry; | import java.util.jar.JarEntry; | ||||
| @@ -943,7 +943,8 @@ public class WebsphereDeploymentTool | |||||
| " " + tempdir + | " " + tempdir + | ||||
| " " + destJar.getPath() + | " " + destJar.getPath() + | ||||
| " " + getOptions(); | " " + getOptions(); | ||||
| if( getCombinedClasspath() != null && getCombinedClasspath().toString().length() > 0 ) { | |||||
| if( getCombinedClasspath() != null && getCombinedClasspath().toString().length() > 0 ) | |||||
| { | |||||
| args += " -cp " + getCombinedClasspath(); | args += " -cp " + getCombinedClasspath(); | ||||
| } | } | ||||
| @@ -20,8 +20,8 @@ import java.util.Hashtable; | |||||
| import java.util.Locale; | import java.util.Locale; | ||||
| import org.apache.avalon.excalibur.io.FileUtil; | import org.apache.avalon.excalibur.io.FileUtil; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | import org.apache.tools.ant.taskdefs.MatchingTask; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| import org.apache.tools.ant.types.ScannerUtil; | import org.apache.tools.ant.types.ScannerUtil; | ||||
| @@ -44,7 +44,6 @@ import org.apache.tools.ant.BuildEvent; | |||||
| import org.apache.tools.ant.BuildListener; | import org.apache.tools.ant.BuildListener; | ||||
| import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
| /** | /** | ||||
| * This is a simple grafical user interface to provide the information needed by | * This is a simple grafical user interface to provide the information needed by | ||||
| * ANT and to start the build-process within IBM VisualAge for Java. <p> | * ANT and to start the build-process within IBM VisualAge for Java. <p> | ||||
| @@ -1544,31 +1543,38 @@ public class VAJAntToolGUI extends Frame | |||||
| } | } | ||||
| } | } | ||||
| // MenuItems | // MenuItems | ||||
| if( e.getSource() == VAJAntToolGUI.this.getSaveMenuItem() ) { | |||||
| if( e.getSource() == VAJAntToolGUI.this.getSaveMenuItem() ) | |||||
| { | |||||
| saveBuildInfo(); | saveBuildInfo(); | ||||
| } | } | ||||
| if( e.getSource() == VAJAntToolGUI.this.getAboutMenuItem() ) { | |||||
| if( e.getSource() == VAJAntToolGUI.this.getAboutMenuItem() ) | |||||
| { | |||||
| getAboutDialog().show(); | getAboutDialog().show(); | ||||
| } | } | ||||
| if( e.getSource() == VAJAntToolGUI.this.getShowLogMenuItem() ) { | |||||
| if( e.getSource() == VAJAntToolGUI.this.getShowLogMenuItem() ) | |||||
| { | |||||
| getMessageFrame().show(); | getMessageFrame().show(); | ||||
| } | } | ||||
| /* | /* | ||||
| * #### About dialog #### | * #### About dialog #### | ||||
| */ | */ | ||||
| if( e.getSource() == VAJAntToolGUI.this.getAboutOkButton() ) { | |||||
| if( e.getSource() == VAJAntToolGUI.this.getAboutOkButton() ) | |||||
| { | |||||
| getAboutDialog().dispose(); | getAboutDialog().dispose(); | ||||
| } | } | ||||
| /* | /* | ||||
| * #### Log frame #### | * #### Log frame #### | ||||
| */ | */ | ||||
| if( e.getSource() == VAJAntToolGUI.this.getMessageOkButton() ) { | |||||
| if( e.getSource() == VAJAntToolGUI.this.getMessageOkButton() ) | |||||
| { | |||||
| getMessageFrame().dispose(); | getMessageFrame().dispose(); | ||||
| } | } | ||||
| if( e.getSource() == VAJAntToolGUI.this.getMessageClearLogButton() ) { | |||||
| if( e.getSource() == VAJAntToolGUI.this.getMessageClearLogButton() ) | |||||
| { | |||||
| getMessageTextArea().setText( "" ); | getMessageTextArea().setText( "" ); | ||||
| } | } | ||||
| if( e.getSource() == VAJAntToolGUI.this.getMessageOkButton() ) { | |||||
| if( e.getSource() == VAJAntToolGUI.this.getMessageOkButton() ) | |||||
| { | |||||
| getMessageFrame().dispose(); | getMessageFrame().dispose(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -1587,13 +1593,16 @@ public class VAJAntToolGUI extends Frame | |||||
| { | { | ||||
| try | try | ||||
| { | { | ||||
| if( e.getSource() == VAJAntToolGUI.this.getTargetList() ) { | |||||
| if( e.getSource() == VAJAntToolGUI.this.getTargetList() ) | |||||
| { | |||||
| getBuildButton().setEnabled( true ); | getBuildButton().setEnabled( true ); | ||||
| } | } | ||||
| if( e.getSource() == VAJAntToolGUI.this.getMessageOutputLevelChoice() ) { | |||||
| if( e.getSource() == VAJAntToolGUI.this.getMessageOutputLevelChoice() ) | |||||
| { | |||||
| getBuildInfo().setOutputMessageLevel( getMessageOutputLevelChoice().getSelectedIndex() ); | getBuildInfo().setOutputMessageLevel( getMessageOutputLevelChoice().getSelectedIndex() ); | ||||
| } | } | ||||
| if( e.getSource() == VAJAntToolGUI.this.getTargetList() ) { | |||||
| if( e.getSource() == VAJAntToolGUI.this.getTargetList() ) | |||||
| { | |||||
| getBuildInfo().setTarget( getTargetList().getSelectedItem() ); | getBuildInfo().setTarget( getTargetList().getSelectedItem() ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -1610,10 +1619,12 @@ public class VAJAntToolGUI extends Frame | |||||
| */ | */ | ||||
| public void propertyChange( java.beans.PropertyChangeEvent evt ) | public void propertyChange( java.beans.PropertyChangeEvent evt ) | ||||
| { | { | ||||
| if( evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && ( evt.getPropertyName().equals( "projectName" ) ) ) { | |||||
| if( evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && ( evt.getPropertyName().equals( "projectName" ) ) ) | |||||
| { | |||||
| connectProjectNameToLabel(); | connectProjectNameToLabel(); | ||||
| } | } | ||||
| if( evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && ( evt.getPropertyName().equals( "buildFileName" ) ) ) { | |||||
| if( evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && ( evt.getPropertyName().equals( "buildFileName" ) ) ) | |||||
| { | |||||
| connectBuildFileNameToTextField(); | connectBuildFileNameToTextField(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -1625,7 +1636,8 @@ public class VAJAntToolGUI extends Frame | |||||
| */ | */ | ||||
| public void textValueChanged( TextEvent e ) | public void textValueChanged( TextEvent e ) | ||||
| { | { | ||||
| if( e.getSource() == VAJAntToolGUI.this.getBuildFileTextField() ) { | |||||
| if( e.getSource() == VAJAntToolGUI.this.getBuildFileTextField() ) | |||||
| { | |||||
| connectTextFieldToBuildFileName(); | connectTextFieldToBuildFileName(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -1652,10 +1664,12 @@ public class VAJAntToolGUI extends Frame | |||||
| dispose(); | dispose(); | ||||
| System.exit( 0 ); | System.exit( 0 ); | ||||
| } | } | ||||
| if( e.getSource() == VAJAntToolGUI.this.getAboutDialog() ) { | |||||
| if( e.getSource() == VAJAntToolGUI.this.getAboutDialog() ) | |||||
| { | |||||
| getAboutDialog().dispose(); | getAboutDialog().dispose(); | ||||
| } | } | ||||
| if( e.getSource() == VAJAntToolGUI.this.getMessageFrame() ) { | |||||
| if( e.getSource() == VAJAntToolGUI.this.getMessageFrame() ) | |||||
| { | |||||
| getMessageFrame().dispose(); | getMessageFrame().dispose(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -8,8 +8,8 @@ | |||||
| package org.apache.tools.ant.taskdefs.optional.ide; | package org.apache.tools.ant.taskdefs.optional.ide; | ||||
| import java.io.File; | import java.io.File; | ||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.myrmidon.framework.Pattern; | import org.apache.myrmidon.framework.Pattern; | ||||
| import org.apache.myrmidon.framework.PatternSet; | import org.apache.myrmidon.framework.PatternSet; | ||||
| import org.apache.myrmidon.framework.PatternUtil; | import org.apache.myrmidon.framework.PatternUtil; | ||||
| @@ -11,15 +11,14 @@ import java.io.File; | |||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.util.Enumeration; | import java.util.Enumeration; | ||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.tools.ant.types.CommandlineJava; | import org.apache.tools.ant.types.CommandlineJava; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.PathUtil; | import org.apache.tools.ant.types.PathUtil; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * Taskdef for the JJTree compiler compiler. | * Taskdef for the JJTree compiler compiler. | ||||
| @@ -11,17 +11,14 @@ import java.io.File; | |||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.util.Enumeration; | import java.util.Enumeration; | ||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.tools.ant.types.CommandlineJava; | import org.apache.tools.ant.types.CommandlineJava; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.PathUtil; | import org.apache.tools.ant.types.PathUtil; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.avalon.excalibur.util.StringUtil; | |||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * Taskdef for the JavaCC compiler compiler. | * Taskdef for the JavaCC compiler compiler. | ||||
| @@ -11,15 +11,14 @@ import java.io.File; | |||||
| import java.io.FileWriter; | import java.io.FileWriter; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.io.PrintWriter; | import java.io.PrintWriter; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.tools.ant.types.CommandlineJava; | import org.apache.tools.ant.types.CommandlineJava; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.tools.ant.util.FileUtils; | import org.apache.tools.ant.util.FileUtils; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * Ant task to run JDepend tests. <p> | * Ant task to run JDepend tests. <p> | ||||
| @@ -234,7 +233,8 @@ public class JDependTask | |||||
| File f = new File( elements[ i ] ); | File f = new File( elements[ i ] ); | ||||
| // not necessary as JDepend would fail, but why loose some time? | // not necessary as JDepend would fail, but why loose some time? | ||||
| if( !f.exists() || !f.isDirectory() ) { | |||||
| if( !f.exists() || !f.isDirectory() ) | |||||
| { | |||||
| throw new TaskException( "\"" + f.getPath() + "\" does not represent a valid directory. JDepend would fail." ); | throw new TaskException( "\"" + f.getPath() + "\" does not represent a valid directory. JDepend would fail." ); | ||||
| } | } | ||||
| commandline.addArgument( f.getPath() ); | commandline.addArgument( f.getPath() ); | ||||
| @@ -11,10 +11,10 @@ import java.io.File; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | import org.apache.tools.ant.taskdefs.MatchingTask; | ||||
| import org.apache.tools.ant.taskdefs.optional.jsp.compilers.CompilerAdapter; | import org.apache.tools.ant.taskdefs.optional.jsp.compilers.CompilerAdapter; | ||||
| import org.apache.tools.ant.taskdefs.optional.jsp.compilers.CompilerAdapterFactory; | import org.apache.tools.ant.taskdefs.optional.jsp.compilers.CompilerAdapterFactory; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| /** | /** | ||||
| @@ -101,9 +101,12 @@ public class JspC extends MatchingTask | |||||
| public void setClasspath( Path cp ) | public void setClasspath( Path cp ) | ||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| if( classpath == null ) { | |||||
| if( classpath == null ) | |||||
| { | |||||
| classpath = cp; | classpath = cp; | ||||
| } else { | |||||
| } | |||||
| else | |||||
| { | |||||
| classpath.append( cp ); | classpath.append( cp ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -299,7 +302,8 @@ public class JspC extends MatchingTask | |||||
| public Path createClasspath() | public Path createClasspath() | ||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| if( classpath == null ) { | |||||
| if( classpath == null ) | |||||
| { | |||||
| classpath = new Path(); | classpath = new Path(); | ||||
| } | } | ||||
| Path path1 = classpath; | Path path1 = classpath; | ||||
| @@ -334,9 +338,11 @@ public class JspC extends MatchingTask | |||||
| // calculate where the files will end up: | // calculate where the files will end up: | ||||
| File dest = null; | File dest = null; | ||||
| if( packageName == null ) { | |||||
| if( packageName == null ) | |||||
| { | |||||
| dest = destDir; | dest = destDir; | ||||
| } else | |||||
| } | |||||
| else | |||||
| { | { | ||||
| String path = destDir.getPath() + File.separatorChar + | String path = destDir.getPath() + File.separatorChar + | ||||
| packageName.replace( '.', File.separatorChar ); | packageName.replace( '.', File.separatorChar ); | ||||
| @@ -12,11 +12,11 @@ import java.util.ArrayList; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.StringTokenizer; | import java.util.StringTokenizer; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.taskdefs.Java; | import org.apache.tools.ant.taskdefs.Java; | ||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | import org.apache.tools.ant.taskdefs.MatchingTask; | ||||
| import org.apache.tools.ant.types.Path; | |||||
| import org.apache.tools.ant.types.Argument; | import org.apache.tools.ant.types.Argument; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.Path; | |||||
| /** | /** | ||||
| * Class to precompile JSP's using weblogic's jsp compiler (weblogic.jspc) | * Class to precompile JSP's using weblogic's jsp compiler (weblogic.jspc) | ||||
| @@ -10,8 +10,8 @@ package org.apache.tools.ant.taskdefs.optional.jsp.compilers; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.taskdefs.Java; | import org.apache.tools.ant.taskdefs.Java; | ||||
| import org.apache.tools.ant.taskdefs.optional.jsp.JspC; | import org.apache.tools.ant.taskdefs.optional.jsp.JspC; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.tools.ant.types.Argument; | import org.apache.tools.ant.types.Argument; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| /** | /** | ||||
| * The implementation of the jasper compiler. This is a cut-and-paste of the | * The implementation of the jasper compiler. This is a cut-and-paste of the | ||||
| @@ -37,12 +37,14 @@ public class JasperC | |||||
| // the project log | // the project log | ||||
| //FIXME | //FIXME | ||||
| Java java = null;//(Java)( getJspc().getProject() ).createTask( "java" ); | Java java = null;//(Java)( getJspc().getProject() ).createTask( "java" ); | ||||
| if( getJspc().getClasspath() != null ) { | |||||
| if( getJspc().getClasspath() != null ) | |||||
| { | |||||
| java.addClasspath( getJspc().getClasspath() ); | java.addClasspath( getJspc().getClasspath() ); | ||||
| } | } | ||||
| java.setClassname( "org.apache.jasper.JspC" ); | java.setClassname( "org.apache.jasper.JspC" ); | ||||
| String args[] = cmd.getArguments(); | String args[] = cmd.getArguments(); | ||||
| for( int i = 0; i < args.length; i++ ) { | |||||
| for( int i = 0; i < args.length; i++ ) | |||||
| { | |||||
| java.addArg( new Argument( args[ i ] ) ); | java.addArg( new Argument( args[ i ] ) ); | ||||
| } | } | ||||
| java.execute(); | java.execute(); | ||||
| @@ -13,7 +13,6 @@ import java.util.Arrays; | |||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | import org.apache.tools.ant.types.DirectoryScanner; | ||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| import org.apache.tools.ant.types.ScannerUtil; | import org.apache.tools.ant.types.ScannerUtil; | ||||
| @@ -19,20 +19,19 @@ import java.util.Hashtable; | |||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import java.util.Properties; | import java.util.Properties; | ||||
| import java.util.Random; | import java.util.Random; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.api.AbstractTask; | |||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.taskdefs.exec.LogOutputStream; | import org.apache.tools.ant.taskdefs.exec.LogOutputStream; | ||||
| import org.apache.tools.ant.types.Argument; | import org.apache.tools.ant.types.Argument; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.tools.ant.types.CommandlineJava; | import org.apache.tools.ant.types.CommandlineJava; | ||||
| import org.apache.tools.ant.types.EnumeratedAttribute; | import org.apache.tools.ant.types.EnumeratedAttribute; | ||||
| import org.apache.tools.ant.types.EnvironmentVariable; | import org.apache.tools.ant.types.EnvironmentVariable; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.SysProperties; | |||||
| import org.apache.tools.ant.types.PathUtil; | import org.apache.tools.ant.types.PathUtil; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.tools.ant.types.SysProperties; | |||||
| /** | /** | ||||
| * Ant task to run JUnit tests. <p> | * Ant task to run JUnit tests. <p> | ||||
| @@ -671,7 +670,8 @@ public class JUnitTask extends Task | |||||
| } | } | ||||
| finally | finally | ||||
| { | { | ||||
| if( !propsFile.delete() ) { | |||||
| if( !propsFile.delete() ) | |||||
| { | |||||
| throw new TaskException( "Could not delete temporary properties file." ); | throw new TaskException( "Could not delete temporary properties file." ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -15,7 +15,6 @@ import java.text.NumberFormat; | |||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| import junit.framework.AssertionFailedError; | import junit.framework.AssertionFailedError; | ||||
| import junit.framework.Test; | import junit.framework.Test; | ||||
| import org.apache.avalon.excalibur.util.StringUtil; | import org.apache.avalon.excalibur.util.StringUtil; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| @@ -18,7 +18,6 @@ import javax.xml.parsers.DocumentBuilder; | |||||
| import javax.xml.parsers.DocumentBuilderFactory; | import javax.xml.parsers.DocumentBuilderFactory; | ||||
| import junit.framework.AssertionFailedError; | import junit.framework.AssertionFailedError; | ||||
| import junit.framework.Test; | import junit.framework.Test; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.w3c.dom.Document; | import org.w3c.dom.Document; | ||||
| import org.w3c.dom.Element; | import org.w3c.dom.Element; | ||||
| @@ -19,8 +19,8 @@ import javax.xml.parsers.DocumentBuilder; | |||||
| import javax.xml.parsers.DocumentBuilderFactory; | import javax.xml.parsers.DocumentBuilderFactory; | ||||
| import org.apache.avalon.framework.ExceptionUtil; | import org.apache.avalon.framework.ExceptionUtil; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| import org.apache.tools.ant.types.ScannerUtil; | import org.apache.tools.ant.types.ScannerUtil; | ||||
| import org.w3c.dom.Document; | import org.w3c.dom.Document; | ||||
| @@ -15,17 +15,17 @@ import java.util.ArrayList; | |||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import java.util.Random; | import java.util.Random; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.types.Argument; | import org.apache.tools.ant.types.Argument; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.tools.ant.types.CommandlineJava; | import org.apache.tools.ant.types.CommandlineJava; | ||||
| import org.apache.tools.ant.types.DirectoryScanner; | |||||
| import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.ScannerUtil; | import org.apache.tools.ant.types.ScannerUtil; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * Somewhat abstract framework to be used for other metama 2.0 tasks. This | * Somewhat abstract framework to be used for other metama 2.0 tasks. This | ||||
| @@ -13,15 +13,15 @@ import java.io.IOException; | |||||
| import java.io.PrintWriter; | import java.io.PrintWriter; | ||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Random; | import java.util.Random; | ||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| import org.apache.avalon.excalibur.io.IOUtil; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| import org.apache.tools.ant.taskdefs.exec.Execute2; | import org.apache.tools.ant.taskdefs.exec.Execute2; | ||||
| import org.apache.tools.ant.types.Argument; | import org.apache.tools.ant.types.Argument; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.tools.ant.types.CommandlineJava; | import org.apache.tools.ant.types.CommandlineJava; | ||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.types.Commandline; | |||||
| import org.apache.avalon.excalibur.io.IOUtil; | |||||
| import org.apache.aut.nativelib.ExecManager; | |||||
| /** | /** | ||||
| * Simple Metamata MParse task based on the original written by <a | * Simple Metamata MParse task based on the original written by <a | ||||