- removed useless/duplicate imports - added explicit imports rather than * - changed specifiers order to be conform to JLS. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269827 13f79535-47bb-0310-9956-ffa450edef68master
@@ -54,11 +54,20 @@ | |||
package org.apache.tools.ant; | |||
import java.lang.reflect.*; | |||
import java.util.*; | |||
import java.util.zip.*; | |||
import java.io.*; | |||
import java.net.*; | |||
import java.lang.reflect.Method; | |||
import java.lang.reflect.InvocationTargetException; | |||
import java.util.Enumeration; | |||
import java.util.Vector; | |||
import java.util.Hashtable; | |||
import java.util.zip.ZipFile; | |||
import java.util.zip.ZipEntry; | |||
import java.io.File; | |||
import java.io.InputStream; | |||
import java.io.FileInputStream; | |||
import java.io.IOException; | |||
import java.io.ByteArrayOutputStream; | |||
import java.net.URL; | |||
import java.net.MalformedURLException; | |||
import org.apache.tools.ant.types.Path; | |||
/** | |||
@@ -163,7 +172,7 @@ public class AntClassLoader extends ClassLoader implements BuildListener { | |||
/** | |||
* The size of buffers to be used in this classloader. | |||
*/ | |||
static private final int BUFFER_SIZE = 8192; | |||
private final static int BUFFER_SIZE = 8192; | |||
/** | |||
* The components of the classpath that the classloader searches for classes | |||
@@ -402,7 +411,7 @@ public class AntClassLoader extends ClassLoader implements BuildListener { | |||
* Force initialization of a class in a JDK 1.1 compatible, albeit hacky | |||
* way | |||
*/ | |||
static public void initializeClass(Class theClass) { | |||
public static void initializeClass(Class theClass) { | |||
// ***HACK*** We try to create an instance to force the VM to run the | |||
// class' static initializer. We don't care if the instance can't | |||
// be created - we are just interested in the side effect. | |||
@@ -54,7 +54,8 @@ | |||
package org.apache.tools.ant; | |||
import java.io.*; | |||
import java.io.PrintWriter; | |||
import java.io.PrintStream; | |||
/** | |||
* Signals an error condition during a build. | |||
@@ -54,7 +54,7 @@ | |||
package org.apache.tools.ant; | |||
import java.io.*; | |||
import java.io.PrintStream; | |||
/** | |||
* Interface used by Ant to log the build output. | |||
@@ -54,7 +54,7 @@ | |||
package org.apache.tools.ant; | |||
import java.io.*; | |||
import java.io.PrintStream; | |||
/** | |||
* Writes build event to a PrintStream. Currently, it | |||
@@ -54,8 +54,10 @@ | |||
package org.apache.tools.ant; | |||
import java.io.*; | |||
import java.util.*; | |||
import java.io.OutputStream; | |||
import java.io.ByteArrayOutputStream; | |||
import java.io.IOException; | |||
import java.util.Hashtable; | |||
/** | |||
@@ -67,7 +69,7 @@ import java.util.*; | |||
*/ | |||
public class DemuxOutputStream extends OutputStream { | |||
static private final int MAX_SIZE = 1024; | |||
private final static int MAX_SIZE = 1024; | |||
private Hashtable buffers = new Hashtable(); | |||
// private ByteArrayOutputStream buffer = new ByteArrayOutputStream(); | |||
@@ -56,7 +56,7 @@ package org.apache.tools.ant; | |||
import java.io.File; | |||
import java.io.FilenameFilter; | |||
import java.io.IOException; | |||
/** | |||
* Filters filenames to determine whether or not the file is desirable. | |||
@@ -54,8 +54,9 @@ | |||
package org.apache.tools.ant; | |||
import java.io.*; | |||
import java.util.*; | |||
import java.io.File; | |||
import java.util.Vector; | |||
import java.util.StringTokenizer; | |||
/** | |||
* Class for scanning a directory for files/directories that match a certain | |||
@@ -53,7 +53,7 @@ | |||
*/ | |||
package org.apache.tools.ant; | |||
import java.io.*; | |||
import java.io.File; | |||
/** | |||
* An interface used to describe the actions required by any type of | |||
@@ -58,9 +58,12 @@ import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.DataType; | |||
import org.apache.tools.ant.types.EnumeratedAttribute; | |||
import java.lang.reflect.*; | |||
import java.lang.reflect.Method; | |||
import java.lang.reflect.InvocationTargetException; | |||
import java.lang.reflect.Constructor; | |||
import java.io.File; | |||
import java.util.*; | |||
import java.util.Enumeration; | |||
import java.util.Hashtable; | |||
/** | |||
* Helper class that collects the methods a task or nested element | |||
@@ -250,7 +253,7 @@ public class IntrospectionHelper implements BuildListener { | |||
/** | |||
* Factory method for helper objects. | |||
*/ | |||
public synchronized static IntrospectionHelper getHelper(Class c) { | |||
public static synchronized IntrospectionHelper getHelper(Class c) { | |||
IntrospectionHelper ih = (IntrospectionHelper) helpers.get(c); | |||
if (ih == null) { | |||
ih = new IntrospectionHelper(c); | |||
@@ -54,10 +54,13 @@ | |||
package org.apache.tools.ant; | |||
import java.io.*; | |||
import java.util.*; | |||
import java.net.*; | |||
import java.lang.reflect.*; | |||
import java.io.File; | |||
import java.io.FilenameFilter; | |||
import java.util.StringTokenizer; | |||
import java.util.Properties; | |||
import java.net.URL; | |||
import java.net.MalformedURLException; | |||
import java.lang.reflect.Method; | |||
/** | |||
* This is the Ant command line front end to end. This front end | |||
@@ -67,7 +70,7 @@ import java.lang.reflect.*; | |||
* @author <a href="mailto:conor@apache.org">Conor MacNeill</a> | |||
*/ | |||
public class Launcher { | |||
static private File determineAntHome11() { | |||
private static File determineAntHome11() { | |||
String classpath = System.getProperty("java.class.path"); | |||
StringTokenizer tokenizer = new StringTokenizer(classpath, System.getProperty("path.separator")); | |||
while (tokenizer.hasMoreTokens()) { | |||
@@ -82,7 +85,7 @@ public class Launcher { | |||
return null; | |||
} | |||
static private File determineAntHome(ClassLoader systemClassLoader) { | |||
private static File determineAntHome(ClassLoader systemClassLoader) { | |||
try { | |||
String className = Launcher.class.getName().replace('.', '/') + ".class"; | |||
URL classResource = systemClassLoader.getResource(className); | |||
@@ -119,7 +122,7 @@ public class Launcher { | |||
return null; | |||
} | |||
static private void addDirJars(AntClassLoader classLoader, File jarDir) { | |||
private static void addDirJars(AntClassLoader classLoader, File jarDir) { | |||
String[] fileList = jarDir.list(new FilenameFilter() { | |||
public boolean accept(File dir, String name) { | |||
return name.endsWith(".jar"); | |||
@@ -134,7 +137,7 @@ public class Launcher { | |||
} | |||
} | |||
static private void addToolsJar(AntClassLoader antLoader) { | |||
private static void addToolsJar(AntClassLoader antLoader) { | |||
String javaHome = System.getProperty("java.home"); | |||
if (javaHome.endsWith("jre")) { | |||
javaHome = javaHome.substring(0, javaHome.length() - 4); | |||
@@ -150,7 +153,7 @@ public class Launcher { | |||
} | |||
static public void main(String[] args) { | |||
public static void main(String[] args) { | |||
File antHome = null; | |||
ClassLoader systemClassLoader = Launcher.class.getClassLoader(); | |||
if (systemClassLoader == null) { | |||
@@ -62,7 +62,7 @@ public class Location { | |||
private int lineNumber; | |||
private int columnNumber; | |||
public static final Location UNKNOWN_LOCATION = new Location(); | |||
public final static Location UNKNOWN_LOCATION = new Location(); | |||
/** | |||
* Creates an "unknown" location. | |||
@@ -54,8 +54,14 @@ | |||
package org.apache.tools.ant; | |||
import java.io.*; | |||
import java.util.*; | |||
import java.io.File; | |||
import java.io.PrintStream; | |||
import java.io.FileOutputStream; | |||
import java.io.IOException; | |||
import java.io.InputStream; | |||
import java.util.Vector; | |||
import java.util.Properties; | |||
import java.util.Enumeration; | |||
/** | |||
* Command line entry point into Ant. This class is entered via the | |||
@@ -72,7 +78,7 @@ import java.util.*; | |||
public class Main { | |||
/** The default build file name */ | |||
public static final String DEFAULT_BUILD_FILENAME = "build.xml"; | |||
public final static String DEFAULT_BUILD_FILENAME = "build.xml"; | |||
/** Our current message output status. Follows Project.MSG_XXX */ | |||
private int msgOutputLevel = Project.MSG_INFO; | |||
@@ -562,7 +568,7 @@ public class Main { | |||
private static String antVersion = null; | |||
public synchronized static String getAntVersion() throws BuildException { | |||
public static synchronized String getAntVersion() throws BuildException { | |||
if (antVersion == null) { | |||
try { | |||
Properties props = new Properties(); | |||
@@ -53,8 +53,9 @@ | |||
*/ | |||
package org.apache.tools.ant; | |||
import java.util.*; | |||
import java.io.*; | |||
import java.util.NoSuchElementException; | |||
import java.util.StringTokenizer; | |||
import java.io.File; | |||
/** | |||
* A Path tokenizer takes a path and returns the components that make up | |||
@@ -54,9 +54,15 @@ | |||
package org.apache.tools.ant; | |||
import java.io.*; | |||
import java.util.*; | |||
import java.text.*; | |||
import java.io.File; | |||
import java.io.InputStream; | |||
import java.io.IOException; | |||
import java.util.Hashtable; | |||
import java.util.Vector; | |||
import java.util.Properties; | |||
import java.util.Enumeration; | |||
import java.util.Stack; | |||
import org.apache.tools.ant.types.FilterSet; | |||
import org.apache.tools.ant.types.FilterSetCollection; | |||
@@ -76,27 +82,27 @@ import org.apache.tools.ant.util.FileUtils; | |||
public class Project { | |||
public static final int MSG_ERR = 0; | |||
public static final int MSG_WARN = 1; | |||
public static final int MSG_INFO = 2; | |||
public static final int MSG_VERBOSE = 3; | |||
public static final int MSG_DEBUG = 4; | |||
public final static int MSG_ERR = 0; | |||
public final static int MSG_WARN = 1; | |||
public final static int MSG_INFO = 2; | |||
public final static int MSG_VERBOSE = 3; | |||
public final static int MSG_DEBUG = 4; | |||
// private set of constants to represent the state | |||
// of a DFS of the Target dependencies | |||
private static final String VISITING = "VISITING"; | |||
private static final String VISITED = "VISITED"; | |||
private final static String VISITING = "VISITING"; | |||
private final static String VISITED = "VISITED"; | |||
private static String javaVersion; | |||
public static final String JAVA_1_0 = "1.0"; | |||
public static final String JAVA_1_1 = "1.1"; | |||
public static final String JAVA_1_2 = "1.2"; | |||
public static final String JAVA_1_3 = "1.3"; | |||
public static final String JAVA_1_4 = "1.4"; | |||
public final static String JAVA_1_0 = "1.0"; | |||
public final static String JAVA_1_1 = "1.1"; | |||
public final static String JAVA_1_2 = "1.2"; | |||
public final static String JAVA_1_3 = "1.3"; | |||
public final static String JAVA_1_4 = "1.4"; | |||
public static final String TOKEN_START = FilterSet.DEFAULT_TOKEN_START; | |||
public static final String TOKEN_END = FilterSet.DEFAULT_TOKEN_END; | |||
public final static String TOKEN_START = FilterSet.DEFAULT_TOKEN_START; | |||
public final static String TOKEN_END = FilterSet.DEFAULT_TOKEN_END; | |||
private String name; | |||
private String description; | |||
@@ -641,7 +647,7 @@ public class Project { | |||
* @return the native version of to_process or | |||
* an empty string if to_process is null or empty | |||
*/ | |||
static public String translatePath(String to_process) { | |||
public static String translatePath(String to_process) { | |||
if ( to_process == null || to_process.length() == 0 ) { | |||
return ""; | |||
} | |||
@@ -54,12 +54,25 @@ | |||
package org.apache.tools.ant; | |||
import java.io.*; | |||
import java.util.*; | |||
import org.xml.sax.*; | |||
import org.w3c.dom.*; | |||
import org.apache.tools.ant.taskdefs.*; | |||
import javax.xml.parsers.*; | |||
import java.io.File; | |||
import java.io.FileInputStream; | |||
import java.io.FileNotFoundException; | |||
import java.io.IOException; | |||
import java.util.Hashtable; | |||
import java.util.Vector; | |||
import java.util.Enumeration; | |||
import org.xml.sax.Locator; | |||
import org.xml.sax.InputSource; | |||
import org.xml.sax.HandlerBase; | |||
import org.xml.sax.SAXParseException; | |||
import org.xml.sax.SAXException; | |||
import org.xml.sax.DocumentHandler; | |||
import org.xml.sax.AttributeList; | |||
import javax.xml.parsers.SAXParserFactory; | |||
import javax.xml.parsers.SAXParser; | |||
import javax.xml.parsers.ParserConfigurationException; | |||
/** | |||
* Configures a Project (complete with Targets and Tasks) based on | |||
@@ -54,7 +54,9 @@ | |||
package org.apache.tools.ant; | |||
import java.util.*; | |||
import java.util.Enumeration; | |||
import java.util.Vector; | |||
import java.util.StringTokenizer; | |||
/** | |||
* This class implements a target object with required parameters. | |||
@@ -54,8 +54,8 @@ | |||
package org.apache.tools.ant; | |||
import java.lang.reflect.*; | |||
import java.util.*; | |||
import java.lang.reflect.Method; | |||
/** | |||
* Use introspection to "adapt" an arbitrary Bean ( not extending Task, but with similar | |||
@@ -54,10 +54,17 @@ | |||
package org.apache.tools.ant; | |||
import java.io.*; | |||
import java.util.*; | |||
import javax.xml.parsers.*; | |||
import org.w3c.dom.*; | |||
import java.io.Writer; | |||
import java.io.OutputStreamWriter; | |||
import java.io.FileOutputStream; | |||
import java.io.IOException; | |||
import java.util.Hashtable; | |||
import java.util.Stack; | |||
import javax.xml.parsers.DocumentBuilder; | |||
import javax.xml.parsers.DocumentBuilderFactory; | |||
import org.w3c.dom.Document; | |||
import org.w3c.dom.Element; | |||
import org.w3c.dom.Text; | |||
import org.apache.tools.ant.util.DOMElementWriter; | |||
/** | |||
@@ -68,7 +75,7 @@ import org.apache.tools.ant.util.DOMElementWriter; | |||
*/ | |||
public class XmlLogger implements BuildListener { | |||
private static final DocumentBuilder builder = getDocumentBuilder(); | |||
private final static DocumentBuilder builder = getDocumentBuilder(); | |||
private static DocumentBuilder getDocumentBuilder() { | |||
try { | |||
@@ -80,15 +87,15 @@ public class XmlLogger implements BuildListener { | |||
} | |||
// XML constants for tag names and attribute names | |||
private static final String BUILD_TAG = "build"; | |||
private static final String TARGET_TAG = "target"; | |||
private static final String TASK_TAG = "task"; | |||
private static final String MESSAGE_TAG = "message"; | |||
private static final String NAME_ATTR = "name"; | |||
private static final String TIME_ATTR = "time"; | |||
private static final String PRIORITY_ATTR = "priority"; | |||
private static final String LOCATION_ATTR = "location"; | |||
private static final String ERROR_ATTR = "error"; | |||
private final static String BUILD_TAG = "build"; | |||
private final static String TARGET_TAG = "target"; | |||
private final static String TASK_TAG = "task"; | |||
private final static String MESSAGE_TAG = "message"; | |||
private final static String NAME_ATTR = "name"; | |||
private final static String TIME_ATTR = "time"; | |||
private final static String PRIORITY_ATTR = "priority"; | |||
private final static String LOCATION_ATTR = "location"; | |||
private final static String ERROR_ATTR = "error"; | |||
private Document doc; | |||
private Hashtable tasks = new Hashtable(); | |||
@@ -96,7 +103,7 @@ public class XmlLogger implements BuildListener { | |||
private Hashtable threadStacks = new Hashtable(); | |||
private TimedElement buildElement = null; | |||
static private class TimedElement { | |||
private static class TimedElement { | |||
long startTime; | |||
Element element; | |||
} | |||
@@ -54,7 +54,11 @@ | |||
package org.apache.tools.ant.listener; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.BuildListener; | |||
import org.apache.tools.ant.BuildEvent; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.Target; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.log4j.Category; | |||
import org.apache.log4j.helpers.NullEnumeration; | |||
@@ -66,7 +70,7 @@ import org.apache.log4j.helpers.NullEnumeration; | |||
* @author <a href="mailto:conor@apache.org>Conor MacNeill </a> | |||
*/ | |||
public class Log4jListener implements BuildListener { | |||
static final String LOG4J_CONFIG_PROPERTY = "log4j.configuration"; | |||
final static String LOG4J_CONFIG_PROPERTY = "log4j.configuration"; | |||
private boolean initialized = false; | |||
@@ -54,10 +54,20 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.BuildListener; | |||
import org.apache.tools.ant.DefaultLogger; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.ProjectHelper; | |||
import org.apache.tools.ant.util.FileUtils; | |||
import java.io.*; | |||
import java.util.*; | |||
import java.io.File; | |||
import java.io.PrintStream; | |||
import java.io.FileOutputStream; | |||
import java.io.IOException; | |||
import java.util.Vector; | |||
import java.util.Hashtable; | |||
import java.util.Enumeration; | |||
/** | |||
* Call Ant in a sub-project | |||
@@ -56,7 +56,7 @@ package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.IntrospectionHelper; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.TaskContainer; | |||
import org.apache.tools.ant.types.EnumeratedAttribute; | |||
@@ -64,7 +64,13 @@ import org.apache.tools.ant.types.EnumeratedAttribute; | |||
import java.util.Enumeration; | |||
import java.util.Hashtable; | |||
import java.util.Vector; | |||
import java.io.*; | |||
import java.io.File; | |||
import java.io.PrintWriter; | |||
import java.io.OutputStreamWriter; | |||
import java.io.FileOutputStream; | |||
import java.io.UnsupportedEncodingException; | |||
import java.io.FileWriter; | |||
import java.io.IOException; | |||
/** | |||
* Creates a partial DTD for Ant from the currently known tasks. | |||
@@ -54,11 +54,15 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import java.io.*; | |||
import java.util.*; | |||
import org.apache.tools.ant.*; | |||
import java.io.File; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.AntClassLoader; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.taskdefs.condition.Condition; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.Reference; | |||
/** | |||
* Will set the given property if the requested resource is available at runtime. | |||
@@ -54,8 +54,14 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import java.io.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import java.io.File; | |||
import java.io.BufferedReader; | |||
import java.io.FileReader; | |||
import java.io.PrintWriter; | |||
import java.io.FileWriter; | |||
import java.io.IOException; | |||
/** | |||
* CVSLogin | |||
@@ -54,7 +54,8 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
/** | |||
* Call another target in the same project. | |||
@@ -54,11 +54,13 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.types.FileSet; | |||
import org.apache.tools.ant.types.PatternSet; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import java.io.*; | |||
import java.util.*; | |||
/** | |||
* Chmod equivalent for unix-like environments. | |||
@@ -54,10 +54,11 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.PatternSet; | |||
import java.util.*; | |||
import java.util.Vector; | |||
import java.util.Enumeration; | |||
/** | |||
* This task will compile and load a new taskdef all in one step. | |||
@@ -54,12 +54,25 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.util.*; | |||
import java.io.*; | |||
import java.util.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.types.FileSet; | |||
import org.apache.tools.ant.types.Mapper; | |||
import org.apache.tools.ant.types.FilterSet; | |||
import org.apache.tools.ant.types.FilterSetCollection; | |||
import org.apache.tools.ant.util.FileUtils; | |||
import org.apache.tools.ant.util.FileNameMapper; | |||
import org.apache.tools.ant.util.FlatFileNameMapper; | |||
import org.apache.tools.ant.util.IdentityMapper; | |||
import org.apache.tools.ant.util.SourceFileScanner; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import java.util.Vector; | |||
import java.util.Hashtable; | |||
import java.util.Enumeration; | |||
/** | |||
* A consolidated copy task. Copies a file or directory to a new file | |||
@@ -54,9 +54,12 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import java.io.*; | |||
import java.util.*; | |||
import org.apache.tools.ant.*; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import java.util.Hashtable; | |||
import java.util.Enumeration; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
/** | |||
* Copies a directory. | |||
@@ -54,9 +54,12 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import java.io.*; | |||
import java.util.*; | |||
import org.apache.tools.ant.*; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.BuildException; | |||
/** | |||
* Copies a file. | |||
@@ -54,10 +54,17 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.Commandline; | |||
import org.apache.tools.ant.types.Environment; | |||
import java.io.*; | |||
import java.io.File; | |||
import java.io.OutputStream; | |||
import java.io.PrintStream; | |||
import java.io.BufferedOutputStream; | |||
import java.io.FileOutputStream; | |||
import java.io.IOException; | |||
/** | |||
* | |||
@@ -54,11 +54,19 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.*; | |||
import java.util.*; | |||
import java.io.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.AntClassLoader; | |||
import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.Reference; | |||
import java.util.Properties; | |||
import java.util.Enumeration; | |||
import java.io.File; | |||
import java.io.InputStream; | |||
import java.io.FileInputStream; | |||
import java.io.IOException; | |||
/** | |||
* Base class for Taskdef and Typedef - does all the classpath | |||
@@ -54,10 +54,13 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.*; | |||
import java.io.*; | |||
import java.util.*; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.types.FileSet; | |||
import org.apache.tools.ant.types.PatternSet; | |||
import java.io.File; | |||
import java.util.Vector; | |||
/** | |||
* Deletes a file or directory, or set of files defined by a fileset. | |||
@@ -54,8 +54,10 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import java.io.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import java.io.File; | |||
import java.io.IOException; | |||
/** | |||
* | |||
@@ -58,7 +58,9 @@ import java.io.File; | |||
import java.util.Enumeration; | |||
import java.util.Vector; | |||
import java.util.Date; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.FileSet; | |||
import org.apache.tools.ant.types.FileList; | |||
@@ -53,12 +53,14 @@ | |||
*/ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.ZipFileSet; | |||
import org.apache.tools.zip.*; | |||
import org.apache.tools.zip.ZipOutputStream; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import java.io.*; | |||
import java.util.Vector; | |||
/** | |||
* Creates a EAR archive. Based on WAR task | |||
@@ -54,9 +54,14 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.ProjectHelper; | |||
import org.apache.tools.ant.types.EnumeratedAttribute; | |||
import java.io.*; | |||
import java.io.File; | |||
import java.io.FileWriter; | |||
import java.io.IOException; | |||
/** | |||
* Echo | |||
* | |||
@@ -54,8 +54,16 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import java.io.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import java.io.File; | |||
import java.io.PrintWriter; | |||
import java.io.FileWriter; | |||
import java.io.InputStream; | |||
import java.io.IOException; | |||
import java.io.BufferedReader; | |||
import java.io.InputStreamReader; | |||
/** | |||
* Executes a given command if the os platform is appropriate. | |||
@@ -74,7 +82,7 @@ public class Exec extends Task { | |||
protected PrintWriter fos = null; | |||
private boolean failOnError = false; | |||
private static final int BUFFER_SIZE = 512; | |||
private final static int BUFFER_SIZE = 512; | |||
public void execute() throws BuildException { | |||
run(command); | |||
@@ -54,10 +54,19 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.Commandline; | |||
import org.apache.tools.ant.types.Environment; | |||
import java.io.*; | |||
import java.io.File; | |||
import java.io.FileOutputStream; | |||
import java.io.ByteArrayOutputStream; | |||
import java.io.IOException; | |||
import java.io.BufferedReader; | |||
import java.io.StringReader; | |||
import java.io.FileNotFoundException; | |||
/** | |||
* Executes a given command if the os platform is appropriate. | |||
@@ -61,8 +61,8 @@ import org.apache.tools.ant.types.Commandline; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import java.io.InputStream; | |||
import java.io.OutputStream; | |||
import java.io.BufferedReader; | |||
import java.io.StringReader; | |||
import java.io.ByteArrayOutputStream; | |||
@@ -57,7 +57,7 @@ package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.AntClassLoader; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.ExitException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.Commandline; | |||
import org.apache.tools.ant.types.CommandlineJava; | |||
@@ -65,7 +65,7 @@ import org.apache.tools.ant.types.Path; | |||
import java.lang.reflect.InvocationTargetException; | |||
import java.lang.reflect.Method; | |||
import java.io.*; | |||
import java.io.PrintStream; | |||
/* | |||
* | |||
@@ -54,9 +54,15 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.util.*; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.FileSet; | |||
import org.apache.tools.ant.types.Commandline; | |||
import org.apache.tools.ant.types.Mapper; | |||
import org.apache.tools.ant.types.EnumeratedAttribute; | |||
import org.apache.tools.ant.util.FileNameMapper; | |||
import org.apache.tools.ant.util.SourceFileScanner; | |||
import java.util.Hashtable; | |||
import java.util.Vector; | |||
@@ -54,7 +54,9 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.ProjectHelper; | |||
/** | |||
* Just exit the active build, giving an additional message | |||
@@ -54,9 +54,16 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import java.io.*; | |||
import java.util.zip.*; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import java.io.File; | |||
import java.io.FileInputStream; | |||
import java.io.FileOutputStream; | |||
import java.io.FileNotFoundException; | |||
import java.io.IOException; | |||
import java.util.zip.ZipInputStream; | |||
import java.util.zip.ZipEntry; | |||
/** | |||
* Unzip a file. | |||
* | |||
@@ -54,12 +54,14 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import java.util.Enumeration; | |||
import java.util.Properties; | |||
import java.io.File; | |||
import java.io.FileInputStream; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
/** | |||
* This task sets a token filter that is used by the file copy methods | |||
@@ -59,8 +59,15 @@ import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.EnumeratedAttribute; | |||
import java.io.*; | |||
import java.util.*; | |||
import java.io.File; | |||
import java.io.BufferedReader; | |||
import java.io.FileReader; | |||
import java.io.IOException; | |||
import java.io.BufferedWriter; | |||
import java.io.FileWriter; | |||
import java.util.Random; | |||
import java.util.Enumeration; | |||
import java.util.NoSuchElementException; | |||
/** | |||
* Task to convert text source files to local OS formatting conventions, as | |||
@@ -106,27 +113,27 @@ import java.util.*; | |||
public class FixCRLF extends MatchingTask { | |||
private static final int UNDEF = -1; | |||
private static final int NOTJAVA = 0; | |||
private static final int LOOKING = 1; | |||
private static final int IN_CHAR_CONST = 2; | |||
private static final int IN_STR_CONST = 3; | |||
private static final int IN_SINGLE_COMMENT = 4; | |||
private static final int IN_MULTI_COMMENT = 5; | |||
private static final int ASIS = 0; | |||
private static final int CR = 1; | |||
private static final int LF = 2; | |||
private static final int CRLF = 3; | |||
private static final int ADD = 1; | |||
private static final int REMOVE = -1; | |||
private static final int SPACES = -1; | |||
private static final int TABS = 1; | |||
private static final int INBUFLEN = 8192; | |||
private static final int LINEBUFLEN = 200; | |||
private static final char CTRLZ = '\u001A'; | |||
private final static int UNDEF = -1; | |||
private final static int NOTJAVA = 0; | |||
private final static int LOOKING = 1; | |||
private final static int IN_CHAR_CONST = 2; | |||
private final static int IN_STR_CONST = 3; | |||
private final static int IN_SINGLE_COMMENT = 4; | |||
private final static int IN_MULTI_COMMENT = 5; | |||
private final static int ASIS = 0; | |||
private final static int CR = 1; | |||
private final static int LF = 2; | |||
private final static int CRLF = 3; | |||
private final static int ADD = 1; | |||
private final static int REMOVE = -1; | |||
private final static int SPACES = -1; | |||
private final static int TABS = 1; | |||
private final static int INBUFLEN = 8192; | |||
private final static int LINEBUFLEN = 200; | |||
private final static char CTRLZ = '\u001A'; | |||
private int tablength = 8; | |||
private String spaces = " "; | |||
@@ -54,10 +54,14 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import java.io.*; | |||
import java.util.zip.*; | |||
import java.io.File; | |||
import java.io.FileOutputStream; | |||
import java.io.FileInputStream; | |||
import java.io.IOException; | |||
import java.util.zip.GZIPInputStream; | |||
/** | |||
* Expands a file that has been compressed with the GZIP | |||
@@ -54,10 +54,16 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import java.io.*; | |||
import java.util.zip.*; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import java.io.InputStream; | |||
import java.io.FileOutputStream; | |||
import java.io.FileInputStream; | |||
import java.util.zip.GZIPOutputStream; | |||
/** | |||
* Compresses a file with the GZIP algorightm. Normally used to compress | |||
@@ -55,7 +55,9 @@ package org.apache.tools.ant.taskdefs; | |||
import java.util.Enumeration; | |||
import java.util.Vector; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.Commandline; | |||
/** | |||
@@ -54,10 +54,17 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import java.io.*; | |||
import java.net.*; | |||
import java.util.*; | |||
import org.apache.tools.ant.*; | |||
import java.io.File; | |||
import java.io.FileOutputStream; | |||
import java.io.InputStream; | |||
import java.io.IOException; | |||
import java.net.URL; | |||
import java.net.URLConnection; | |||
import java.net.HttpURLConnection; | |||
import java.util.Date; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
/** | |||
* Get a particular file from a URL source. | |||
@@ -54,11 +54,19 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.FileScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.ZipFileSet; | |||
import org.apache.tools.zip.*; | |||
import org.apache.tools.zip.ZipOutputStream; | |||
import java.io.*; | |||
import java.io.IOException; | |||
import java.io.File; | |||
import java.io.InputStream; | |||
import java.io.FileInputStream; | |||
import java.io.ByteArrayOutputStream; | |||
import java.io.PrintWriter; | |||
import java.io.ByteArrayInputStream; | |||
import java.util.Enumeration; | |||
/** | |||
@@ -58,11 +58,18 @@ import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.ExitException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.types.Commandline; | |||
import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.CommandlineJava; | |||
import org.apache.tools.ant.types.Reference; | |||
import org.apache.tools.ant.types.Environment; | |||
import java.io.*; | |||
import java.lang.reflect.*; | |||
import java.util.*; | |||
import java.io.File; | |||
import java.io.PrintStream; | |||
import java.io.FileOutputStream; | |||
import java.io.IOException; | |||
import java.util.Vector; | |||
/** | |||
* This task acts as a loader for java applications but allows to use the same JVM | |||
@@ -57,9 +57,12 @@ package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.util.*; | |||
import org.apache.tools.ant.taskdefs.compilers.*; | |||
import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.Reference; | |||
import org.apache.tools.ant.util.GlobPatternMapper; | |||
import org.apache.tools.ant.util.SourceFileScanner; | |||
import org.apache.tools.ant.taskdefs.compilers.CompilerAdapter; | |||
import org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory; | |||
import java.io.File; | |||
@@ -98,7 +101,7 @@ import java.io.File; | |||
public class Javac extends MatchingTask { | |||
private static final String FAIL_MSG | |||
private final static String FAIL_MSG | |||
= "Compile failed, messages should have been provided."; | |||
private Path src; | |||
@@ -55,8 +55,9 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import java.io.*; | |||
import org.apache.tools.ant.Task; | |||
import java.io.OutputStream; | |||
import java.io.IOException; | |||
/** | |||
* Serves as an output stream to Javac. This let's us print messages | |||
@@ -53,14 +53,25 @@ | |||
*/ | |||
package org.apache.tools.ant.taskdefs; | |||
import java.io.*; | |||
import java.util.*; | |||
import java.io.File; | |||
import java.io.PrintWriter; | |||
import java.io.FileWriter; | |||
import java.io.IOException; | |||
import java.io.FilenameFilter; | |||
import java.util.Vector; | |||
import java.util.Enumeration; | |||
import java.util.StringTokenizer; | |||
import java.util.Random; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.ProjectHelper; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.Reference; | |||
import org.apache.tools.ant.types.EnumeratedAttribute; | |||
import org.apache.tools.ant.types.Commandline; | |||
import org.apache.tools.ant.types.FileSet; | |||
/** | |||
* This task makes it easy to generate Javadoc documentation for a collection | |||
@@ -53,8 +53,12 @@ | |||
*/ | |||
package org.apache.tools.ant.taskdefs; | |||
import java.io.*; | |||
import org.apache.tools.ant.*; | |||
import java.io.File; | |||
import java.io.PrintWriter; | |||
import java.io.FileWriter; | |||
import java.io.IOException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.BuildException; | |||
import java.util.Random; | |||
@@ -53,9 +53,14 @@ | |||
*/ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.Project; | |||
import java.io.*; | |||
import java.io.BufferedReader; | |||
import java.io.OutputStream; | |||
import java.io.InputStream; | |||
import java.io.IOException; | |||
import java.io.InputStreamReader; | |||
/** | |||
* Parses output from jikes and | |||
@@ -54,9 +54,16 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import java.io.*; | |||
import java.util.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import java.io.File; | |||
import java.io.BufferedReader; | |||
import java.io.BufferedWriter; | |||
import java.io.FileReader; | |||
import java.io.FileWriter; | |||
import java.io.IOException; | |||
import java.util.Hashtable; | |||
import java.util.StringTokenizer; | |||
/** | |||
* Keyword substitution. Input file is written to output file. | |||
@@ -55,11 +55,11 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.Task; | |||
import java.io.OutputStream; | |||
import java.io.InputStream; | |||
import java.io.IOException; | |||
/** | |||
@@ -54,8 +54,15 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import java.util.*; | |||
import java.io.*; | |||
import java.util.Vector; | |||
import java.util.Hashtable; | |||
import java.util.Enumeration; | |||
import java.io.IOException; | |||
import java.io.PrintWriter; | |||
import java.io.BufferedReader; | |||
import java.io.InputStream; | |||
import java.io.InputStreamReader; | |||
import java.io.StringWriter; | |||
import org.apache.tools.ant.BuildException; | |||
@@ -66,27 +73,27 @@ import org.apache.tools.ant.BuildException; | |||
*/ | |||
public class Manifest { | |||
/** The standard manifest version header */ | |||
static public final String ATTRIBUTE_MANIFEST_VERSION = "Manifest-Version"; | |||
public final static String ATTRIBUTE_MANIFEST_VERSION = "Manifest-Version"; | |||
/** The standard Signature Version header */ | |||
static public final String ATTRIBUTE_SIGNATURE_VERSION = "Signature-Version"; | |||
public final static String ATTRIBUTE_SIGNATURE_VERSION = "Signature-Version"; | |||
/** The Name Attribute is the first in a named section */ | |||
static public final String ATTRIBUTE_NAME = "Name"; | |||
public final static String ATTRIBUTE_NAME = "Name"; | |||
/** THe From Header is disallowed in a Manifest */ | |||
static public final String ATTRIBUTE_FROM = "From"; | |||
public final static String ATTRIBUTE_FROM = "From"; | |||
/** Default Manifest version if one is not specified */ | |||
static public final String DEFAULT_MANIFEST_VERSION = "1.0"; | |||
public final static String DEFAULT_MANIFEST_VERSION = "1.0"; | |||
/** The max length of a line in a Manifest */ | |||
static public final int MAX_LINE_LENGTH = 70; | |||
public final static int MAX_LINE_LENGTH = 70; | |||
/** | |||
* Class to hold manifest attributes | |||
*/ | |||
static public class Attribute { | |||
public static class Attribute { | |||
/** The attribute's name */ | |||
private String name = null; | |||
@@ -227,7 +234,7 @@ public class Manifest { | |||
* Manifest. A section consists of a set of attribute values, | |||
* separated from other sections by a blank line. | |||
*/ | |||
static public class Section { | |||
public static class Section { | |||
private Vector warnings = new Vector(); | |||
/** The section's name if any. The main section in a manifest is unnamed.*/ | |||
@@ -54,7 +54,7 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import java.io.*; | |||
/** | |||
* Exception thrown indicating problems in a JAR Manifest | |||
@@ -54,11 +54,15 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.FileSet; | |||
import org.apache.tools.ant.types.PatternSet; | |||
import java.io.*; | |||
import java.util.*; | |||
import java.io.File; | |||
import java.util.StringTokenizer; | |||
import java.util.Vector; | |||
/** | |||
* This is an abstract task that should be used by all those tasks that | |||
@@ -54,7 +54,8 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import java.io.File; | |||
@@ -54,11 +54,15 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.FilterSetCollection; | |||
import org.apache.tools.ant.types.FilterSet; | |||
import org.apache.tools.ant.types.FileSet; | |||
import java.io.*; | |||
import java.util.*; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import java.util.Enumeration; | |||
/** | |||
* Moves a file or directory to a new file or directory. By default, | |||
@@ -53,11 +53,15 @@ | |||
*/ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.*; | |||
import java.util.*; | |||
import java.text.*; | |||
import java.lang.RuntimeException; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.TaskContainer; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Location; | |||
import java.util.Vector; | |||
import java.util.Enumeration; | |||
/** | |||
* Implements a multi threaded task execution. | |||
@@ -54,7 +54,9 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.Commandline; | |||
import java.io.File; | |||
import java.io.IOException; | |||
@@ -57,9 +57,11 @@ package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.Reference; | |||
import org.apache.tools.ant.types.FileSet; | |||
import java.util.*; | |||
import java.util.Vector; | |||
import java.io.File; | |||
/** | |||
@@ -54,11 +54,20 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.AntClassLoader; | |||
import org.apache.tools.ant.ProjectHelper; | |||
import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.Reference; | |||
import java.io.*; | |||
import java.util.*; | |||
import java.io.File; | |||
import java.io.FileInputStream; | |||
import java.io.IOException; | |||
import java.io.InputStream; | |||
import java.util.Properties; | |||
import java.util.Vector; | |||
import java.util.Enumeration; | |||
/** | |||
* Will set a Project property. Used to be a hack in ProjectHelper | |||
@@ -55,16 +55,18 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.util.*; | |||
import org.apache.tools.ant.taskdefs.compilers.*; | |||
import org.apache.tools.ant.types.EnumeratedAttribute; | |||
import org.apache.tools.ant.Task; | |||
import java.io.*; | |||
import java.io.PrintStream; | |||
import java.io.FileOutputStream; | |||
import java.io.IOException; | |||
import java.util.*; | |||
import java.util.Hashtable; | |||
/** | |||
* This task is the manager for RecorderEntry's. It is this class | |||
@@ -176,7 +178,7 @@ public class Recorder extends Task { | |||
* Possible values include: start and stop. | |||
*/ | |||
public static class ActionChoices extends EnumeratedAttribute { | |||
private static final String[] values = {"start", "stop"}; | |||
private final static String[] values = {"start", "stop"}; | |||
public String[] getValues() { | |||
return values; | |||
} | |||
@@ -187,7 +189,7 @@ public class Recorder extends Task { | |||
* Possible values include: error, warn, info, verbose, debug. | |||
*/ | |||
public static class VerbosityLevelChoices extends EnumeratedAttribute { | |||
private static final String[] values = { "error", "warn", "info", | |||
private final static String[] values = { "error", "warn", "info", | |||
"verbose", "debug"}; | |||
public String[] getValues() { | |||
return values; | |||
@@ -54,9 +54,11 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import java.io.*; | |||
import java.util.*; | |||
import org.apache.tools.ant.BuildLogger; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.BuildEvent; | |||
import java.io.PrintStream; | |||
/** | |||
* This is a class that represents a recorder. This is the listener | |||
@@ -54,10 +54,25 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.taskdefs.*; | |||
import java.io.*; | |||
import java.util.*; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import java.io.File; | |||
import java.io.FileInputStream; | |||
import java.io.FileNotFoundException; | |||
import java.io.IOException; | |||
import java.io.Reader; | |||
import java.io.FileReader; | |||
import java.io.InputStreamReader; | |||
import java.io.Writer; | |||
import java.io.FileWriter; | |||
import java.io.OutputStreamWriter; | |||
import java.io.FileOutputStream; | |||
import java.io.BufferedReader; | |||
import java.io.BufferedWriter; | |||
import java.util.Properties; | |||
import java.util.Vector; | |||
/** | |||
* Replaces all occurrences of one or more string tokens with given | |||
@@ -58,10 +58,12 @@ import org.apache.tools.ant.AntClassLoader; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.taskdefs.rmic.*; | |||
import org.apache.tools.ant.taskdefs.rmic.RmicAdapter; | |||
import org.apache.tools.ant.taskdefs.rmic.RmicAdapterFactory; | |||
import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.Reference; | |||
import org.apache.tools.ant.util.*; | |||
import org.apache.tools.ant.util.FileNameMapper; | |||
import org.apache.tools.ant.util.SourceFileScanner; | |||
import java.io.File; | |||
import java.io.IOException; | |||
@@ -100,7 +102,7 @@ import java.util.Vector; | |||
public class Rmic extends MatchingTask { | |||
private static final String FAIL_MSG | |||
private final static String FAIL_MSG | |||
= "Rmic failed, messages should have been provided."; | |||
private File baseDir; | |||
@@ -54,16 +54,41 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.*; | |||
import java.io.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.AntClassLoader; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.ProjectHelper; | |||
import org.apache.tools.ant.types.EnumeratedAttribute; | |||
import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.Reference; | |||
import org.apache.tools.ant.types.FileSet; | |||
import java.io.File; | |||
import java.io.PrintStream; | |||
import java.io.BufferedOutputStream; | |||
import java.io.FileOutputStream; | |||
import java.io.IOException; | |||
import java.io.Reader; | |||
import java.io.BufferedReader; | |||
import java.io.StringReader; | |||
import java.io.FileReader; | |||
import java.io.InputStreamReader; | |||
import java.io.FileInputStream; | |||
import java.util.Enumeration; | |||
import java.util.StringTokenizer; | |||
import java.util.Vector; | |||
import java.util.Properties; | |||
import java.util.zip.*; | |||
import java.sql.*; | |||
import java.sql.Connection; | |||
import java.sql.Statement; | |||
import java.sql.Driver; | |||
import java.sql.SQLException; | |||
import java.sql.DatabaseMetaData; | |||
import java.sql.SQLWarning; | |||
import java.sql.ResultSet; | |||
import java.sql.ResultSetMetaData; | |||
/** | |||
* Reads in a text file containing SQL statements seperated with semicolons | |||
@@ -76,9 +101,9 @@ import java.sql.*; | |||
*/ | |||
public class SQLExec extends Task { | |||
static public class DelimiterType extends EnumeratedAttribute { | |||
static public final String NORMAL = "normal"; | |||
static public final String ROW = "row"; | |||
public static class DelimiterType extends EnumeratedAttribute { | |||
public final static String NORMAL = "normal"; | |||
public final static String ROW = "row"; | |||
public String[] getValues() { | |||
return new String[] {NORMAL, ROW}; | |||
} | |||
@@ -54,10 +54,16 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import java.io.*; | |||
import java.util.*; | |||
import java.io.PrintStream; | |||
import java.io.File; | |||
import java.io.BufferedInputStream; | |||
import java.io.FileInputStream; | |||
import java.io.IOException; | |||
import java.util.Vector; | |||
import java.util.StringTokenizer; | |||
import java.util.Enumeration; | |||
import org.apache.tools.mail.MailMessage; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
@@ -53,11 +53,14 @@ | |||
*/ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.*; | |||
import java.util.*; | |||
import java.text.*; | |||
import java.lang.RuntimeException; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.TaskContainer; | |||
import org.apache.tools.ant.BuildException; | |||
import java.util.Vector; | |||
import java.util.Enumeration; | |||
/** | |||
* Implements a single threaded task execution. | |||
@@ -59,8 +59,11 @@ import java.util.Enumeration; | |||
import java.util.Vector; | |||
import java.util.zip.ZipEntry; | |||
import java.util.zip.ZipFile; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.Commandline; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.FileSet; | |||
/** | |||
@@ -54,12 +54,21 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import java.io.*; | |||
import java.util.*; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.util.*; | |||
import org.apache.tools.tar.*; | |||
import org.apache.tools.ant.types.*; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import java.io.FileOutputStream; | |||
import java.io.FileInputStream; | |||
import java.util.Vector; | |||
import java.util.Enumeration; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.util.SourceFileScanner; | |||
import org.apache.tools.ant.util.MergingMapper; | |||
import org.apache.tools.tar.TarOutputStream; | |||
import org.apache.tools.tar.TarConstants; | |||
import org.apache.tools.tar.TarEntry; | |||
import org.apache.tools.ant.types.FileSet; | |||
/** | |||
* Creates a TAR archive. | |||
@@ -71,11 +80,11 @@ import org.apache.tools.ant.types.*; | |||
public class Tar extends MatchingTask { | |||
// permissable values for longfile attribute | |||
static public final String WARN = "warn"; | |||
static public final String FAIL = "fail"; | |||
static public final String TRUNCATE = "truncate"; | |||
static public final String GNU = "gnu"; | |||
static public final String OMIT = "omit"; | |||
public final static String WARN = "warn"; | |||
public final static String FAIL = "fail"; | |||
public final static String TRUNCATE = "truncate"; | |||
public final static String GNU = "gnu"; | |||
public final static String OMIT = "omit"; | |||
private String[] validModes = new String[] {WARN, FAIL, TRUNCATE, GNU, OMIT}; | |||
@@ -302,7 +311,7 @@ public class Tar extends MatchingTask { | |||
return sfs.restrict(files, baseDir, null, mm).length == 0; | |||
} | |||
static public class TarFileSet extends FileSet { | |||
public static class TarFileSet extends FileSet { | |||
private String[] files = null; | |||
private int mode = 0100644; | |||
@@ -55,8 +55,9 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import java.io.*; | |||
import org.apache.tools.ant.Task; | |||
import java.io.OutputStream; | |||
import java.io.IOException; | |||
/** | |||
* Redirects text written to a stream thru the standard | |||
@@ -54,19 +54,22 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.util.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.types.FileSet; | |||
import org.apache.tools.ant.util.FileUtils; | |||
import java.io.File; | |||
import java.io.FileOutputStream; | |||
import java.io.IOException; | |||
import java.lang.reflect.InvocationTargetException; | |||
import java.lang.reflect.Method; | |||
import java.text.DateFormat; | |||
import java.text.ParseException; | |||
import java.util.Date; | |||
import java.util.Enumeration; | |||
import java.util.Locale; | |||
import java.util.Vector; | |||
@@ -54,10 +54,19 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import java.io.*; | |||
import java.util.*; | |||
import java.text.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.Location; | |||
import java.util.Vector; | |||
import java.util.Date; | |||
import java.util.Locale; | |||
import java.util.Enumeration; | |||
import java.util.Calendar; | |||
import java.util.StringTokenizer; | |||
import java.util.NoSuchElementException; | |||
import java.text.SimpleDateFormat; | |||
/** | |||
* Sets TSTAMP, DSTAMP and TODAY | |||
@@ -54,9 +54,16 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.tar.*; | |||
import java.io.*; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.tar.TarInputStream; | |||
import org.apache.tools.tar.TarEntry; | |||
import java.io.File; | |||
import java.io.FileInputStream; | |||
import java.io.FileOutputStream; | |||
import java.io.FileNotFoundException; | |||
import java.io.IOException; | |||
/** | |||
* Untar a file. | |||
@@ -54,13 +54,18 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.taskdefs.condition.Condition; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.util.*; | |||
import java.io.*; | |||
import org.apache.tools.ant.types.Mapper; | |||
import org.apache.tools.ant.types.FileSet; | |||
import org.apache.tools.ant.util.SourceFileScanner; | |||
import org.apache.tools.ant.util.FileNameMapper; | |||
import org.apache.tools.ant.util.MergingMapper; | |||
import java.io.File; | |||
import java.util.Enumeration; | |||
import java.util.Date; | |||
import java.util.Vector; | |||
/** | |||
@@ -54,12 +54,14 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.ZipFileSet; | |||
import org.apache.tools.zip.*; | |||
import org.apache.tools.zip.ZipOutputStream; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import java.io.*; | |||
import java.util.Vector; | |||
/** | |||
* Creates a WAR archive. | |||
@@ -55,12 +55,15 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import java.io.*; | |||
import java.io.File; | |||
import java.util.Enumeration; | |||
import java.util.Hashtable; | |||
import java.util.StringTokenizer; | |||
import java.util.Vector; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.AntClassLoader; | |||
import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.Reference; | |||
import org.apache.tools.ant.util.FileUtils; | |||
@@ -53,18 +53,33 @@ | |||
*/ | |||
package org.apache.tools.ant.taskdefs; | |||
import java.io.*; | |||
import java.util.Enumeration; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import java.io.InputStream; | |||
import java.io.FileOutputStream; | |||
import java.io.FileInputStream; | |||
import java.io.OutputStream; | |||
import java.io.ByteArrayOutputStream; | |||
import java.io.ByteArrayInputStream; | |||
import java.util.Hashtable; | |||
import java.util.Stack; | |||
import java.util.StringTokenizer; | |||
import java.util.Vector; | |||
import java.util.zip.CRC32; | |||
import java.util.zip.ZipInputStream; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.util.*; | |||
import org.apache.tools.zip.*; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.FileScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.types.FileSet; | |||
import org.apache.tools.ant.types.EnumeratedAttribute; | |||
import org.apache.tools.ant.types.ZipFileSet; | |||
import org.apache.tools.ant.types.ZipScanner; | |||
import org.apache.tools.ant.util.SourceFileScanner; | |||
import org.apache.tools.ant.util.MergingMapper; | |||
import org.apache.tools.zip.ZipOutputStream; | |||
import org.apache.tools.zip.ZipEntry; | |||
/** | |||
* Create a ZIP archive. | |||
@@ -54,11 +54,20 @@ | |||
package org.apache.tools.ant.taskdefs.compilers; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.taskdefs.*; | |||
import org.apache.tools.ant.types.*; | |||
import java.io.*; | |||
import org.apache.tools.ant.Location; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.taskdefs.Javac; | |||
import org.apache.tools.ant.taskdefs.Execute; | |||
import org.apache.tools.ant.taskdefs.LogStreamHandler; | |||
import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.Commandline; | |||
import org.apache.tools.ant.types.FileSet; | |||
import java.io.File; | |||
import java.io.PrintWriter; | |||
import java.io.FileWriter; | |||
import java.io.IOException; | |||
import java.util.Random; | |||
/** | |||
@@ -54,10 +54,11 @@ | |||
package org.apache.tools.ant.taskdefs.compilers; | |||
import java.io.File; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.types.Commandline; | |||
import org.apache.tools.ant.types.Path; | |||
/** | |||
* The implementation of the gcj compiler. | |||
@@ -59,7 +59,8 @@ import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.taskdefs.LogOutputStream; | |||
import org.apache.tools.ant.types.Commandline; | |||
import java.io.*; | |||
import java.io.OutputStream; | |||
import java.io.IOException; | |||
import java.lang.reflect.Constructor; | |||
import java.lang.reflect.Method; | |||
@@ -56,11 +56,11 @@ package org.apache.tools.ant.taskdefs.compilers; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.taskdefs.LogOutputStream; | |||
import org.apache.tools.ant.types.Commandline; | |||
import java.lang.reflect.Method; | |||
import java.io.*; | |||
/** | |||
* The implementation of the javac compiler for JDK 1.3 | |||
@@ -77,7 +77,7 @@ public class Javac13 extends DefaultCompilerAdapter { | |||
/** | |||
* Integer returned by the "Modern" jdk1.3 compiler to indicate success. | |||
*/ | |||
private static final int MODERN_COMPILER_SUCCESS = 0; | |||
private final static int MODERN_COMPILER_SUCCESS = 0; | |||
public boolean execute() throws BuildException { | |||
attributes.log("Using modern compiler", Project.MSG_VERBOSE); | |||
@@ -56,7 +56,7 @@ package org.apache.tools.ant.taskdefs.compilers; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.types.Commandline; | |||
/** | |||
* Performs a compile using javac externally. | |||
@@ -56,7 +56,8 @@ package org.apache.tools.ant.taskdefs.compilers; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.Commandline; | |||
/** | |||
* The implementation of the jikes compiler. | |||
@@ -56,7 +56,8 @@ package org.apache.tools.ant.taskdefs.compilers; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.Commandline; | |||
/** | |||
* The implementation of the jvc compiler from microsoft. | |||
@@ -56,12 +56,12 @@ package org.apache.tools.ant.taskdefs.compilers; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.taskdefs.LogOutputStream; | |||
import org.apache.tools.ant.types.Commandline; | |||
import org.apache.tools.ant.types.Path; | |||
import java.io.*; | |||
import java.lang.reflect.Constructor; | |||
import java.lang.reflect.Method; | |||
/** | |||
@@ -56,7 +56,7 @@ package org.apache.tools.ant.taskdefs.compilers; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.types.*; | |||
import org.apache.tools.ant.types.Commandline; | |||
/** | |||
* The implementation of the sj compiler. | |||
@@ -58,7 +58,7 @@ import java.util.Enumeration; | |||
import java.util.NoSuchElementException; | |||
import java.util.Vector; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.ProjectComponent; | |||
import org.apache.tools.ant.taskdefs.Available; | |||
import org.apache.tools.ant.taskdefs.UpToDate; | |||
@@ -54,10 +54,16 @@ | |||
package org.apache.tools.ant.taskdefs.optional; | |||
import java.io.*; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.taskdefs.*; | |||
import org.apache.tools.ant.types.*; | |||
import java.io.File; | |||
import java.io.BufferedReader; | |||
import java.io.FileReader; | |||
import java.io.IOException; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.taskdefs.Execute; | |||
import org.apache.tools.ant.taskdefs.LogStreamHandler; | |||
import org.apache.tools.ant.types.CommandlineJava; | |||
/** | |||
* @author Erik Meade, emeade@geekfarm.org | |||
*/ | |||
@@ -54,13 +54,21 @@ | |||
package org.apache.tools.ant.taskdefs.optional; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.taskdefs.*; | |||
import org.apache.tools.ant.types.*; | |||
import java.io.*; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.taskdefs.MatchingTask; | |||
import org.apache.tools.ant.taskdefs.ExecTask; | |||
import org.apache.tools.ant.types.FileSet; | |||
import org.apache.tools.ant.types.Commandline; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import java.io.PrintWriter; | |||
import java.io.FileOutputStream; | |||
import java.io.OutputStream; | |||
import java.util.Enumeration; | |||
import java.util.StringTokenizer; | |||
import java.util.Vector; | |||
import java.util.Random; | |||
import java.text.DecimalFormat; | |||
@@ -75,7 +75,7 @@ import org.apache.tools.ant.taskdefs.Javac; | |||
import org.apache.tools.ant.taskdefs.MatchingTask; | |||
import org.apache.tools.ant.taskdefs.Mkdir; | |||
import org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter; | |||
import org.apache.tools.ant.types.FileSet; | |||
import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.Reference; | |||
@@ -226,14 +226,14 @@ import org.apache.tools.ant.types.Reference; | |||
*/ | |||
public class IContract extends MatchingTask { | |||
private static final String ICONTROL_PROPERTIES_HEADER = | |||
private final static String ICONTROL_PROPERTIES_HEADER = | |||
" You might want to set classRoot to point to your normal compilation class root directory."; | |||
private static final String ICONTROL_PROPERTIES_MESSAGE = | |||
private final static String ICONTROL_PROPERTIES_MESSAGE = | |||
"You should probably modify icontrol.properties' classRoot to where comiled (uninstrumented) classes go."; | |||
/** \ on windows, / on linux/unix */ | |||
private static final String ps = System.getProperty( "path.separator" ); | |||
private final static String ps = System.getProperty( "path.separator" ); | |||
/** compiler to use for instrumenation */ | |||
private String icCompiler = "javac"; | |||
@@ -55,16 +55,20 @@ | |||
package org.apache.tools.ant.taskdefs.optional; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.DirectoryScanner; | |||
import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.taskdefs.LogOutputStream; | |||
import org.apache.tools.ant.types.*; | |||
import java.lang.reflect.Method; | |||
import java.lang.reflect.Constructor; | |||
import java.io.*; | |||
import java.util.*; | |||
import org.apache.tools.ant.types.Path; | |||
import org.apache.tools.ant.types.Reference; | |||
import org.apache.tools.ant.types.Commandline; | |||
import java.io.File; | |||
import java.util.Vector; | |||
import java.util.StringTokenizer; | |||
import java.util.Enumeration; | |||
/** | |||
* Task to generate JNI header files using javah. This task can take the following | |||
@@ -99,7 +103,7 @@ import java.util.*; | |||
public class Javah extends Task { | |||
private static final String FAIL_MSG = "Compile failed, messages should have been provided."; | |||
private final static String FAIL_MSG = "Compile failed, messages should have been provided."; | |||
private Vector classes = new Vector(2); | |||
private String cls; | |||
@@ -1,9 +1,19 @@ | |||
package org.apache.tools.ant.taskdefs.optional; | |||
import java.io.*; | |||
import java.util.*; | |||
import org.apache.tools.ant.*; | |||
import org.apache.tools.ant.types.*; | |||
import java.io.File; | |||
import java.io.FileOutputStream; | |||
import java.io.IOException; | |||
import java.io.FileInputStream; | |||
import java.io.FileNotFoundException; | |||
import java.util.Vector; | |||
import java.util.Enumeration; | |||
import java.util.Comparator; | |||
import java.util.ListIterator; | |||
import java.util.StringTokenizer; | |||
import java.util.ArrayList; | |||
import org.apache.tools.ant.Task; | |||
import org.apache.tools.ant.BuildException; | |||
/** | |||
* Task for creating a manifest file for a jar archiv. | |||
@@ -22,10 +32,10 @@ import org.apache.tools.ant.types.*; | |||
*/ | |||
public class ManifestFile extends Task { | |||
private static final String newLine = System.getProperty("line.separator"); | |||
private static final String keyValueSeparator = ":"; | |||
private static final String UPDATE_ = "update"; | |||
private static final String REPLACEALL_ = "replaceAll"; | |||
private final static String newLine = System.getProperty("line.separator"); | |||
private final static String keyValueSeparator = ":"; | |||
private final static String UPDATE_ = "update"; | |||
private final static String REPLACEALL_ = "replaceAll"; | |||
private File manifestFile; | |||
private Vector entries; | |||
@@ -60,7 +60,9 @@ import org.apache.tools.ant.Project; | |||
import org.apache.tools.ant.taskdefs.MatchingTask; | |||
import org.apache.tools.ant.types.Commandline; | |||
import org.apache.tools.ant.types.Mapper; | |||
import org.apache.tools.ant.util.*; | |||
import org.apache.tools.ant.util.FileNameMapper; | |||
import org.apache.tools.ant.util.IdentityMapper; | |||
import org.apache.tools.ant.util.SourceFileScanner; | |||
import java.io.File; | |||