and i18n-ed the error and log messages. * Moved Java -> antlib.java.JavaTask. * Moved Path and friends -> framework.file package. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271927 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -506,6 +506,10 @@ Legal: | |||||
| <ant antfile="antlib.xml"> | <ant antfile="antlib.xml"> | ||||
| <property name="antlib.name" value="vfile"/> | <property name="antlib.name" value="vfile"/> | ||||
| </ant> | </ant> | ||||
| <ant antfile="antlib.xml"> | |||||
| <property name="antlib.name" value="java"/> | |||||
| </ant> | |||||
| </target> | </target> | ||||
| <!-- Compiles and runs the unit tests --> | <!-- Compiles and runs the unit tests --> | ||||
| @@ -12,7 +12,7 @@ import java.net.URLClassLoader; | |||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.framework.conditions.Condition; | import org.apache.myrmidon.framework.conditions.Condition; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -33,11 +33,13 @@ public class StringToBooleanConverter | |||||
| throws ConverterException | throws ConverterException | ||||
| { | { | ||||
| final String string = (String)object; | final String string = (String)object; | ||||
| if( string.equals( "true" ) ) | |||||
| if( string.equalsIgnoreCase( "true" ) | |||||
| || string.equalsIgnoreCase( "yes" ) ) | |||||
| { | { | ||||
| return Boolean.TRUE; | return Boolean.TRUE; | ||||
| } | } | ||||
| else if( string.equals( "false" ) ) | |||||
| else if( string.equalsIgnoreCase( "false" ) | |||||
| || string.equalsIgnoreCase( "no" ) ) | |||||
| { | { | ||||
| return Boolean.FALSE; | return Boolean.FALSE; | ||||
| } | } | ||||
| @@ -13,7 +13,7 @@ import org.apache.myrmidon.framework.Execute; | |||||
| import org.apache.tools.todo.taskdefs.MatchingTask; | import org.apache.tools.todo.taskdefs.MatchingTask; | ||||
| import org.apache.tools.todo.types.Commandline; | import org.apache.tools.todo.types.Commandline; | ||||
| import org.apache.tools.todo.types.DirectoryScanner; | import org.apache.tools.todo.types.DirectoryScanner; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| /** | /** | ||||
| * This task compiles CSharp source into executables or modules. The task will | * This task compiles CSharp source into executables or modules. The task will | ||||
| @@ -5,14 +5,15 @@ | |||||
| * version 1.1, a copy of which has been included with this distribution in | * version 1.1, a copy of which has been included with this distribution in | ||||
| * the LICENSE.txt file. | * the LICENSE.txt file. | ||||
| */ | */ | ||||
| package org.apache.tools.todo.taskdefs; | |||||
| package org.apache.antlib.java; | |||||
| import java.io.File; | import java.io.File; | ||||
| 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.myrmidon.framework.java.ExecuteJava; | |||||
| import org.apache.tools.todo.types.Argument; | import org.apache.tools.todo.types.Argument; | ||||
| import org.apache.tools.todo.types.EnvironmentVariable; | import org.apache.tools.todo.types.EnvironmentVariable; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| /** | /** | ||||
| * 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 | ||||
| @@ -24,7 +25,7 @@ import org.apache.tools.todo.types.Path; | |||||
| * | * | ||||
| * @ant:task name="java" | * @ant:task name="java" | ||||
| */ | */ | ||||
| public class Java | |||||
| public class JavaTask | |||||
| extends AbstractTask | extends AbstractTask | ||||
| { | { | ||||
| private final ExecuteJava m_exec = new ExecuteJava(); | private final ExecuteJava m_exec = new ExecuteJava(); | ||||
| @@ -19,7 +19,7 @@ import org.apache.myrmidon.api.AbstractTask; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.todo.types.DirectoryScanner; | import org.apache.tools.todo.types.DirectoryScanner; | ||||
| import org.apache.tools.todo.types.FileSet; | import org.apache.tools.todo.types.FileSet; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| import org.apache.tools.todo.types.ScannerUtil; | import org.apache.tools.todo.types.ScannerUtil; | ||||
| import org.xml.sax.EntityResolver; | import org.xml.sax.EntityResolver; | ||||
| @@ -24,7 +24,7 @@ import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.myrmidon.framework.AbstractMatchingTask; | import org.apache.myrmidon.framework.AbstractMatchingTask; | ||||
| import org.apache.myrmidon.framework.FileSet; | import org.apache.myrmidon.framework.FileSet; | ||||
| import org.apache.tools.todo.types.DirectoryScanner; | import org.apache.tools.todo.types.DirectoryScanner; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.ScannerUtil; | import org.apache.tools.todo.types.ScannerUtil; | ||||
| /** | /** | ||||
| @@ -21,8 +21,8 @@ import org.apache.tools.todo.types.Commandline; | |||||
| import org.apache.tools.todo.util.FileUtils; | import org.apache.tools.todo.util.FileUtils; | ||||
| /** | /** | ||||
| * This is a utility class designed to make executing native | |||||
| * processes easier in the context of ant. | |||||
| * This is a utility class designed to make executing native processes easier | |||||
| * in the context of ant. | |||||
| * | * | ||||
| * <p>To execute a native process, configure an instance of this class, | * <p>To execute a native process, configure an instance of this class, | ||||
| * and then call its {@link #execute} method. | * and then call its {@link #execute} method. | ||||
| @@ -26,4 +26,3 @@ execute.failed.error=Command "{0}" failed. | |||||
| execute.bad-resultcode.error=Command "{0}" returned unexpected exit code {1}. | execute.bad-resultcode.error=Command "{0}" returned unexpected exit code {1}. | ||||
| execute.command.notice=Executing: {0} | execute.command.notice=Executing: {0} | ||||
| execute.env-vars.notice=Using environment: {0}. | execute.env-vars.notice=Using environment: {0}. | ||||
| @@ -5,7 +5,7 @@ | |||||
| * version 1.1, a copy of which has been included with this distribution in | * version 1.1, a copy of which has been included with this distribution in | ||||
| * the LICENSE.txt file. | * the LICENSE.txt file. | ||||
| */ | */ | ||||
| package org.apache.tools.todo.types; | |||||
| package org.apache.myrmidon.framework.file; | |||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| @@ -16,7 +16,7 @@ import org.apache.myrmidon.api.TaskException; | |||||
| * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a> | * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a> | ||||
| * @version $Revision$ $Date$ | * @version $Revision$ $Date$ | ||||
| */ | */ | ||||
| class ArrayFileList | |||||
| public class ArrayFileList | |||||
| implements FileList | implements FileList | ||||
| { | { | ||||
| private final String[] m_parts; | private final String[] m_parts; | ||||
| @@ -5,7 +5,7 @@ | |||||
| * version 1.1, a copy of which has been included with this distribution in | * version 1.1, a copy of which has been included with this distribution in | ||||
| * the LICENSE.txt file. | * the LICENSE.txt file. | ||||
| */ | */ | ||||
| package org.apache.tools.todo.types; | |||||
| package org.apache.myrmidon.framework.file; | |||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| @@ -5,13 +5,13 @@ | |||||
| * version 1.1, a copy of which has been included with this distribution in | * version 1.1, a copy of which has been included with this distribution in | ||||
| * the LICENSE.txt file. | * the LICENSE.txt file. | ||||
| */ | */ | ||||
| package org.apache.tools.todo.types.converters; | |||||
| package org.apache.myrmidon.framework.file; | |||||
| import org.apache.aut.converter.AbstractConverter; | import org.apache.aut.converter.AbstractConverter; | ||||
| import org.apache.aut.converter.ConverterException; | import org.apache.aut.converter.ConverterException; | ||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.todo.types.FileList; | |||||
| import org.apache.myrmidon.framework.file.FileList; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -20,7 +20,7 @@ import org.apache.tools.todo.types.PathUtil; | |||||
| * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a> | * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a> | ||||
| * @version $Revision$ $Date$ | * @version $Revision$ $Date$ | ||||
| * | * | ||||
| * @ant:converter source="org.apache.tools.todo.types.FileList" destination="java.lang.String" | |||||
| * @ant:converter source="org.apache.myrmidon.framework.file.FileList" destination="java.lang.String" | |||||
| */ | */ | ||||
| public class FileListToStringConverter | public class FileListToStringConverter | ||||
| extends AbstractConverter | extends AbstractConverter | ||||
| @@ -5,10 +5,11 @@ | |||||
| * version 1.1, a copy of which has been included with this distribution in | * version 1.1, a copy of which has been included with this distribution in | ||||
| * the LICENSE.txt file. | * the LICENSE.txt file. | ||||
| */ | */ | ||||
| package org.apache.tools.todo.types; | |||||
| package org.apache.myrmidon.framework.file; | |||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.framework.file.FileList; | |||||
| import org.apache.tools.todo.util.FileUtils; | import org.apache.tools.todo.util.FileUtils; | ||||
| /** | /** | ||||
| @@ -17,7 +18,7 @@ import org.apache.tools.todo.util.FileUtils; | |||||
| * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a> | * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a> | ||||
| * @version $Revision$ $Date$ | * @version $Revision$ $Date$ | ||||
| */ | */ | ||||
| class ParsedPathElement | |||||
| public class ParsedPathElement | |||||
| implements FileList | implements FileList | ||||
| { | { | ||||
| private final String m_path; | private final String m_path; | ||||
| @@ -5,14 +5,19 @@ | |||||
| * version 1.1, a copy of which has been included with this distribution in | * version 1.1, a copy of which has been included with this distribution in | ||||
| * the LICENSE.txt file. | * the LICENSE.txt file. | ||||
| */ | */ | ||||
| package org.apache.tools.todo.types; | |||||
| package org.apache.myrmidon.framework.file; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.framework.DataType; | import org.apache.myrmidon.framework.DataType; | ||||
| import org.apache.myrmidon.framework.file.ArrayFileList; | |||||
| import org.apache.myrmidon.framework.file.FileList; | |||||
| import org.apache.tools.todo.util.FileUtils; | import org.apache.tools.todo.util.FileUtils; | ||||
| import org.apache.tools.todo.types.FileSet; | |||||
| import org.apache.tools.todo.types.DirectoryScanner; | |||||
| import org.apache.tools.todo.types.ScannerUtil; | |||||
| /** | /** | ||||
| * This object represents a path as used by CLASSPATH or PATH environment | * This object represents a path as used by CLASSPATH or PATH environment | ||||
| @@ -5,11 +5,11 @@ | |||||
| * version 1.1, a copy of which has been included with this distribution in | * version 1.1, a copy of which has been included with this distribution in | ||||
| * the LICENSE.txt file. | * the LICENSE.txt file. | ||||
| */ | */ | ||||
| package org.apache.tools.todo.types.converters; | |||||
| package org.apache.myrmidon.framework.file; | |||||
| import org.apache.aut.converter.AbstractConverter; | import org.apache.aut.converter.AbstractConverter; | ||||
| import org.apache.aut.converter.ConverterException; | import org.apache.aut.converter.ConverterException; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| /** | /** | ||||
| * A converter from String to Path. | * A converter from String to Path. | ||||
| @@ -17,7 +17,7 @@ import org.apache.tools.todo.types.Path; | |||||
| * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a> | * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a> | ||||
| * @version $Revision$ $Date$ | * @version $Revision$ $Date$ | ||||
| * | * | ||||
| * @ant:converter source="java.lang.String" destination="org.apache.tools.todo.types.Path" | |||||
| * @ant:converter source="java.lang.String" destination="org.apache.myrmidon.framework.file.Path" | |||||
| */ | */ | ||||
| public class StringToPathConverter | public class StringToPathConverter | ||||
| extends AbstractConverter | extends AbstractConverter | ||||
| @@ -5,7 +5,7 @@ | |||||
| * version 1.1, a copy of which has been included with this distribution in | * version 1.1, a copy of which has been included with this distribution in | ||||
| * the LICENSE.txt file. | * the LICENSE.txt file. | ||||
| */ | */ | ||||
| package org.apache.tools.todo.taskdefs; | |||||
| package org.apache.myrmidon.framework.java; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.lang.reflect.InvocationTargetException; | import java.lang.reflect.InvocationTargetException; | ||||
| @@ -18,20 +18,33 @@ import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.myrmidon.framework.Execute; | import org.apache.myrmidon.framework.Execute; | ||||
| import org.apache.tools.todo.types.Commandline; | import org.apache.tools.todo.types.Commandline; | ||||
| import org.apache.tools.todo.types.EnvironmentData; | import org.apache.tools.todo.types.EnvironmentData; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| import org.apache.tools.todo.types.SysProperties; | import org.apache.tools.todo.types.SysProperties; | ||||
| import org.apache.tools.todo.util.FileUtils; | import org.apache.tools.todo.util.FileUtils; | ||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | |||||
| import org.apache.avalon.excalibur.i18n.Resources; | |||||
| /** | /** | ||||
| * A utility class that executes a Java app, either in this JVM, or a forked | |||||
| * JVM. | |||||
| * A utility class that takes care of executing a Java application. This | |||||
| * class can execute Java apps in the current JVM, or a forked JVM. | |||||
| * | |||||
| * <p>To execute a Java application, create an instance of this class, | |||||
| * configure it, and call one of the following methods: | |||||
| * <ul> | |||||
| * <li>{@link #execute} | |||||
| * <li>{@link #executeForked} | |||||
| * <li>{@link #executeNonForked} | |||||
| * </ul> | |||||
| * | * | ||||
| * @author thomas.haas@softwired-inc.com | * @author thomas.haas@softwired-inc.com | ||||
| * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a> | * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a> | ||||
| */ | */ | ||||
| public class ExecuteJava | public class ExecuteJava | ||||
| { | { | ||||
| private final static Resources REZ | |||||
| = ResourceManager.getPackageResources( ExecuteJava.class ); | |||||
| private final Path m_classPath = new Path(); | private final Path m_classPath = new Path(); | ||||
| private final EnvironmentData m_sysProperties = new EnvironmentData(); | private final EnvironmentData m_sysProperties = new EnvironmentData(); | ||||
| private final Commandline m_args = new Commandline(); | private final Commandline m_args = new Commandline(); | ||||
| @@ -44,36 +57,58 @@ public class ExecuteJava | |||||
| private String m_maxMemory; | private String m_maxMemory; | ||||
| private boolean m_ignoreReturnCode; | private boolean m_ignoreReturnCode; | ||||
| /** | |||||
| * Sets the main class of the application. | |||||
| */ | |||||
| public void setClassName( final String className ) | public void setClassName( final String className ) | ||||
| { | { | ||||
| m_className = className; | m_className = className; | ||||
| } | } | ||||
| /** | |||||
| * Sets the executable jar file to use to execute the application. | |||||
| * Can only be used in forked mode. | |||||
| */ | |||||
| public void setJar( final File jar ) | public void setJar( final File jar ) | ||||
| { | { | ||||
| m_jar = jar; | m_jar = jar; | ||||
| } | } | ||||
| /** | |||||
| * Enables forked mode. | |||||
| */ | |||||
| public void setFork( final boolean fork ) | public void setFork( final boolean fork ) | ||||
| { | { | ||||
| m_fork = fork; | m_fork = fork; | ||||
| } | } | ||||
| /** | /** | ||||
| * Sets the max memory to use when running the application in a forked JVM. | |||||
| * Sets the max memory allocation pool size to use when running the | |||||
| * application. Only used in forked mode. | |||||
| * | * | ||||
| * @param maxMemory the maximum memory, or null for the default. | |||||
| * @param maxMemory the maximum memory pool size, or null for the default. | |||||
| */ | */ | ||||
| public void setMaxMemory( final String maxMemory ) | public void setMaxMemory( final String maxMemory ) | ||||
| { | { | ||||
| m_maxMemory = maxMemory; | m_maxMemory = maxMemory; | ||||
| } | } | ||||
| /** | |||||
| * Sets the working directory for the application. Only used in forked mode. | |||||
| */ | |||||
| public void setWorkingDirectory( final File workingDirectory ) | public void setWorkingDirectory( final File workingDirectory ) | ||||
| { | { | ||||
| m_workingDirectory = workingDirectory; | m_workingDirectory = workingDirectory; | ||||
| } | } | ||||
| /** | |||||
| * Disables checking of the application's return code. Only used in forked | |||||
| * mode. | |||||
| * | |||||
| * @param ignore If true, the return code of the application is ignored. | |||||
| * If false, an exception is thrown if the application does | |||||
| * no exit with a 0 return code. | |||||
| */ | |||||
| public void setIgnoreReturnCode( boolean ignore ) | public void setIgnoreReturnCode( boolean ignore ) | ||||
| { | { | ||||
| m_ignoreReturnCode = ignore; | m_ignoreReturnCode = ignore; | ||||
| @@ -90,21 +125,43 @@ public class ExecuteJava | |||||
| m_jvm = jvm; | m_jvm = jvm; | ||||
| } | } | ||||
| /** | |||||
| * Returns the classpath that will be used to execute the application. | |||||
| * | |||||
| * @return the application's classpath. This path can be modified. | |||||
| */ | |||||
| public Path getClassPath() | public Path getClassPath() | ||||
| { | { | ||||
| return m_classPath; | return m_classPath; | ||||
| } | } | ||||
| /** | |||||
| * Returns the system properties that will be used for the application. | |||||
| * Only used in forked mode. | |||||
| * | |||||
| * @return the application's system properties. Can be modified. | |||||
| */ | |||||
| public EnvironmentData getSysProperties() | public EnvironmentData getSysProperties() | ||||
| { | { | ||||
| return m_sysProperties; | return m_sysProperties; | ||||
| } | } | ||||
| /** | |||||
| * Returns the arguments that will be used for the application. | |||||
| * | |||||
| * @return the application's arguments. Can be modified. | |||||
| */ | |||||
| public Commandline getArguments() | public Commandline getArguments() | ||||
| { | { | ||||
| return m_args; | return m_args; | ||||
| } | } | ||||
| /** | |||||
| * Returns the JVM arguments that will be used to execute the application. | |||||
| * Only used in forked mode. | |||||
| * | |||||
| * @return the JVM aguments. Can be modified. | |||||
| */ | |||||
| public Commandline getVmArguments() | public Commandline getVmArguments() | ||||
| { | { | ||||
| return m_vmArgs; | return m_vmArgs; | ||||
| @@ -134,27 +191,43 @@ public class ExecuteJava | |||||
| { | { | ||||
| if( m_className == null ) | if( m_className == null ) | ||||
| { | { | ||||
| throw new TaskException( "Classname must not be null." ); | |||||
| final String message = REZ.getString( "executejava.no-classname.error" ); | |||||
| throw new TaskException( message ); | |||||
| } | } | ||||
| if( m_jar != null ) | if( m_jar != null ) | ||||
| { | { | ||||
| throw new TaskException( "Cannot execute a jar in non-forked mode." ); | |||||
| final String message = REZ.getString( "executejava.jar-no-fork.error" ); | |||||
| throw new TaskException( message ); | |||||
| } | } | ||||
| if( m_vmArgs.size() > 0 ) | if( m_vmArgs.size() > 0 ) | ||||
| { | { | ||||
| context.warn( "JVM args ignored when same JVM is used." ); | |||||
| final String message = REZ.getString( "executejava.ignore-jvm-args.notice" ); | |||||
| context.warn( message ); | |||||
| } | } | ||||
| if( m_workingDirectory != null ) | if( m_workingDirectory != null ) | ||||
| { | { | ||||
| context.warn( "Working directory ignored when same JVM is used." ); | |||||
| final String message = REZ.getString( "executejava.ignore-dir.notice" ); | |||||
| context.warn( message ); | |||||
| } | |||||
| if( m_maxMemory != null ) | |||||
| { | |||||
| final String message = REZ.getString( "executejava.ignore-maxmem.notice" ); | |||||
| context.warn( message ); | |||||
| } | } | ||||
| if( m_sysProperties.size() > 0 ) | if( m_sysProperties.size() > 0 ) | ||||
| { | { | ||||
| context.warn( "System properties ignored when same JVM is used." ); | |||||
| final String message = REZ.getString( "executejava.ignore-sys-props.notice" ); | |||||
| context.warn( message ); | |||||
| } | } | ||||
| final String[] args = m_args.getArguments(); | final String[] args = m_args.getArguments(); | ||||
| context.debug( "Running in same VM: " + m_className + " " + FileUtils.formatCommandLine( args ) ); | |||||
| // Log message | |||||
| final String debugMessage | |||||
| = REZ.getString( "executejava.exec-in-jvm.notice", | |||||
| m_className, | |||||
| FileUtils.formatCommandLine( args ) ); | |||||
| context.info( debugMessage ); | |||||
| // Locate the class | // Locate the class | ||||
| final Class target; | final Class target; | ||||
| @@ -173,7 +246,8 @@ public class ExecuteJava | |||||
| } | } | ||||
| catch( final Exception e ) | catch( final Exception e ) | ||||
| { | { | ||||
| throw new TaskException( "Could not find class \"" + m_className + "\".", e ); | |||||
| final String message = REZ.getString( "executejava.find-class.error", m_className ); | |||||
| throw new TaskException( message, e ); | |||||
| } | } | ||||
| // Call the main method | // Call the main method | ||||
| @@ -186,11 +260,13 @@ public class ExecuteJava | |||||
| catch( final InvocationTargetException e ) | catch( final InvocationTargetException e ) | ||||
| { | { | ||||
| final Throwable t = e.getTargetException(); | final Throwable t = e.getTargetException(); | ||||
| throw new TaskException( "Could not execute class \"" + m_className + "\".", t ); | |||||
| final String message = REZ.getString( "executejava.execute-app.error", m_className ); | |||||
| throw new TaskException( message, t ); | |||||
| } | } | ||||
| catch( final Exception e ) | catch( final Exception e ) | ||||
| { | { | ||||
| throw new TaskException( "Could not execute class \"" + m_className + "\".", e ); | |||||
| final String message = REZ.getString( "executejava.execute-app.error", m_className ); | |||||
| throw new TaskException( message, e ); | |||||
| } | } | ||||
| } | } | ||||
| @@ -203,11 +279,13 @@ public class ExecuteJava | |||||
| // Validate | // Validate | ||||
| if( m_className != null && m_jar != null ) | if( m_className != null && m_jar != null ) | ||||
| { | { | ||||
| throw new TaskException( "Only one of Classname and Jar can be set." ); | |||||
| final String message = REZ.getString( "executejava.class-and-jar.error" ); | |||||
| throw new TaskException( message ); | |||||
| } | } | ||||
| else if( m_className == null && m_jar == null ) | |||||
| if( m_className == null && m_jar == null ) | |||||
| { | { | ||||
| throw new TaskException( "Classname must not be null." ); | |||||
| final String message = REZ.getString( "executejava.no-classname.error" ); | |||||
| throw new TaskException( message ); | |||||
| } | } | ||||
| final Execute exe = new Execute(); | final Execute exe = new Execute(); | ||||
| @@ -0,0 +1,10 @@ | |||||
| executejava.exec-in-jvm.notice=Running in same VM: {0} {1}. | |||||
| executejava.ignore-jvm-args.notice=JVM args are ignored when using non-forked mode. | |||||
| executejava.ignore-dir.notice=Working directory is ignored when using non-forked mode. | |||||
| executejava.ignore-maxmem.notice=Maximum memory pool size is ignored when using non-forked mode. | |||||
| executejava.ignore-sys-props.notice=System properties are ignored when using non-forked mode. | |||||
| executejava.no-classname.error=No class-name specified. | |||||
| executejava.jar-no-fork.error=Cannot execute a jar in non-forked mode. | |||||
| executejava.find-class.error=Could not find main class "{0}". | |||||
| executejava.execute-app.error=Could not execute class "{0}". | |||||
| executejava.class-and-jar.error=Cannot specify both a Jar file and a main class. | |||||
| @@ -1,15 +1,6 @@ | |||||
| <ant-lib version="1.0"> | <ant-lib version="1.0"> | ||||
| <types> | <types> | ||||
| <task name="java" classname="org.apache.tools.todo.taskdefs.Java" /> | |||||
| <data-type name="path" classname="org.apache.tools.todo.types.Path" /> | |||||
| <task name="path" classname="org.apache.myrmidon.framework.TypeInstanceTask" /> | |||||
| <converter classname="org.apache.tools.todo.types.converters.StringToPathConverter" | |||||
| source="java.lang.String" | |||||
| destination="org.apache.tools.todo.types.Path" /> | |||||
| <converter classname="org.apache.tools.todo.types.converters.FileListToStringConverter" | |||||
| source="org.apache.tools.todo.types.FileList" | |||||
| destination="java.lang.String" /> | |||||
| </types> | </types> | ||||
| </ant-lib> | </ant-lib> | ||||
| @@ -13,8 +13,9 @@ import java.io.FileReader; | |||||
| import java.net.URL; | import java.net.URL; | ||||
| 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.myrmidon.framework.java.ExecuteJava; | |||||
| import org.apache.tools.todo.types.Argument; | import org.apache.tools.todo.types.Argument; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| /** | /** | ||||
| * ANTLR task. | * ANTLR task. | ||||
| @@ -20,8 +20,9 @@ import org.apache.myrmidon.listeners.LogEvent; | |||||
| import org.apache.tools.todo.taskdefs.javac.DefaultCompilerAdapter; | import org.apache.tools.todo.taskdefs.javac.DefaultCompilerAdapter; | ||||
| import org.apache.tools.todo.taskdefs.javac.Javac; | import org.apache.tools.todo.taskdefs.javac.Javac; | ||||
| import org.apache.tools.todo.types.DirectoryScanner; | import org.apache.tools.todo.types.DirectoryScanner; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| import org.apache.antlib.java.JavaTask; | |||||
| /** | /** | ||||
| * Instruments Java classes with <a href="http://www.reliable-systems.com/tools/"> | * Instruments Java classes with <a href="http://www.reliable-systems.com/tools/"> | ||||
| @@ -737,7 +738,7 @@ public class IContract extends MatchingTask | |||||
| iContractClasspath.addLocation( buildDir ); | iContractClasspath.addLocation( buildDir ); | ||||
| // Create a forked java process | // Create a forked java process | ||||
| Java iContract = null;//(Java)getProject().createTask( "java" ); | |||||
| JavaTask iContract = null;//(Java)getProject().createTask( "java" ); | |||||
| iContract.setFork( true ); | iContract.setFork( true ); | ||||
| iContract.setClassname( "com.reliablesystems.iContract.Tool" ); | iContract.setClassname( "com.reliablesystems.iContract.Tool" ); | ||||
| iContract.setClasspath( iContractClasspath ); | iContract.setClasspath( iContractClasspath ); | ||||
| @@ -15,7 +15,7 @@ import org.apache.avalon.excalibur.util.StringUtil; | |||||
| 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.todo.types.Commandline; | import org.apache.tools.todo.types.Commandline; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -12,7 +12,7 @@ import java.util.ArrayList; | |||||
| import org.apache.aut.nativelib.Os; | import org.apache.aut.nativelib.Os; | ||||
| 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.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| /** | /** | ||||
| * This task converts path and classpath information to a specific target OS | * This task converts path and classpath information to a specific target OS | ||||
| @@ -16,7 +16,7 @@ import java.util.Iterator; | |||||
| import java.util.Properties; | import java.util.Properties; | ||||
| 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.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -37,7 +37,7 @@ import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.tools.todo.types.DirectoryScanner; | import org.apache.tools.todo.types.DirectoryScanner; | ||||
| import org.apache.tools.todo.types.EnumeratedAttribute; | import org.apache.tools.todo.types.EnumeratedAttribute; | ||||
| import org.apache.tools.todo.types.FileSet; | import org.apache.tools.todo.types.FileSet; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| import org.apache.tools.todo.types.ScannerUtil; | import org.apache.tools.todo.types.ScannerUtil; | ||||
| @@ -17,7 +17,7 @@ import org.apache.myrmidon.api.TaskContext; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.framework.Execute; | import org.apache.myrmidon.framework.Execute; | ||||
| import org.apache.tools.todo.types.Commandline; | import org.apache.tools.todo.types.Commandline; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -9,7 +9,7 @@ package org.apache.tools.todo.taskdefs.javac; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.todo.types.Commandline; | import org.apache.tools.todo.types.Commandline; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -15,7 +15,7 @@ import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.myrmidon.framework.JavaVersion; | import org.apache.myrmidon.framework.JavaVersion; | ||||
| import org.apache.tools.todo.taskdefs.MatchingTask; | import org.apache.tools.todo.taskdefs.MatchingTask; | ||||
| import org.apache.tools.todo.types.DirectoryScanner; | import org.apache.tools.todo.types.DirectoryScanner; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.SourceFileScanner; | import org.apache.tools.todo.types.SourceFileScanner; | ||||
| import org.apache.tools.todo.util.mappers.GlobPatternMapper; | import org.apache.tools.todo.util.mappers.GlobPatternMapper; | ||||
| @@ -9,7 +9,7 @@ package org.apache.tools.todo.taskdefs.javac; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.todo.types.Commandline; | import org.apache.tools.todo.types.Commandline; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -9,7 +9,7 @@ package org.apache.tools.todo.taskdefs.javac; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.todo.types.Commandline; | import org.apache.tools.todo.types.Commandline; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -10,7 +10,7 @@ package org.apache.tools.todo.taskdefs.javac; | |||||
| import java.lang.reflect.Method; | import java.lang.reflect.Method; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.todo.types.Commandline; | import org.apache.tools.todo.types.Commandline; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -12,8 +12,8 @@ import java.util.Enumeration; | |||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| 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.todo.taskdefs.ExecuteJava; | |||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.java.ExecuteJava; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -12,8 +12,8 @@ import java.util.Enumeration; | |||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| 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.todo.taskdefs.ExecuteJava; | |||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.java.ExecuteJava; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -10,7 +10,7 @@ package org.apache.tools.todo.taskdefs.javadoc; | |||||
| 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.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| public class DocletInfo | public class DocletInfo | ||||
| { | { | ||||
| @@ -24,7 +24,7 @@ import org.apache.myrmidon.framework.Pattern; | |||||
| import org.apache.tools.todo.types.Commandline; | import org.apache.tools.todo.types.Commandline; | ||||
| import org.apache.tools.todo.types.DirectoryScanner; | import org.apache.tools.todo.types.DirectoryScanner; | ||||
| import org.apache.tools.todo.types.FileSet; | import org.apache.tools.todo.types.FileSet; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| import org.apache.tools.todo.types.ScannerUtil; | import org.apache.tools.todo.types.ScannerUtil; | ||||
| @@ -13,8 +13,8 @@ import java.io.IOException; | |||||
| import java.io.PrintWriter; | import java.io.PrintWriter; | ||||
| 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.todo.taskdefs.ExecuteJava; | |||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.java.ExecuteJava; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| /** | /** | ||||
| * Ant task to run JDepend tests. <p> | * Ant task to run JDepend tests. <p> | ||||
| @@ -15,7 +15,7 @@ import org.apache.tools.todo.taskdefs.MatchingTask; | |||||
| import org.apache.tools.todo.taskdefs.jsp.compilers.CompilerAdapter; | import org.apache.tools.todo.taskdefs.jsp.compilers.CompilerAdapter; | ||||
| import org.apache.tools.todo.taskdefs.jsp.compilers.CompilerAdapterFactory; | import org.apache.tools.todo.taskdefs.jsp.compilers.CompilerAdapterFactory; | ||||
| import org.apache.tools.todo.types.DirectoryScanner; | import org.apache.tools.todo.types.DirectoryScanner; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| /** | /** | ||||
| * Ant task to run the jsp compiler. <p> | * Ant task to run the jsp compiler. <p> | ||||
| @@ -12,10 +12,10 @@ 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.todo.taskdefs.ExecuteJava; | |||||
| import org.apache.myrmidon.framework.java.ExecuteJava; | |||||
| import org.apache.tools.todo.taskdefs.MatchingTask; | import org.apache.tools.todo.taskdefs.MatchingTask; | ||||
| import org.apache.tools.todo.types.DirectoryScanner; | import org.apache.tools.todo.types.DirectoryScanner; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -9,7 +9,7 @@ package org.apache.tools.todo.taskdefs.jsp.compilers; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.tools.todo.taskdefs.Java; | |||||
| import org.apache.antlib.java.JavaTask; | |||||
| import org.apache.tools.todo.taskdefs.jsp.JspC; | import org.apache.tools.todo.taskdefs.jsp.JspC; | ||||
| import org.apache.tools.todo.types.Argument; | import org.apache.tools.todo.types.Argument; | ||||
| import org.apache.tools.todo.types.Commandline; | import org.apache.tools.todo.types.Commandline; | ||||
| @@ -37,7 +37,7 @@ public class JasperC | |||||
| // Create an instance of the compiler, redirecting output to | // Create an instance of the compiler, redirecting output to | ||||
| // the project log | // the project log | ||||
| //FIXME | //FIXME | ||||
| Java java = null;//(Java)( getJspc().getProject() ).createTask( "java" ); | |||||
| JavaTask java = null;//(Java)( getJspc().getProject() ).createTask( "java" ); | |||||
| if( getJspc().getClasspath() != null ) | if( getJspc().getClasspath() != null ) | ||||
| { | { | ||||
| java.addClasspath( getJspc().getClasspath() ); | java.addClasspath( getJspc().getClasspath() ); | ||||
| @@ -19,13 +19,13 @@ import java.util.Random; | |||||
| import org.apache.myrmidon.api.AbstractTask; | import org.apache.myrmidon.api.AbstractTask; | ||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.todo.taskdefs.ExecuteJava; | |||||
| import org.apache.myrmidon.framework.java.ExecuteJava; | |||||
| import org.apache.tools.todo.types.Argument; | import org.apache.tools.todo.types.Argument; | ||||
| import org.apache.tools.todo.types.Commandline; | import org.apache.tools.todo.types.Commandline; | ||||
| import org.apache.tools.todo.types.EnumeratedAttribute; | import org.apache.tools.todo.types.EnumeratedAttribute; | ||||
| import org.apache.tools.todo.types.EnvironmentData; | import org.apache.tools.todo.types.EnvironmentData; | ||||
| import org.apache.tools.todo.types.EnvironmentVariable; | import org.apache.tools.todo.types.EnvironmentVariable; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| import org.apache.tools.todo.types.SysProperties; | import org.apache.tools.todo.types.SysProperties; | ||||
| @@ -17,11 +17,11 @@ import java.util.Iterator; | |||||
| import java.util.Random; | import java.util.Random; | ||||
| 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.todo.taskdefs.ExecuteJava; | |||||
| import org.apache.myrmidon.framework.java.ExecuteJava; | |||||
| import org.apache.tools.todo.types.Argument; | import org.apache.tools.todo.types.Argument; | ||||
| import org.apache.tools.todo.types.DirectoryScanner; | import org.apache.tools.todo.types.DirectoryScanner; | ||||
| import org.apache.tools.todo.types.FileSet; | import org.apache.tools.todo.types.FileSet; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.ScannerUtil; | import org.apache.tools.todo.types.ScannerUtil; | ||||
| /** | /** | ||||
| @@ -10,7 +10,7 @@ package org.apache.tools.todo.taskdefs.metamata; | |||||
| 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.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -14,7 +14,7 @@ import java.io.IOException; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.todo.taskdefs.exec.ExecuteStreamHandler; | import org.apache.tools.todo.taskdefs.exec.ExecuteStreamHandler; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -16,9 +16,9 @@ import java.util.Random; | |||||
| import org.apache.avalon.excalibur.io.IOUtil; | import org.apache.avalon.excalibur.io.IOUtil; | ||||
| 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.todo.taskdefs.ExecuteJava; | |||||
| import org.apache.myrmidon.framework.java.ExecuteJava; | |||||
| import org.apache.tools.todo.types.Argument; | import org.apache.tools.todo.types.Argument; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -14,7 +14,7 @@ import org.apache.myrmidon.api.TaskContext; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.framework.FileNameMapper; | import org.apache.myrmidon.framework.FileNameMapper; | ||||
| import org.apache.tools.todo.types.Commandline; | import org.apache.tools.todo.types.Commandline; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -18,7 +18,7 @@ import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.myrmidon.framework.FileNameMapper; | import org.apache.myrmidon.framework.FileNameMapper; | ||||
| import org.apache.tools.todo.taskdefs.MatchingTask; | import org.apache.tools.todo.taskdefs.MatchingTask; | ||||
| import org.apache.tools.todo.types.DirectoryScanner; | import org.apache.tools.todo.types.DirectoryScanner; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| import org.apache.tools.todo.types.SourceFileScanner; | import org.apache.tools.todo.types.SourceFileScanner; | ||||
| @@ -10,7 +10,7 @@ package org.apache.tools.todo.taskdefs.rmic; | |||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.myrmidon.framework.FileNameMapper; | import org.apache.myrmidon.framework.FileNameMapper; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.taskdefs.rmic.Rmic; | import org.apache.tools.todo.taskdefs.rmic.Rmic; | ||||
| /** | /** | ||||
| @@ -22,7 +22,7 @@ import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.myrmidon.framework.Execute; | import org.apache.myrmidon.framework.Execute; | ||||
| import org.apache.tools.todo.types.Commandline; | import org.apache.tools.todo.types.Commandline; | ||||
| import org.apache.tools.todo.types.EnumeratedAttribute; | import org.apache.tools.todo.types.EnumeratedAttribute; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.w3c.dom.Document; | import org.w3c.dom.Document; | ||||
| /** | /** | ||||
| @@ -19,7 +19,7 @@ import org.apache.myrmidon.framework.Execute; | |||||
| import org.apache.tools.todo.types.Argument; | import org.apache.tools.todo.types.Argument; | ||||
| import org.apache.tools.todo.types.Commandline; | import org.apache.tools.todo.types.Commandline; | ||||
| import org.apache.tools.todo.types.FileSet; | import org.apache.tools.todo.types.FileSet; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.types.PathUtil; | import org.apache.tools.todo.types.PathUtil; | ||||
| /** | /** | ||||
| @@ -9,7 +9,7 @@ package org.apache.tools.todo.taskdefs.stylebook; | |||||
| import java.io.File; | import java.io.File; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.todo.taskdefs.Java; | |||||
| import org.apache.antlib.java.JavaTask; | |||||
| import org.apache.tools.todo.types.Argument; | import org.apache.tools.todo.types.Argument; | ||||
| /** | /** | ||||
| @@ -20,7 +20,7 @@ import org.apache.tools.todo.types.Argument; | |||||
| * Börger</a> | * Börger</a> | ||||
| */ | */ | ||||
| public class StyleBook | public class StyleBook | ||||
| extends Java | |||||
| extends JavaTask | |||||
| { | { | ||||
| private File m_book; | private File m_book; | ||||
| private String m_loaderConfig; | private String m_loaderConfig; | ||||
| @@ -10,7 +10,7 @@ package org.apache.tools.todo.taskdefs.vss; | |||||
| import java.io.File; | import java.io.File; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.tools.todo.types.Commandline; | import org.apache.tools.todo.types.Commandline; | ||||
| import org.apache.tools.todo.types.Path; | |||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| /** | /** | ||||
| * Task to perform GET commands to Microsoft Visual Source Safe. <p> | * Task to perform GET commands to Microsoft Visual Source Safe. <p> | ||||
| @@ -9,6 +9,7 @@ package org.apache.tools.todo.types; | |||||
| import java.io.File; | import java.io.File; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| import org.apache.tools.todo.util.FileUtils; | import org.apache.tools.todo.util.FileUtils; | ||||
| /** | /** | ||||
| @@ -9,6 +9,7 @@ package org.apache.tools.todo.types; | |||||
| import java.io.File; | import java.io.File; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| public class EnvironmentVariable | public class EnvironmentVariable | ||||
| { | { | ||||
| @@ -13,6 +13,7 @@ import java.net.URL; | |||||
| import java.util.Locale; | import java.util.Locale; | ||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.framework.file.Path; | |||||
| /** | /** | ||||
| * Utilities for operating on Path objects. | * Utilities for operating on Path objects. | ||||