You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by do...@apache.org on 2001/12/23 15:22:48 UTC
cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic DefaultRmicAdapter.java KaffeRmic.java SunRmic.java WLRmic.java
donaldp 01/12/23 06:22:48
Modified: proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers
CompilerAdapterFactory.java
DefaultCompilerAdapter.java Gcj.java Javac12.java
Javac13.java JavacExternal.java Jikes.java Jvc.java
Kjc.java Sj.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/condition
Http.java Socket.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec
Execute.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file
Copy.java Delete.java Move.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc
Javadoc.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/depend
Depend.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet
Ilasm.java NetCommand.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb
BorlandDeploymentTool.java
BorlandGenerateClient.java DescriptorHandler.java
EjbJar.java GenericDeploymentTool.java
IPlanetDeploymentTool.java JbossDeploymentTool.java
WeblogicDeploymentTool.java
WeblogicTOPLinkDeploymentTool.java
WebsphereDeploymentTool.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/i18n
Translate.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide
VAJLocalUtil.java VAJRemoteUtil.java
VAJToolsServlet.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc
JJTree.java JavaCC.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jdepend
JDependTask.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jlink
JlinkTask.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp
JspC.java WLJspc.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers
DefaultCompilerAdapter.java JasperC.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit
AggregateTransformer.java JUnitTask.java
XMLResultAggregator.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata
AbstractMetamataTask.java MAudit.java
MAuditStreamHandler.java MMetricsStreamHandler.java
MParse.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net
FTP.java MimeMail.java TelnetTask.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce
P4Add.java P4Base.java P4Change.java P4Counter.java
P4Label.java P4Submit.java P4Sync.java
SimpleP4OutputHandler.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/pvcs
Pvcs.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka
CovMerge.java CovReport.java Coverage.java
XMLReport.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sound
AntSoundPlayer.java SoundTask.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic
DefaultRmicAdapter.java KaffeRmic.java SunRmic.java
WLRmic.java
Log:
Start updating logging to myrmidon style logging
Revision Changes Path
1.4 +5 -5 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java
Index: CompilerAdapterFactory.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CompilerAdapterFactory.java 2001/12/23 06:34:23 1.3
+++ CompilerAdapterFactory.java 2001/12/23 14:22:44 1.4
@@ -7,9 +7,8 @@
*/
package org.apache.tools.ant.taskdefs.compilers;
+import org.apache.avalon.framework.logger.Logger;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
/**
* Creates the necessary compiler adapter, given basic criteria.
@@ -51,7 +50,7 @@
* @throws TaskException if the compiler type could not be resolved into a
* compiler adapter.
*/
- public static CompilerAdapter getCompiler( String compilerType, Task task )
+ public static CompilerAdapter getCompiler( String compilerType, Logger logger )
throws TaskException
{
/*
@@ -83,8 +82,9 @@
}
catch( ClassNotFoundException cnfe )
{
- task.log( "Modern compiler is not available - using "
- + "classic compiler", Project.MSG_WARN );
+ final String message = "Modern compiler is not available - using "
+ + "classic compiler";
+ logger.warn( message );
return new Javac12();
}
return new Javac13();
1.14 +95 -94 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
Index: DefaultCompilerAdapter.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- DefaultCompilerAdapter.java 2001/12/23 06:34:23 1.13
+++ DefaultCompilerAdapter.java 2001/12/23 14:22:44 1.14
@@ -11,6 +11,7 @@
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Javac;
@@ -29,28 +30,30 @@
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
* @author <a href="mailto:jayglanville@home.com">J D Glanville</a>
*/
-public abstract class DefaultCompilerAdapter implements CompilerAdapter
+public abstract class DefaultCompilerAdapter
+ extends AbstractLogEnabled
+ implements CompilerAdapter
{
- protected static String lSep = System.getProperty( "line.separator" );
- protected boolean debug = false;
- protected boolean optimize = false;
- protected boolean deprecation = false;
- protected boolean depend = false;
- protected boolean verbose = false;
-
- protected Javac attributes;
- protected Path bootclasspath;
- protected Path compileClasspath;
-
- protected File[] compileList;
- protected File destDir;
- protected String encoding;
- protected Path extdirs;
- protected boolean includeAntRuntime;
- protected boolean includeJavaRuntime;
- protected String memoryInitialSize;
- protected String memoryMaximumSize;
- protected Project project;
+ protected static String LINE_SEP = System.getProperty( "line.separator" );
+ protected boolean m_debug;
+ protected boolean m_optimize;
+ protected boolean m_deprecation;
+ protected boolean m_depend;
+ protected boolean m_verbose;
+
+ protected Javac m_attributes;
+ protected Path m_bootclasspath;
+ protected Path m_compileClasspath;
+
+ protected File[] m_compileList;
+ protected File m_destDir;
+ protected String m_encoding;
+ protected Path m_extdirs;
+ protected boolean m_includeAntRuntime;
+ protected boolean m_includeJavaRuntime;
+ protected String m_memoryInitialSize;
+ protected String m_memoryMaximumSize;
+ protected Project m_project;
/*
* jdg - TODO - all these attributes are currently protected, but they
@@ -61,30 +64,30 @@
public void setJavac( Javac attributes )
{
- this.attributes = attributes;
+ this.m_attributes = attributes;
src = attributes.getSrcdir();
- destDir = attributes.getDestdir();
- encoding = attributes.getEncoding();
- debug = attributes.getDebug();
- optimize = attributes.getOptimize();
- deprecation = attributes.getDeprecation();
- depend = attributes.getDepend();
- verbose = attributes.getVerbose();
+ m_destDir = attributes.getDestdir();
+ m_encoding = attributes.getEncoding();
+ m_debug = attributes.getDebug();
+ m_optimize = attributes.getOptimize();
+ m_deprecation = attributes.getDeprecation();
+ m_depend = attributes.getDepend();
+ m_verbose = attributes.getVerbose();
target = attributes.getTarget();
- bootclasspath = attributes.getBootclasspath();
- extdirs = attributes.getExtdirs();
- compileList = attributes.getFileList();
- compileClasspath = attributes.getClasspath();
- project = attributes.getProject();
- includeAntRuntime = attributes.getIncludeantruntime();
- includeJavaRuntime = attributes.getIncludejavaruntime();
- memoryInitialSize = attributes.getMemoryInitialSize();
- memoryMaximumSize = attributes.getMemoryMaximumSize();
+ m_bootclasspath = attributes.getBootclasspath();
+ m_extdirs = attributes.getExtdirs();
+ m_compileList = attributes.getFileList();
+ m_compileClasspath = attributes.getClasspath();
+ m_project = attributes.getProject();
+ m_includeAntRuntime = attributes.getIncludeantruntime();
+ m_includeJavaRuntime = attributes.getIncludejavaruntime();
+ m_memoryInitialSize = attributes.getMemoryInitialSize();
+ m_memoryMaximumSize = attributes.getMemoryMaximumSize();
}
public Javac getJavac()
{
- return attributes;
+ return m_attributes;
}
protected Commandline setupJavacCommand()
@@ -128,46 +131,46 @@
// has its own parameter format
boolean usingJava1_1 = Project.getJavaVersion().equals( Project.JAVA_1_1 );
String memoryParameterPrefix = usingJava1_1 ? "-J-" : "-J-X";
- if( memoryInitialSize != null )
+ if( m_memoryInitialSize != null )
{
- if( !attributes.isForkedJavac() )
+ if( !m_attributes.isForkedJavac() )
{
- attributes.log( "Since fork is false, ignoring memoryInitialSize setting.",
- Project.MSG_WARN );
+ final String message = "Since fork is false, ignoring memoryInitialSize setting.";
+ getLogger().warn( message );
}
else
{
- cmd.createArgument().setValue( memoryParameterPrefix + "ms" + memoryInitialSize );
+ cmd.createArgument().setValue( memoryParameterPrefix + "ms" + m_memoryInitialSize );
}
}
- if( memoryMaximumSize != null )
+ if( m_memoryMaximumSize != null )
{
- if( !attributes.isForkedJavac() )
+ if( !m_attributes.isForkedJavac() )
{
- attributes.log( "Since fork is false, ignoring memoryMaximumSize setting.",
- Project.MSG_WARN );
+ final String message = "Since fork is false, ignoring memoryMaximumSize setting.";
+ getLogger().warn( message );
}
else
{
- cmd.createArgument().setValue( memoryParameterPrefix + "mx" + memoryMaximumSize );
+ cmd.createArgument().setValue( memoryParameterPrefix + "mx" + m_memoryMaximumSize );
}
}
- if( attributes.getNowarn() )
+ if( m_attributes.getNowarn() )
{
cmd.createArgument().setValue( "-nowarn" );
}
- if( deprecation == true )
+ if( m_deprecation == true )
{
cmd.createArgument().setValue( "-deprecation" );
}
- if( destDir != null )
+ if( m_destDir != null )
{
cmd.createArgument().setValue( "-d" );
- cmd.createArgument().setFile( destDir );
+ cmd.createArgument().setFile( m_destDir );
}
cmd.createArgument().setValue( "-classpath" );
@@ -176,17 +179,17 @@
// as well as "bootclasspath" and "extdirs"
if( Project.getJavaVersion().startsWith( "1.1" ) )
{
- Path cp = new Path( project );
+ Path cp = new Path( m_project );
/*
* XXX - This doesn't mix very well with build.systemclasspath,
*/
- if( bootclasspath != null )
+ if( m_bootclasspath != null )
{
- cp.append( bootclasspath );
+ cp.append( m_bootclasspath );
}
- if( extdirs != null )
+ if( m_extdirs != null )
{
- cp.addExtdirs( extdirs );
+ cp.addExtdirs( m_extdirs );
}
cp.append( classpath );
cp.append( src );
@@ -202,31 +205,31 @@
cmd.createArgument().setValue( "-target" );
cmd.createArgument().setValue( target );
}
- if( bootclasspath != null )
+ if( m_bootclasspath != null )
{
cmd.createArgument().setValue( "-bootclasspath" );
- cmd.createArgument().setPath( bootclasspath );
+ cmd.createArgument().setPath( m_bootclasspath );
}
- if( extdirs != null )
+ if( m_extdirs != null )
{
cmd.createArgument().setValue( "-extdirs" );
- cmd.createArgument().setPath( extdirs );
+ cmd.createArgument().setPath( m_extdirs );
}
}
- if( encoding != null )
+ if( m_encoding != null )
{
cmd.createArgument().setValue( "-encoding" );
- cmd.createArgument().setValue( encoding );
+ cmd.createArgument().setValue( m_encoding );
}
- if( debug )
+ if( m_debug )
{
if( useDebugLevel
&& Project.getJavaVersion() != Project.JAVA_1_0
&& Project.getJavaVersion() != Project.JAVA_1_1 )
{
- String debugLevel = attributes.getDebugLevel();
+ String debugLevel = m_attributes.getDebugLevel();
if( debugLevel != null )
{
cmd.createArgument().setValue( "-g:" + debugLevel );
@@ -246,12 +249,12 @@
{
cmd.createArgument().setValue( "-g:none" );
}
- if( optimize )
+ if( m_optimize )
{
cmd.createArgument().setValue( "-O" );
}
- if( depend )
+ if( m_depend )
{
if( Project.getJavaVersion().startsWith( "1.1" ) )
{
@@ -263,12 +266,12 @@
}
else
{
- attributes.log( "depend attribute is not supported by the modern compiler",
- Project.MSG_WARN );
+ final String message = "depend attribute is not supported by the modern compiler";
+ getLogger().warn( message );
}
}
- if( verbose )
+ if( m_verbose )
{
cmd.createArgument().setValue( "-verbose" );
}
@@ -305,10 +308,10 @@
throws TaskException
{
setupJavacCommandlineSwitches( cmd, true );
- if( attributes.getSource() != null )
+ if( m_attributes.getSource() != null )
{
cmd.createArgument().setValue( "-source" );
- cmd.createArgument().setValue( attributes.getSource() );
+ cmd.createArgument().setValue( m_attributes.getSource() );
}
return cmd;
}
@@ -321,39 +324,39 @@
protected Path getCompileClasspath()
throws TaskException
{
- Path classpath = new Path( project );
+ Path classpath = new Path( m_project );
// add dest dir to classpath so that previously compiled and
// untouched classes are on classpath
- if( destDir != null )
+ if( m_destDir != null )
{
- classpath.setLocation( destDir );
+ classpath.setLocation( m_destDir );
}
// Combine the build classpath with the system classpath, in an
// order determined by the value of build.classpath
- if( compileClasspath == null )
+ if( m_compileClasspath == null )
{
- if( includeAntRuntime )
+ if( m_includeAntRuntime )
{
classpath.addExisting( Path.systemClasspath );
}
}
else
{
- if( includeAntRuntime )
+ if( m_includeAntRuntime )
{
- classpath.addExisting( compileClasspath.concatSystemClasspath( "last" ) );
+ classpath.addExisting( m_compileClasspath.concatSystemClasspath( "last" ) );
}
else
{
- classpath.addExisting( compileClasspath.concatSystemClasspath( "ignore" ) );
+ classpath.addExisting( m_compileClasspath.concatSystemClasspath( "ignore" ) );
}
}
- if( includeJavaRuntime )
+ if( m_includeJavaRuntime )
{
classpath.addJavaRuntime();
}
@@ -435,9 +438,9 @@
try
{
final Execute exe = new Execute();
- exe.setOutput( new LogOutputStream( attributes, Project.MSG_INFO ) );
- exe.setError( new LogOutputStream( attributes, Project.MSG_WARN ) );
- exe.setWorkingDirectory( project.getBaseDir() );
+ exe.setOutput( new LogOutputStream( m_attributes, Project.MSG_INFO ) );
+ exe.setError( new LogOutputStream( m_attributes, Project.MSG_WARN ) );
+ exe.setWorkingDirectory( m_project.getBaseDir() );
exe.setCommandline( commandArray );
return exe.execute();
}
@@ -464,27 +467,25 @@
*/
protected void logAndAddFilesToCompile( Commandline cmd )
{
- attributes.log( "Compilation args: " + cmd.toString(),
- Project.MSG_VERBOSE );
+ getLogger().debug( "Compilation args: " + cmd.toString() );
StringBuffer niceSourceList = new StringBuffer( "File" );
- if( compileList.length != 1 )
+ if( m_compileList.length != 1 )
{
niceSourceList.append( "s" );
}
niceSourceList.append( " to be compiled:" );
- niceSourceList.append( lSep );
+ niceSourceList.append( LINE_SEP );
- for( int i = 0; i < compileList.length; i++ )
+ for( int i = 0; i < m_compileList.length; i++ )
{
- String arg = compileList[ i ].getAbsolutePath();
+ String arg = m_compileList[ i ].getAbsolutePath();
cmd.createArgument().setValue( arg );
- niceSourceList.append( " " + arg + lSep );
+ niceSourceList.append( " " + arg + LINE_SEP );
}
- attributes.log( niceSourceList.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( niceSourceList.toString() );
}
-
}
1.5 +14 -15 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java
Index: Gcj.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Gcj.java 2001/12/23 06:34:23 1.4
+++ Gcj.java 2001/12/23 14:22:44 1.5
@@ -8,7 +8,6 @@
package org.apache.tools.ant.taskdefs.compilers;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.Path;
@@ -32,7 +31,7 @@
throws TaskException
{
Commandline cmd;
- attributes.log( "Using gcj compiler", Project.MSG_VERBOSE );
+ getLogger().debug( "Using gcj compiler" );
cmd = setupGCJCommand();
int firstFileName = cmd.size();
@@ -45,23 +44,23 @@
throws TaskException
{
Commandline cmd = new Commandline();
- Path classpath = new Path( project );
+ Path classpath = new Path( m_project );
// gcj doesn't support bootclasspath dir (-bootclasspath)
// so we'll emulate it for compatibility and convenience.
- if( bootclasspath != null )
+ if( m_bootclasspath != null )
{
- classpath.append( bootclasspath );
+ classpath.append( m_bootclasspath );
}
// gcj doesn't support an extension dir (-extdir)
// so we'll emulate it for compatibility and convenience.
- classpath.addExtdirs( extdirs );
+ classpath.addExtdirs( m_extdirs );
- if( ( bootclasspath == null ) || ( bootclasspath.size() == 0 ) )
+ if( ( m_bootclasspath == null ) || ( m_bootclasspath.size() == 0 ) )
{
// no bootclasspath, therefore, get one from the java runtime
- includeJavaRuntime = true;
+ m_includeJavaRuntime = true;
}
classpath.append( getCompileClasspath() );
@@ -71,12 +70,12 @@
cmd.setExecutable( "gcj" );
- if( destDir != null )
+ if( m_destDir != null )
{
cmd.createArgument().setValue( "-d" );
- cmd.createArgument().setFile( destDir );
+ cmd.createArgument().setFile( m_destDir );
- if( destDir.mkdirs() )
+ if( m_destDir.mkdirs() )
{
throw new TaskException( "Can't make output directories. Maybe permission is wrong. " );
}
@@ -86,15 +85,15 @@
cmd.createArgument().setValue( "-classpath" );
cmd.createArgument().setPath( classpath );
- if( encoding != null )
+ if( m_encoding != null )
{
- cmd.createArgument().setValue( "--encoding=" + encoding );
+ cmd.createArgument().setValue( "--encoding=" + m_encoding );
}
- if( debug )
+ if( m_debug )
{
cmd.createArgument().setValue( "-g1" );
}
- if( optimize )
+ if( m_optimize )
{
cmd.createArgument().setValue( "-O" );
}
1.6 +2 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Javac12.java
Index: Javac12.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Javac12.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Javac12.java 2001/12/23 06:34:23 1.5
+++ Javac12.java 2001/12/23 14:22:44 1.6
@@ -32,10 +32,10 @@
public boolean execute()
throws TaskException
{
- attributes.log( "Using classic compiler", Project.MSG_VERBOSE );
+ getLogger().debug( "Using classic compiler" );
Commandline cmd = setupJavacCommand( true );
- OutputStream logstr = new LogOutputStream( attributes, Project.MSG_WARN );
+ OutputStream logstr = new LogOutputStream( m_attributes, Project.MSG_WARN );
try
{
// Create an instance of the compiler, redirecting output to
1.5 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Javac13.java
Index: Javac13.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Javac13.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Javac13.java 2001/12/23 06:34:23 1.4
+++ Javac13.java 2001/12/23 14:22:44 1.5
@@ -9,7 +9,6 @@
import java.lang.reflect.Method;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
/**
@@ -33,7 +32,7 @@
public boolean execute()
throws TaskException
{
- attributes.log( "Using modern compiler", Project.MSG_VERBOSE );
+ getLogger().debug( "Using modern compiler" );
Commandline cmd = setupModernJavacCommand();
// Use reflection to be able to build on all JDKs >= 1.1:
1.4 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java
Index: JavacExternal.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- JavacExternal.java 2001/12/23 06:34:23 1.3
+++ JavacExternal.java 2001/12/23 14:22:44 1.4
@@ -8,7 +8,6 @@
package org.apache.tools.ant.taskdefs.compilers;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
/**
@@ -28,7 +27,7 @@
public boolean execute()
throws TaskException
{
- attributes.log( "Using external javac compiler", Project.MSG_VERBOSE );
+ getLogger().debug( "Using external javac compiler" );
Commandline cmd = new Commandline();
cmd.setExecutable( getJavac().getJavacExecutable() );
1.5 +23 -22 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java
Index: Jikes.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Jikes.java 2001/12/23 06:34:23 1.4
+++ Jikes.java 2001/12/23 14:22:44 1.5
@@ -22,7 +22,8 @@
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
* @author <a href="mailto:jayglanville@home.com">J D Glanville</a>
*/
-public class Jikes extends DefaultCompilerAdapter
+public class Jikes
+ extends DefaultCompilerAdapter
{
/**
@@ -39,25 +40,25 @@
public boolean execute()
throws TaskException
{
- attributes.log( "Using jikes compiler", Project.MSG_VERBOSE );
+ getLogger().debug( "Using jikes compiler" );
- Path classpath = new Path( project );
+ Path classpath = new Path( m_project );
// Jikes doesn't support bootclasspath dir (-bootclasspath)
// so we'll emulate it for compatibility and convenience.
- if( bootclasspath != null )
+ if( m_bootclasspath != null )
{
- classpath.append( bootclasspath );
+ classpath.append( m_bootclasspath );
}
// Jikes doesn't support an extension dir (-extdir)
// so we'll emulate it for compatibility and convenience.
- classpath.addExtdirs( extdirs );
+ classpath.addExtdirs( m_extdirs );
- if( ( bootclasspath == null ) || ( bootclasspath.size() == 0 ) )
+ if( ( m_bootclasspath == null ) || ( m_bootclasspath.size() == 0 ) )
{
// no bootclasspath, therefore, get one from the java runtime
- includeJavaRuntime = true;
+ m_includeJavaRuntime = true;
}
else
{
@@ -76,42 +77,42 @@
String jikesPath = System.getProperty( "jikes.class.path" );
if( jikesPath != null )
{
- classpath.append( new Path( project, jikesPath ) );
+ classpath.append( new Path( m_project, jikesPath ) );
}
Commandline cmd = new Commandline();
cmd.setExecutable( "jikes" );
- if( deprecation == true )
+ if( m_deprecation == true )
cmd.createArgument().setValue( "-deprecation" );
- if( destDir != null )
+ if( m_destDir != null )
{
cmd.createArgument().setValue( "-d" );
- cmd.createArgument().setFile( destDir );
+ cmd.createArgument().setFile( m_destDir );
}
cmd.createArgument().setValue( "-classpath" );
cmd.createArgument().setPath( classpath );
- if( encoding != null )
+ if( m_encoding != null )
{
cmd.createArgument().setValue( "-encoding" );
- cmd.createArgument().setValue( encoding );
+ cmd.createArgument().setValue( m_encoding );
}
- if( debug )
+ if( m_debug )
{
cmd.createArgument().setValue( "-g" );
}
- if( optimize )
+ if( m_optimize )
{
cmd.createArgument().setValue( "-O" );
}
- if( verbose )
+ if( m_verbose )
{
cmd.createArgument().setValue( "-verbose" );
}
- if( depend )
+ if( m_depend )
{
cmd.createArgument().setValue( "-depend" );
}
@@ -126,13 +127,13 @@
* by emacs, so that emacs can directly set the cursor to the place,
* where the error occured.
*/
- String emacsProperty = project.getProperty( "build.compiler.emacs" );
+ String emacsProperty = m_project.getProperty( "build.compiler.emacs" );
if( emacsProperty != null && Project.toBoolean( emacsProperty ) )
{
cmd.createArgument().setValue( "+E" );
}
- if( attributes.getNowarn() )
+ if( m_attributes.getNowarn() )
{
/*
* FIXME later
@@ -146,7 +147,7 @@
/**
* Jikes can issue pedantic warnings.
*/
- String pedanticProperty = project.getProperty( "build.compiler.pedantic" );
+ String pedanticProperty = m_project.getProperty( "build.compiler.pedantic" );
if( pedanticProperty != null && Project.toBoolean( pedanticProperty ) )
{
cmd.createArgument().setValue( "+P" );
@@ -156,7 +157,7 @@
* Jikes supports something it calls "full dependency checking", see the
* jikes documentation for differences between -depend and +F.
*/
- String fullDependProperty = project.getProperty( "build.compiler.fulldepend" );
+ String fullDependProperty = m_project.getProperty( "build.compiler.fulldepend" );
if( fullDependProperty != null && Project.toBoolean( fullDependProperty ) )
{
cmd.createArgument().setValue( "+F" );
1.4 +12 -13 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Jvc.java
Index: Jvc.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Jvc.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Jvc.java 2001/12/23 06:34:23 1.3
+++ Jvc.java 2001/12/23 14:22:44 1.4
@@ -8,7 +8,6 @@
package org.apache.tools.ant.taskdefs.compilers;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.Path;
@@ -28,25 +27,25 @@
public boolean execute()
throws TaskException
{
- attributes.log( "Using jvc compiler", Project.MSG_VERBOSE );
+ getLogger().debug( "Using jvc compiler" );
- Path classpath = new Path( project );
+ Path classpath = new Path( m_project );
// jvc doesn't support bootclasspath dir (-bootclasspath)
// so we'll emulate it for compatibility and convenience.
- if( bootclasspath != null )
+ if( m_bootclasspath != null )
{
- classpath.append( bootclasspath );
+ classpath.append( m_bootclasspath );
}
// jvc doesn't support an extension dir (-extdir)
// so we'll emulate it for compatibility and convenience.
- classpath.addExtdirs( extdirs );
+ classpath.addExtdirs( m_extdirs );
- if( ( bootclasspath == null ) || ( bootclasspath.size() == 0 ) )
+ if( ( m_bootclasspath == null ) || ( m_bootclasspath.size() == 0 ) )
{
// no bootclasspath, therefore, get one from the java runtime
- includeJavaRuntime = true;
+ m_includeJavaRuntime = true;
}
else
{
@@ -64,10 +63,10 @@
Commandline cmd = new Commandline();
cmd.setExecutable( "jvc" );
- if( destDir != null )
+ if( m_destDir != null )
{
cmd.createArgument().setValue( "/d" );
- cmd.createArgument().setFile( destDir );
+ cmd.createArgument().setFile( m_destDir );
}
// Add the Classpath before the "internal" one.
@@ -81,15 +80,15 @@
// Do not display Logo
cmd.createArgument().setValue( "/nologo" );
- if( debug )
+ if( m_debug )
{
cmd.createArgument().setValue( "/g" );
}
- if( optimize )
+ if( m_optimize )
{
cmd.createArgument().setValue( "/O" );
}
- if( verbose )
+ if( m_verbose )
{
cmd.createArgument().setValue( "/verbose" );
}
1.6 +14 -15 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Kjc.java
Index: Kjc.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Kjc.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Kjc.java 2001/12/23 06:34:23 1.5
+++ Kjc.java 2001/12/23 14:22:44 1.6
@@ -9,7 +9,6 @@
import java.lang.reflect.Method;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.Path;
@@ -25,7 +24,7 @@
public boolean execute()
throws TaskException
{
- attributes.log( "Using kjc compiler", Project.MSG_VERBOSE );
+ getLogger().debug( "Using kjc compiler" );
Commandline cmd = setupKjcCommand();
try
@@ -71,31 +70,31 @@
// generate classpath, because kjc does't support sourcepath.
Path classpath = getCompileClasspath();
- if( deprecation == true )
+ if( m_deprecation == true )
{
cmd.createArgument().setValue( "-deprecation" );
}
- if( destDir != null )
+ if( m_destDir != null )
{
cmd.createArgument().setValue( "-d" );
- cmd.createArgument().setFile( destDir );
+ cmd.createArgument().setFile( m_destDir );
}
// generate the clsspath
cmd.createArgument().setValue( "-classpath" );
- Path cp = new Path( project );
+ Path cp = new Path( m_project );
// kjc don't have bootclasspath option.
- if( bootclasspath != null )
+ if( m_bootclasspath != null )
{
- cp.append( bootclasspath );
+ cp.append( m_bootclasspath );
}
- if( extdirs != null )
+ if( m_extdirs != null )
{
- cp.addExtdirs( extdirs );
+ cp.addExtdirs( m_extdirs );
}
cp.append( classpath );
@@ -105,23 +104,23 @@
// kjc-1.5A doesn't support -encoding option now.
// but it will be supported near the feature.
- if( encoding != null )
+ if( m_encoding != null )
{
cmd.createArgument().setValue( "-encoding" );
- cmd.createArgument().setValue( encoding );
+ cmd.createArgument().setValue( m_encoding );
}
- if( debug )
+ if( m_debug )
{
cmd.createArgument().setValue( "-g" );
}
- if( optimize )
+ if( m_optimize )
{
cmd.createArgument().setValue( "-O2" );
}
- if( verbose )
+ if( m_verbose )
{
cmd.createArgument().setValue( "-verbose" );
}
1.4 +2 -3 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Sj.java
Index: Sj.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Sj.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Sj.java 2001/12/23 06:34:23 1.3
+++ Sj.java 2001/12/23 14:22:44 1.4
@@ -8,7 +8,6 @@
package org.apache.tools.ant.taskdefs.compilers;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
/**
@@ -30,12 +29,12 @@
public boolean execute()
throws TaskException
{
- attributes.log( "Using symantec java compiler", Project.MSG_VERBOSE );
+ getLogger().debug( "Using symantec java compiler" );
Commandline cmd = setupJavacCommand();
cmd.setExecutable( "sj" );
- int firstFileName = cmd.size() - compileList.length;
+ int firstFileName = cmd.size() - m_compileList.length;
return executeExternalCompile( cmd.getCommandline(), firstFileName ) == 0;
}
1.5 +2 -3 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/condition/Http.java
Index: Http.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/condition/Http.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Http.java 2001/12/23 06:34:23 1.4
+++ Http.java 2001/12/23 14:22:45 1.5
@@ -12,7 +12,6 @@
import java.net.URL;
import java.net.URLConnection;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.ProjectComponent;
/**
@@ -39,7 +38,7 @@
{
throw new TaskException( "No url specified in HTTP task" );
}
- log( "Checking for " + spec, Project.MSG_VERBOSE );
+ getLogger().debug( "Checking for " + spec );
try
{
URL url = new URL( spec );
@@ -50,7 +49,7 @@
{
HttpURLConnection http = (HttpURLConnection)conn;
int code = http.getResponseCode();
- log( "Result code for " + spec + " was " + code, Project.MSG_VERBOSE );
+ getLogger().debug( "Result code for " + spec + " was " + code );
if( code > 0 && code < 500 )
{
return true;
1.5 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/condition/Socket.java
Index: Socket.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/condition/Socket.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Socket.java 2001/12/23 06:34:23 1.4
+++ Socket.java 2001/12/23 14:22:45 1.5
@@ -9,7 +9,6 @@
import java.io.IOException;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.ProjectComponent;
/**
@@ -46,7 +45,7 @@
{
throw new TaskException( "No port specified in Socket task" );
}
- log( "Checking for listener at " + server + ":" + port, Project.MSG_VERBOSE );
+ getLogger().debug( "Checking for listener at " + server + ":" + port );
try
{
java.net.Socket socket = new java.net.Socket( server, port );
1.20 +1 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/Execute.java
Index: Execute.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/Execute.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- Execute.java 2001/12/23 06:34:23 1.19
+++ Execute.java 2001/12/23 14:22:45 1.20
@@ -65,7 +65,7 @@
{
try
{
- task.log( Commandline.toString( cmdline ), Project.MSG_VERBOSE );
+ task.hackGetLogger().debug( Commandline.toString( cmdline ) );
final Execute exe = new Execute();
exe.setOutput( new LogOutputStream( task, Project.MSG_INFO ) );
exe.setError( new LogOutputStream( task, Project.MSG_WARN ) );
1.8 +2 -3 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Copy.java
Index: Copy.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Copy.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Copy.java 2001/12/23 06:34:24 1.7
+++ Copy.java 2001/12/23 14:22:45 1.8
@@ -232,8 +232,7 @@
}
else
{
- log( m_file + " omitted as " + m_destFile + " is up to date.",
- Project.MSG_VERBOSE );
+ getLogger().debug( m_file + " omitted as " + m_destFile + " is up to date." );
}
}
else
@@ -395,7 +394,7 @@
{
if( !d.mkdirs() )
{
- log( "Unable to create directory " + d.getAbsolutePath(), Project.MSG_ERR );
+ getLogger().error( "Unable to create directory " + d.getAbsolutePath() );
}
else
{
1.7 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Delete.java
Index: Delete.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Delete.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Delete.java 2001/12/23 06:34:24 1.6
+++ Delete.java 2001/12/23 14:22:45 1.7
@@ -280,8 +280,7 @@
}
else
{
- log( "Could not find file " + file.getAbsolutePath() + " to delete.",
- Project.MSG_VERBOSE );
+ getLogger().debug( "Could not find file " + file.getAbsolutePath() + " to delete." );
}
}
1.8 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Move.java
Index: Move.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Move.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Move.java 2001/12/23 06:34:24 1.7
+++ Move.java 2001/12/23 14:22:45 1.8
@@ -13,7 +13,6 @@
import java.util.Iterator;
import org.apache.avalon.excalibur.io.FileUtil;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.FilterSet;
import org.apache.tools.ant.types.FilterSetCollection;
@@ -195,7 +194,7 @@
{
if( !d.mkdirs() )
{
- log( "Unable to create directory " + d.getAbsolutePath(), Project.MSG_ERR );
+ getLogger().error( "Unable to create directory " + d.getAbsolutePath() );
}
else
{
1.3 +1 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java
Index: Javadoc.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Javadoc.java 2001/12/23 07:07:04 1.2
+++ Javadoc.java 2001/12/23 14:22:45 1.3
@@ -920,7 +920,7 @@
if( !Os.isFamily( "netware" ) )
{
getLogger().debug( "Unable to locate " + jdocExecutable.getAbsolutePath() +
- ". Using \"javadoc\" instead." );
+ ". Using \"javadoc\" instead." );
}
return "javadoc";
}
1.9 +12 -19 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
Index: Depend.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Depend.java 2001/12/23 06:31:55 1.8
+++ Depend.java 2001/12/23 14:22:45 1.9
@@ -22,7 +22,6 @@
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.AntClassLoader;
import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.MatchingTask;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.Reference;
@@ -226,33 +225,32 @@
if( dump )
{
- log( "Reverse Dependency Dump for " + affectedClassMap.size() +
- " classes:", Project.MSG_DEBUG );
+ getLogger().debug( "Reverse Dependency Dump for " + affectedClassMap.size() + " classes:" );
for( Enumeration e = affectedClassMap.keys(); e.hasMoreElements(); )
{
String className = (String)e.nextElement();
- log( " Class " + className + " affects:", Project.MSG_DEBUG );
+ getLogger().debug( " Class " + className + " affects:" );
Hashtable affectedClasses = (Hashtable)affectedClassMap.get( className );
for( Enumeration e2 = affectedClasses.keys(); e2.hasMoreElements(); )
{
String affectedClass = (String)e2.nextElement();
ClassFileInfo info = (ClassFileInfo)affectedClasses.get( affectedClass );
- log( " " + affectedClass + " in " + info.absoluteFile.getPath(), Project.MSG_DEBUG );
+ getLogger().debug( " " + affectedClass + " in " + info.absoluteFile.getPath() );
}
}
if( classpathDependencies != null )
{
- log( "Classpath file dependencies (Forward):", Project.MSG_DEBUG );
+ getLogger().debug( "Classpath file dependencies (Forward):" );
for( Enumeration e = classpathDependencies.keys(); e.hasMoreElements(); )
{
String className = (String)e.nextElement();
- log( " Class " + className + " depends on:", Project.MSG_DEBUG );
+ getLogger().debug( " Class " + className + " depends on:" );
Hashtable dependencies = (Hashtable)classpathDependencies.get( className );
for( Enumeration e2 = dependencies.elements(); e2.hasMoreElements(); )
{
File classpathFile = (File)e2.nextElement();
- log( " " + classpathFile.getPath(), Project.MSG_DEBUG );
+ getLogger().debug( " " + classpathFile.getPath() );
}
}
}
@@ -293,8 +291,7 @@
File classpathFile = (File)e2.nextElement();
if( classpathFile.lastModified() > info.absoluteFile.lastModified() )
{
- log( "Class " + className +
- " is out of date with respect to " + classpathFile, Project.MSG_DEBUG );
+ getLogger().debug( "Class " + className + " is out of date with respect to " + classpathFile );
outOfDateClasses.put( className, className );
break;
}
@@ -431,8 +428,7 @@
ClassFileInfo affectedClassInfo = (ClassFileInfo)affectedClasses.get( affectedClassName );
if( affectedClassInfo.absoluteFile.exists() )
{
- log( "Deleting file " + affectedClassInfo.absoluteFile.getPath() + " since " +
- className + " out of date", Project.MSG_VERBOSE );
+ getLogger().debug( "Deleting file " + affectedClassInfo.absoluteFile.getPath() + " since " + className + " out of date" );
affectedClassInfo.absoluteFile.delete();
count++;
if( closure )
@@ -449,14 +445,13 @@
// need to delete the main class
String topLevelClassName
= affectedClassName.substring( 0, affectedClassName.indexOf( "$" ) );
- log( "Top level class = " + topLevelClassName, Project.MSG_VERBOSE );
+ getLogger().debug( "Top level class = " + topLevelClassName );
ClassFileInfo topLevelClassInfo
= (ClassFileInfo)classFileInfoMap.get( topLevelClassName );
if( topLevelClassInfo != null &&
topLevelClassInfo.absoluteFile.exists() )
{
- log( "Deleting file " + topLevelClassInfo.absoluteFile.getPath() + " since " +
- "one of its inner classes was removed", Project.MSG_VERBOSE );
+ getLogger().debug( "Deleting file " + topLevelClassInfo.absoluteFile.getPath() + " since " + "one of its inner classes was removed" );
topLevelClassInfo.absoluteFile.delete();
count++;
if( closure )
@@ -519,7 +514,7 @@
for( Iterator e = getClassFiles( destPath ).iterator(); e.hasNext(); )
{
ClassFileInfo info = (ClassFileInfo)e.next();
- log( "Adding class info for " + info.className, Project.MSG_DEBUG );
+ getLogger().debug( "Adding class info for " + info.className );
classFileInfoMap.put( info.className, info );
ArrayList dependencyList = null;
@@ -622,9 +617,7 @@
String classFilePath = classURL.getFile();
classpathFileObject = new File( classFilePath );
}
- log( "Class " + className +
- " depends on " + classpathFileObject +
- " due to " + dependency, Project.MSG_DEBUG );
+ getLogger().debug( "Class " + className + " depends on " + classpathFileObject + " due to " + dependency );
}
}
classpathFileCache.put( dependency, classpathFileObject );
1.8 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
Index: Ilasm.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Ilasm.java 2001/12/23 06:31:55 1.7
+++ Ilasm.java 2001/12/23 14:22:45 1.8
@@ -10,7 +10,6 @@
import java.io.File;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Project;
/**
* Task to assemble .net 'Intermediate Language' files. The task will only work
@@ -188,7 +187,7 @@
public void setOwner( String s )
{
- log( "This option is not supported by ILASM as of Beta-2, and will be ignored", Project.MSG_WARN );
+ getLogger().warn( "This option is not supported by ILASM as of Beta-2, and will be ignored" );
}
/**
1.13 +5 -4 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java
Index: NetCommand.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- NetCommand.java 2001/12/23 06:31:55 1.12
+++ NetCommand.java 2001/12/23 14:22:45 1.13
@@ -9,6 +9,7 @@
import java.io.File;
import java.io.IOException;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
@@ -29,8 +30,8 @@
*/
public class NetCommand
+ extends AbstractLogEnabled
{
-
/**
* trace flag
*/
@@ -162,7 +163,7 @@
}
else
{
- _owner.log( _title + " Result: " + err, Project.MSG_ERR );
+ getLogger().error( _title + " Result: " + err );
}
}
}
@@ -179,7 +180,7 @@
*/
protected void logError( String msg )
{
- _owner.log( msg, Project.MSG_ERR );
+ getLogger().error( msg );
}
/**
@@ -189,7 +190,7 @@
*/
protected void logVerbose( String msg )
{
- _owner.log( msg, Project.MSG_VERBOSE );
+ getLogger().debug( msg );
}
/**
1.12 +12 -12 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
Index: BorlandDeploymentTool.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- BorlandDeploymentTool.java 2001/12/23 06:31:56 1.11
+++ BorlandDeploymentTool.java 2001/12/23 14:22:45 1.12
@@ -153,7 +153,7 @@
String s = reader.readLine();
if( s != null )
{
- log( "[java2iiop] " + s, Project.MSG_DEBUG );
+ getLogger().debug( "[java2iiop] " + s );
}// end of if ()
}
@@ -175,13 +175,13 @@
String javafile;
while( ( javafile = reader.readLine() ) != null )
{
- log( "buffer:" + javafile, Project.MSG_DEBUG );
+ getLogger().debug( "buffer:" + javafile );
if( javafile.endsWith( ".java" ) )
{
String classfile = toClassFile( javafile );
String key = classfile.substring( getConfig().srcDir.getAbsolutePath().length() + 1 );
- log( " generated : " + classfile, Project.MSG_DEBUG );
- log( " key : " + key, Project.MSG_DEBUG );
+ getLogger().debug( " generated : " + classfile );
+ getLogger().debug( " key : " + key );
_genfiles.put( key, new File( classfile ) );
}// end of if ()
}// end of while ()
@@ -278,7 +278,7 @@
File borlandDD = new File( getConfig().descriptorDir, ddPrefix + BAS_DD );
if( borlandDD.exists() )
{
- log( "Borland specific file found " + borlandDD, Project.MSG_VERBOSE );
+ getLogger().debug( "Borland specific file found " + borlandDD );
ejbFiles.put( META_DIR + BAS_DD, borlandDD );
}
else
@@ -314,7 +314,7 @@
//remove .class extension
String home = toClass( clazz );
homes.add( home );
- log( " Home " + home, Project.MSG_VERBOSE );
+ getLogger().debug( " Home " + home );
}// end of if ()
}// end of while ()
@@ -391,8 +391,8 @@
try
{
- log( "Calling java2iiop", Project.MSG_VERBOSE );
- log( commandline.toString(), Project.MSG_DEBUG );
+ getLogger().debug( "Calling java2iiop" );
+ getLogger().debug( commandline.toString() );
execTask.setCommandline( commandline.getCommandline() );
int result = execTask.execute();
if( result != 0 )
@@ -403,7 +403,7 @@
}
catch( java.io.IOException e )
{
- log( "java2iiop exception :" + e.getMessage(), Project.MSG_ERR );
+ getLogger().error( "java2iiop exception :" + e.getMessage() );
throw new TaskException( "Error", e );
}
}
@@ -421,7 +421,7 @@
//org.apache.tools.ant.taskdefs.optional.ejb.BorlandGenerateClient.class );
org.apache.tools.ant.taskdefs.optional.ejb.BorlandGenerateClient gentask = null;
- log( "generate client for " + sourceJar, Project.MSG_INFO );
+ getLogger().info( "generate client for " + sourceJar );
try
{
String args = verifyArgs;
@@ -483,7 +483,7 @@
throws TaskException
{
org.apache.tools.ant.taskdefs.Java javaTask = null;
- log( "verify " + sourceJar, Project.MSG_INFO );
+ getLogger().info( "verify " + sourceJar );
try
{
@@ -501,7 +501,7 @@
javaTask.setFork( true );
}
- log( "Calling " + VERIFY + " for " + sourceJar.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( "Calling " + VERIFY + " for " + sourceJar.toString() );
javaTask.execute();
}
catch( Exception e )
1.9 +3 -4 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java
Index: BorlandGenerateClient.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- BorlandGenerateClient.java 2001/12/23 06:31:56 1.8
+++ BorlandGenerateClient.java 2001/12/23 14:22:45 1.9
@@ -9,7 +9,6 @@
import java.io.File;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.Java;
import org.apache.tools.ant.taskdefs.exec.ExecTask;
@@ -121,7 +120,7 @@
if( clientjarfile == null ||
clientjarfile.isDirectory() )
{
- log( "invalid or missing client jar file.", Project.MSG_VERBOSE );
+ getLogger().debug( "invalid or missing client jar file." );
String ejbjarname = ejbjarfile.getAbsolutePath();
//clientname = ejbjarfile+client.jar
String clientname = ejbjarname.substring( 0, ejbjarname.lastIndexOf( "." ) );
@@ -181,7 +180,7 @@
execTask.createArg().setValue( "-clientjarfile" );
execTask.createArg().setValue( clientjarfile.getAbsolutePath() );
- log( "Calling java2iiop", Project.MSG_VERBOSE );
+ getLogger().debug( "Calling java2iiop" );
execTask.execute();
}
catch( Exception e )
@@ -232,7 +231,7 @@
execTask.createArg().setValue( "-clientjarfile" );
execTask.createArg().setValue( clientjarfile.getAbsolutePath() );
- log( "Calling EJBUtilities", Project.MSG_VERBOSE );
+ getLogger().debug( "Calling EJBUtilities" );
execTask.execute();
}
1.4 +28 -9 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java
Index: DescriptorHandler.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DescriptorHandler.java 2001/12/23 06:31:56 1.3
+++ DescriptorHandler.java 2001/12/23 14:22:45 1.4
@@ -14,7 +14,8 @@
import java.io.InputStream;
import java.net.URL;
import java.util.Hashtable;
-import org.apache.tools.ant.Project;
+import org.apache.avalon.framework.logger.LogEnabled;
+import org.apache.avalon.framework.logger.Logger;
import org.apache.tools.ant.Task;
import org.xml.sax.AttributeList;
import org.xml.sax.InputSource;
@@ -30,7 +31,9 @@
*
* @author RT
*/
-public class DescriptorHandler extends org.xml.sax.HandlerBase
+public class DescriptorHandler
+ extends org.xml.sax.HandlerBase
+ implements LogEnabled
{
private final static int STATE_LOOKING_EJBJAR = 1;
private final static int STATE_IN_EJBJAR = 2;
@@ -105,6 +108,23 @@
*/
private File srcDir;
+ private Logger m_logger;
+
+ /**
+ * Provide component with a logger.
+ *
+ * @param logger the logger
+ */
+ public void enableLogging( Logger logger )
+ {
+ m_logger = logger;
+ }
+
+ protected final Logger getLogger()
+ {
+ return m_logger;
+ }
+
public DescriptorHandler( Task task, File srcDir )
{
this.owningTask = task;
@@ -221,7 +241,7 @@
if( publicId != null )
{
fileDTDs.put( publicId, fileDTD );
- owningTask.log( "Mapped publicId " + publicId + " to file " + fileDTD, Project.MSG_VERBOSE );
+ getLogger().debug( "Mapped publicId " + publicId + " to file " + fileDTD );
}
return;
}
@@ -231,7 +251,7 @@
if( publicId != null )
{
resourceDTDs.put( publicId, location );
- owningTask.log( "Mapped publicId " + publicId + " to resource " + location, Project.MSG_VERBOSE );
+ getLogger().debug( "Mapped publicId " + publicId + " to resource " + location );
}
}
@@ -260,7 +280,7 @@
{
try
{
- owningTask.log( "Resolved " + publicId + " to local file " + dtdFile, Project.MSG_VERBOSE );
+ getLogger().debug( "Resolved " + publicId + " to local file " + dtdFile );
return new InputSource( new FileInputStream( dtdFile ) );
}
catch( FileNotFoundException ex )
@@ -275,7 +295,7 @@
InputStream is = this.getClass().getResourceAsStream( dtdResourceName );
if( is != null )
{
- owningTask.log( "Resolved " + publicId + " to local resource " + dtdResourceName, Project.MSG_VERBOSE );
+ getLogger().debug( "Resolved " + publicId + " to local resource " + dtdResourceName );
return new InputSource( is );
}
}
@@ -286,7 +306,7 @@
try
{
InputStream is = dtdUrl.openStream();
- owningTask.log( "Resolved " + publicId + " to url " + dtdUrl, Project.MSG_VERBOSE );
+ getLogger().debug( "Resolved " + publicId + " to url " + dtdUrl );
return new InputSource( is );
}
catch( IOException ioe )
@@ -295,8 +315,7 @@
}
}
- owningTask.log( "Could not resolve ( publicId: " + publicId + ", systemId: " + systemId + ") to a local entity",
- Project.MSG_INFO );
+ getLogger().info( "Could not resolve ( publicId: " + publicId + ", systemId: " + systemId + ") to a local entity" );
return null;
}
1.5 +3 -5 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
Index: EjbJar.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- EjbJar.java 2001/12/23 06:31:56 1.4
+++ EjbJar.java 2001/12/23 14:22:45 1.5
@@ -16,7 +16,6 @@
import javax.xml.parsers.SAXParserFactory;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.MatchingTask;
import org.apache.tools.ant.types.EnumeratedAttribute;
import org.apache.tools.ant.types.FileSet;
@@ -236,7 +235,7 @@
*/
public BorlandDeploymentTool createBorland()
{
- log( "Borland deployment tools", Project.MSG_VERBOSE );
+ getLogger().debug( "Borland deployment tools" );
BorlandDeploymentTool tool = new BorlandDeploymentTool();
tool.setTask( this );
@@ -283,7 +282,7 @@
*/
public IPlanetDeploymentTool createIplanet()
{
- log( "iPlanet Application Server deployment tools", Project.MSG_VERBOSE );
+ getLogger().debug( "iPlanet Application Server deployment tools" );
IPlanetDeploymentTool tool = new IPlanetDeploymentTool();
tool.setTask( this );
@@ -403,8 +402,7 @@
ds.scan();
String[] files = ds.getIncludedFiles();
- log( files.length + " deployment descriptors located.",
- Project.MSG_VERBOSE );
+ getLogger().debug( files.length + " deployment descriptors located." );
// Loop through the files. Each file represents one deployment
// descriptor, and hence one bean in our model.
1.9 +18 -22 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
Index: GenericDeploymentTool.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- GenericDeploymentTool.java 2001/12/23 06:31:56 1.8
+++ GenericDeploymentTool.java 2001/12/23 14:22:45 1.9
@@ -23,6 +23,7 @@
import java.util.jar.Manifest;
import java.util.zip.ZipEntry;
import javax.xml.parsers.SAXParser;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.bcel.*;
import org.apache.bcel.classfile.*;
import org.apache.myrmidon.api.TaskException;
@@ -46,7 +47,9 @@
*
* @author RT
*/
-public class GenericDeploymentTool implements EJBDeploymentTool
+public class GenericDeploymentTool
+ extends AbstractLogEnabled
+ implements EJBDeploymentTool
{
/**
* Private constants that are used when constructing the standard jarfile
@@ -250,12 +253,9 @@
if( needToRebuild( ejbFiles, jarFile ) )
{
// Log that we are going to build...
- log( "building "
- + jarFile.getName()
- + " with "
- + String.valueOf( ejbFiles.size() )
- + " files",
- Project.MSG_INFO );
+ final String message =
+ "building " + jarFile.getName() + " with " + String.valueOf( ejbFiles.size() ) + " files";
+ getLogger().info( message );
// Use helper method to write the jarfile
String publicId = getPublicId();
@@ -265,8 +265,7 @@
else
{
// Log that the file is up to date...
- log( jarFile.toString() + " is up to date.",
- Project.MSG_VERBOSE );
+ getLogger().debug( jarFile.toString() + " is up to date." );
}
}
@@ -525,9 +524,10 @@
}
catch( IOException ioe )
{
- log( "WARNING: IOException while adding entry " +
- logicalFilename + " to jarfile from " + inputFile.getPath() + " " +
- ioe.getClass().getName() + "-" + ioe.getMessage(), Project.MSG_WARN );
+ final String message = "WARNING: IOException while adding entry " +
+ logicalFilename + " to jarfile from " + inputFile.getPath() + " " +
+ ioe.getClass().getName() + "-" + ioe.getMessage();
+ getLogger().warn( message );
}
finally
{
@@ -619,7 +619,7 @@
}
catch( IOException e )
{
- log( "exception: " + e.getMessage(), Project.MSG_INFO );
+ getLogger().info( "exception: " + e.getMessage() );
}
}
newSet.clear();
@@ -644,7 +644,7 @@
{
String next = ( (String)i.next() ).replace( '/', File.separatorChar );
checkEntries.put( next + ".class", new File( base + next + ".class" ) );
- log( "dependent class: " + next + ".class" + " - " + base + next + ".class", Project.MSG_VERBOSE );
+ getLogger().debug( "dependent class: " + next + ".class" + " - " + base + next + ".class" );
}
}
@@ -701,8 +701,7 @@
if( config.manifest != null && config.manifest.exists() &&
config.manifest.lastModified() > lastBuild )
{
- log( "Build needed because manifest " + config.manifest + " is out of date",
- Project.MSG_VERBOSE );
+ getLogger().debug( "Build needed because manifest " + config.manifest + " is out of date" );
return true;
}
@@ -715,8 +714,7 @@
File currentFile = (File)fileIter.next();
if( lastBuild < currentFile.lastModified() )
{
- log( "Build needed because " + currentFile.getPath() + " is out of date",
- Project.MSG_VERBOSE );
+ getLogger().debug( "Build needed because " + currentFile.getPath() + " is out of date" );
return true;
}
}
@@ -887,8 +885,7 @@
String entryName = (String)entryIterator.next();
File entryFile = (File)files.get( entryName );
- log( "adding file '" + entryName + "'",
- Project.MSG_VERBOSE );
+ getLogger().debug( "adding file '" + entryName + "'" );
addFileToJar( jarStream, entryFile, entryName );
@@ -912,8 +909,7 @@
// link the file
entryFile = new File( config.srcDir, entryName );
- log( "adding innerclass file '" + entryName + "'",
- Project.MSG_VERBOSE );
+ getLogger().debug( "adding innerclass file '" + entryName + "'" );
addFileToJar( jarStream, entryFile, entryName );
1.5 +6 -8 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetDeploymentTool.java
Index: IPlanetDeploymentTool.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetDeploymentTool.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- IPlanetDeploymentTool.java 2001/12/23 06:31:56 1.4
+++ IPlanetDeploymentTool.java 2001/12/23 14:22:45 1.5
@@ -12,7 +12,6 @@
import java.util.Hashtable;
import javax.xml.parsers.SAXParser;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.xml.sax.SAXException;
/**
@@ -120,10 +119,10 @@
*/
public void setGenericJarSuffix( String inString )
{
- log( "Since a generic JAR file is not created during processing, the "
- + "iPlanet Deployment Tool does not support the "
- + "\"genericjarsuffix\" attribute. It will be ignored.",
- Project.MSG_WARN );
+ final String message = "Since a generic JAR file is not created during processing, the "
+ + "iPlanet Deployment Tool does not support the "
+ + "\"genericjarsuffix\" attribute. It will be ignored.";
+ getLogger().warn( message );
}
/**
@@ -166,8 +165,7 @@
{
this.descriptorName = descriptorName;
- log( "iPlanet Deployment Tool processing: " + descriptorName + " (and "
- + getIasDescriptorName() + ")", Project.MSG_VERBOSE );
+ getLogger().debug( "iPlanet Deployment Tool processing: " + descriptorName + " (and " + getIasDescriptorName() + ")" );
super.processDescriptor( descriptorName, saxParser );
}
@@ -334,7 +332,7 @@
File getVendorOutputJarFile( String baseName )
{
File jarFile = new File( getDestDir(), baseName + jarSuffix );
- log( "JAR file name: " + jarFile.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( "JAR file name: " + jarFile.toString() );
return jarFile;
}
1.4 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/JbossDeploymentTool.java
Index: JbossDeploymentTool.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/JbossDeploymentTool.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- JbossDeploymentTool.java 2001/12/23 06:31:56 1.3
+++ JbossDeploymentTool.java 2001/12/23 14:22:45 1.4
@@ -9,7 +9,6 @@
import java.io.File;
import java.util.Hashtable;
-import org.apache.tools.ant.Project;
/**
* The deployment tool to add the jboss specific deployment descriptor to the
@@ -45,7 +44,7 @@
}
else
{
- log( "Unable to locate jboss deployment descriptor. It was expected to be in " + jbossDD.getPath(), Project.MSG_WARN );
+ getLogger().warn( "Unable to locate jboss deployment descriptor. It was expected to be in " + jbossDD.getPath() );
return;
}
1.10 +15 -19 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
Index: WeblogicDeploymentTool.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- WeblogicDeploymentTool.java 2001/12/23 06:31:56 1.9
+++ WeblogicDeploymentTool.java 2001/12/23 14:22:45 1.10
@@ -22,7 +22,6 @@
import org.apache.avalon.excalibur.io.FileUtil;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.AntClassLoader;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Java;
import org.apache.tools.ant.types.Path;
import org.xml.sax.InputSource;
@@ -407,8 +406,7 @@
try
{
- log( "Checking if weblogic Jar needs to be rebuilt for jar " + weblogicJarFile.getName(),
- Project.MSG_VERBOSE );
+ getLogger().debug( "Checking if weblogic Jar needs to be rebuilt for jar " + weblogicJarFile.getName() );
// Only go forward if the generic and the weblogic file both exist
if( genericJarFile.exists() && genericJarFile.isFile()
&& weblogicJarFile.exists() && weblogicJarFile.isFile() )
@@ -458,7 +456,7 @@
if( genclass.isInterface() )
{
//Interface changed rebuild jar.
- log( "Interface " + genclass.getName() + " has changed", Project.MSG_VERBOSE );
+ getLogger().debug( "Interface " + genclass.getName() + " has changed" );
rebuild = true;
break;
}
@@ -474,7 +472,7 @@
if( !genericEntry.getName().equals( "META-INF/MANIFEST.MF" ) )
{
//File other then class changed rebuild
- log( "Non class file " + genericEntry.getName() + " has changed", Project.MSG_VERBOSE );
+ getLogger().debug( "Non class file " + genericEntry.getName() + " has changed" );
rebuild = true;
break;
}
@@ -484,7 +482,7 @@
else
{// a file doesnt exist rebuild
- log( "File " + filepath + " not present in weblogic jar", Project.MSG_VERBOSE );
+ getLogger().debug( "File " + filepath + " not present in weblogic jar" );
rebuild = true;
break;
}
@@ -492,7 +490,7 @@
if( !rebuild )
{
- log( "No rebuild needed - updating jar", Project.MSG_VERBOSE );
+ getLogger().debug( "No rebuild needed - updating jar" );
newWLJarFile = new File( weblogicJarFile.getAbsolutePath() + ".temp" );
if( newWLJarFile.exists() )
{
@@ -522,7 +520,7 @@
// Update with changed Bean class
if( replaceEntries.containsKey( je.getName() ) )
{
- log( "Updating Bean class from generic Jar " + je.getName(), Project.MSG_VERBOSE );
+ getLogger().debug( "Updating Bean class from generic Jar " + je.getName() );
// Use the entry from the generic jar
je = (JarEntry)replaceEntries.get( je.getName() );
is = genericJar.getInputStream( je );
@@ -543,7 +541,7 @@
}
else
{
- log( "Weblogic Jar rebuild needed due to changed interface or XML", Project.MSG_VERBOSE );
+ getLogger().debug( "Weblogic Jar rebuild needed due to changed interface or XML" );
}
}
else
@@ -629,16 +627,16 @@
}
else
{
- log( "Unable to locate weblogic deployment descriptor. It was expected to be in " +
- weblogicDD.getPath(), Project.MSG_WARN );
+ final String message = "Unable to locate weblogic deployment descriptor. It was expected to be in " +
+ weblogicDD.getPath();
+ getLogger().warn( message );
return;
}
if( !newCMP )
{
- log( "The old method for locating CMP files has been DEPRECATED.", Project.MSG_VERBOSE );
- log( "Please adjust your weblogic descriptor and set newCMP=\"true\" " +
- "to use the new CMP descriptor inclusion mechanism. ", Project.MSG_VERBOSE );
+ getLogger().debug( "The old method for locating CMP files has been DEPRECATED." );
+ getLogger().debug( "Please adjust your weblogic descriptor and set newCMP=\"true\" " + "to use the new CMP descriptor inclusion mechanism. " );
// The the weblogic cmp deployment descriptor
File weblogicCMPDD = new File( getConfig().descriptorDir, ddPrefix + WL_CMP_DD );
@@ -716,8 +714,7 @@
}
if( !keepGeneric )
{
- log( "deleting generic jar " + genericJarFile.toString(),
- Project.MSG_VERBOSE );
+ getLogger().debug( "deleting generic jar " + genericJarFile.toString() );
genericJarFile.delete();
}
}
@@ -791,7 +788,7 @@
}
else
{
- log( "Unrecognized publicId " + publicId + " - using EJB 1.1 compiler", Project.MSG_WARN );
+ getLogger().warn( "Unrecognized publicId " + publicId + " - using EJB 1.1 compiler" );
ejbcClassName = COMPILER_EJB11;
}
}
@@ -836,8 +833,7 @@
javaTask.setClasspath( classpath );
}
- log( "Calling " + ejbcClassName + " for " + sourceJar.toString(),
- Project.MSG_VERBOSE );
+ getLogger().debug( "Calling " + ejbcClassName + " for " + sourceJar.toString() );
if( javaTask.executeJava() != 0 )
{
1.4 +3 -3 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicTOPLinkDeploymentTool.java
Index: WeblogicTOPLinkDeploymentTool.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicTOPLinkDeploymentTool.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- WeblogicTOPLinkDeploymentTool.java 2001/12/23 06:31:56 1.3
+++ WeblogicTOPLinkDeploymentTool.java 2001/12/23 14:22:45 1.4
@@ -10,7 +10,6 @@
import java.io.File;
import java.util.Hashtable;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
public class WeblogicTOPLinkDeploymentTool extends WeblogicDeploymentTool
{
@@ -98,8 +97,9 @@
}
else
{
- log( "Unable to locate toplink deployment descriptor. It was expected to be in " +
- toplinkDD.getPath(), Project.MSG_WARN );
+ final String message = "Unable to locate toplink deployment descriptor. It was expected to be in " +
+ toplinkDD.getPath();
+ getLogger().warn( message );
}
}
}
1.10 +18 -28 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
Index: WebsphereDeploymentTool.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- WebsphereDeploymentTool.java 2001/12/23 06:31:56 1.9
+++ WebsphereDeploymentTool.java 2001/12/23 14:22:45 1.10
@@ -18,7 +18,6 @@
import java.util.jar.JarOutputStream;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.AntClassLoader;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Java;
import org.apache.tools.ant.types.Argument;
import org.apache.tools.ant.types.EnumeratedAttribute;
@@ -30,8 +29,8 @@
*
* @author <ma...@interkeel.com>Maneesh Sahu</mailto>
*/
-
-public class WebsphereDeploymentTool extends GenericDeploymentTool
+public class WebsphereDeploymentTool
+ extends GenericDeploymentTool
{
public final static String PUBLICID_EJB11
@@ -541,8 +540,7 @@
JarOutputStream newJarStream = null;
try
{
- log( "Checking if websphere Jar needs to be rebuilt for jar " + websphereJarFile.getName(),
- Project.MSG_VERBOSE );
+ getLogger().debug( "Checking if websphere Jar needs to be rebuilt for jar " + websphereJarFile.getName() );
// Only go forward if the generic and the websphere file both exist
@@ -604,7 +602,7 @@
//Interface changed rebuild jar.
- log( "Interface " + genclass.getName() + " has changed", Project.MSG_VERBOSE );
+ getLogger().debug( "Interface " + genclass.getName() + " has changed" );
rebuild = true;
break;
}
@@ -623,7 +621,7 @@
//File other then class changed rebuild
- log( "Non class file " + genericEntry.getName() + " has changed", Project.MSG_VERBOSE );
+ getLogger().debug( "Non class file " + genericEntry.getName() + " has changed" );
rebuild = true;
}
break;
@@ -632,14 +630,14 @@
}
else
{// a file doesnt exist rebuild
- log( "File " + filepath + " not present in websphere jar", Project.MSG_VERBOSE );
+ getLogger().debug( "File " + filepath + " not present in websphere jar" );
rebuild = true;
break;
}
}
if( !rebuild )
{
- log( "No rebuild needed - updating jar", Project.MSG_VERBOSE );
+ getLogger().debug( "No rebuild needed - updating jar" );
newwasJarFile = new File( websphereJarFile.getAbsolutePath() + ".temp" );
if( newwasJarFile.exists() )
{
@@ -674,8 +672,7 @@
if( replaceEntries.containsKey( je.getName() ) )
{
- log( "Updating Bean class from generic Jar " + je.getName(),
- Project.MSG_VERBOSE );
+ getLogger().debug( "Updating Bean class from generic Jar " + je.getName() );
// Use the entry from the generic jar
@@ -699,7 +696,7 @@
}
else
{
- log( "websphere Jar rebuild needed due to changed interface or XML", Project.MSG_VERBOSE );
+ getLogger().debug( "websphere Jar rebuild needed due to changed interface or XML" );
}
}
else
@@ -789,8 +786,7 @@
}
else
{
- log( "Unable to locate websphere extensions. It was expected to be in " +
- websphereEXT.getPath(), Project.MSG_VERBOSE );
+ getLogger().debug( "Unable to locate websphere extensions. It was expected to be in " + websphereEXT.getPath() );
}
File websphereBND = new File( getConfig().descriptorDir, ddPrefix + WAS_BND );
if( websphereBND.exists() )
@@ -800,14 +796,12 @@
}
else
{
- log( "Unable to locate websphere bindings. It was expected to be in " +
- websphereBND.getPath(), Project.MSG_VERBOSE );
+ getLogger().debug( "Unable to locate websphere bindings. It was expected to be in " + websphereBND.getPath() );
}
if( !newCMP )
{
- log( "The old method for locating CMP files has been DEPRECATED.", Project.MSG_VERBOSE );
- log( "Please adjust your websphere descriptor and set newCMP=\"true\" " +
- "to use the new CMP descriptor inclusion mechanism. ", Project.MSG_VERBOSE );
+ getLogger().debug( "The old method for locating CMP files has been DEPRECATED." );
+ getLogger().debug( "Please adjust your websphere descriptor and set newCMP=\"true\" " + "to use the new CMP descriptor inclusion mechanism. " );
}
else
{
@@ -828,8 +822,7 @@
}
else
{
- log( "Unable to locate the websphere Map: " +
- websphereMAP.getPath(), Project.MSG_VERBOSE );
+ getLogger().debug( "Unable to locate the websphere Map: " + websphereMAP.getPath() );
}
File websphereSchema = new File( getConfig().descriptorDir,
ddPrefix + dbPrefix + WAS_CMP_SCHEMA );
@@ -840,8 +833,7 @@
}
else
{
- log( "Unable to locate the websphere Schema: " +
- websphereSchema.getPath(), Project.MSG_VERBOSE );
+ getLogger().debug( "Unable to locate the websphere Schema: " + websphereSchema.getPath() );
}
// Theres nothing else to see here...keep moving sonny
@@ -884,8 +876,7 @@
}
if( !keepGeneric )
{
- log( "deleting generic jar " + genericJarFile.toString(),
- Project.MSG_VERBOSE );
+ getLogger().debug( "deleting generic jar " + genericJarFile.toString() );
genericJarFile.delete();
}
}
@@ -953,7 +944,7 @@
// Why do my ""'s get stripped away???
- log( "EJB Deploy Options: " + args, Project.MSG_VERBOSE );
+ getLogger().debug( "EJB Deploy Options: " + args );
Java javaTask = (Java)getTask().getProject().createTask( "java" );
// Set the JvmArgs
@@ -997,8 +988,7 @@
{
javaTask.setFork( true );
}
- log( "Calling websphere.ejbdeploy for " + sourceJar.toString(),
- Project.MSG_VERBOSE );
+ getLogger().debug( "Calling websphere.ejbdeploy for " + sourceJar.toString() );
javaTask.execute();
}
}
1.9 +6 -14 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java
Index: Translate.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Translate.java 2001/12/23 06:31:56 1.8
+++ Translate.java 2001/12/23 14:22:46 1.9
@@ -21,7 +21,6 @@
import org.apache.avalon.excalibur.io.FileUtil;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.MatchingTask;
import org.apache.tools.ant.types.FileSet;
@@ -484,12 +483,12 @@
ins = new FileInputStream( bundleFile );
loaded = true;
bundleLastModified[ i ] = new File( bundleFile ).lastModified();
- log( "Using " + bundleFile, Project.MSG_DEBUG );
+ getLogger().debug( "Using " + bundleFile );
loadResourceMap( ins );
}
catch( IOException ioe )
{
- log( bundleFile + " not found.", Project.MSG_DEBUG );
+ getLogger().debug( bundleFile + " not found." );
//if all resource files associated with this bundle
//have been scanned for and still not able to
//find a single resrouce file, throw exception
@@ -536,9 +535,7 @@
}
catch( Exception e )
{
- log( "Exception occured while trying to check/create "
- + " parent directory. " + e.getMessage(),
- Project.MSG_DEBUG );
+ getLogger().debug( "Exception occured while trying to check/create " + " parent directory. " + e.getMessage() );
}
destLastModified = dest.lastModified();
srcLastModified = new File( srcFiles[ i ] ).lastModified();
@@ -553,8 +550,7 @@
|| destLastModified < bundleLastModified[ 5 ]
|| destLastModified < bundleLastModified[ 6 ] )
{
- log( "Processing " + srcFiles[ j ],
- Project.MSG_DEBUG );
+ getLogger().debug( "Processing " + srcFiles[ j ] );
FileOutputStream fos = new FileOutputStream( dest );
BufferedWriter out = new BufferedWriter(
new OutputStreamWriter( fos,
@@ -604,9 +600,7 @@
//use the key itself as the value also.
if( replace == null )
{
- log( "Warning: The key: " + matches
- + " hasn't been defined.",
- Project.MSG_DEBUG );
+ getLogger().debug( "Warning: The key: " + matches + " hasn't been defined." );
replace = matches;
}
line = line.substring( 0, startIndex )
@@ -632,9 +626,7 @@
}
else
{
- log( "Skipping " + srcFiles[ j ] +
- " as destination file is up to date",
- Project.MSG_VERBOSE );
+ getLogger().debug( "Skipping " + srcFiles[ j ] + " as destination file is up to date" );
}
}
catch( IOException ioe )
1.7 +6 -6 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalUtil.java
Index: VAJLocalUtil.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalUtil.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- VAJLocalUtil.java 2001/12/23 06:31:56 1.6
+++ VAJLocalUtil.java 2001/12/23 14:22:46 1.7
@@ -162,7 +162,7 @@
+ dest, MSG_INFO );
for( int i = 0; i < packages.length; i++ )
{
- log( " " + packages[ i ].getName(), MSG_VERBOSE );
+ getLogger().debug( " " + packages[ i ].getName() );
}
ExportCodeSpec exportSpec = new ExportCodeSpec();
@@ -246,7 +246,7 @@
summaryLog.append( importProject );
summaryLog.append( "'." );
- log( summaryLog.toString(), MSG_INFO );
+ getLogger().info( summaryLog.toString() );
try
{
@@ -257,7 +257,7 @@
}
else
{
- log( importedTypes.length + " types imported", MSG_DEBUG );
+ getLogger().debug( importedTypes.length + " types imported" );
for( int i = 0; i < importedTypes.length; i++ )
{
log( importedTypes[ i ].getPackage().getName()
@@ -294,7 +294,7 @@
VAJProjectDescription d = (VAJProjectDescription)e.next();
if( !d.projectFound() )
{
- log( "No Projects match the name " + d.getName(), MSG_WARN );
+ getLogger().warn( "No Projects match the name " + d.getName() );
}
}
@@ -483,10 +483,10 @@
*/
private void logFiles( ArrayList fileNames, String fileType )
{
- log( fileType + " files found for import:", MSG_VERBOSE );
+ getLogger().debug( fileType + " files found for import:" );
for( Iterator e = fileNames.iterator(); e.hasNext(); )
{
- log( " " + e.next(), MSG_VERBOSE );
+ getLogger().debug( " " + e.next() );
}
}
1.7 +4 -4 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJRemoteUtil.java
Index: VAJRemoteUtil.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJRemoteUtil.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- VAJRemoteUtil.java 2001/12/23 06:31:56 1.6
+++ VAJRemoteUtil.java 2001/12/23 14:22:46 1.7
@@ -208,7 +208,7 @@
boolean requestFailed = false;
try
{
- log( "Request: " + request, MSG_DEBUG );
+ getLogger().debug( "Request: " + request );
//must be HTTP connection
URL requestUrl = new URL( request );
@@ -230,7 +230,7 @@
}
if( is == null )
{
- log( "Can't get " + request, MSG_ERR );
+ getLogger().error( "Can't get " + request );
throw new TaskException( "Couldn't execute " + request );
}
@@ -251,7 +251,7 @@
}
catch( Exception e )
{
- log( "Response line doesn't contain log level!", MSG_ERR );
+ getLogger().error( "Response line doesn't contain log level!" );
}
log( line.substring( 2 ), level );
line = br.readLine();
@@ -260,7 +260,7 @@
}
catch( IOException ex )
{
- log( "Error sending tool request to VAJ" + ex, MSG_ERR );
+ getLogger().error( "Error sending tool request to VAJ" + ex );
throw new TaskException( "Couldn't execute " + request );
}
if( requestFailed )
1.6 +1 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJToolsServlet.java
Index: VAJToolsServlet.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJToolsServlet.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- VAJToolsServlet.java 2001/12/23 06:31:57 1.5
+++ VAJToolsServlet.java 2001/12/23 14:22:46 1.6
@@ -65,7 +65,7 @@
}
catch( TaskException e )
{
- util.log( "Error occured: " + e.getMessage(), VAJUtil.MSG_ERR );
+ util.getLogger().error( "Error occured: " + e.getMessage() );
}
catch( Exception e )
{
1.13 +1 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
Index: JJTree.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- JJTree.java 2001/12/23 06:31:57 1.12
+++ JJTree.java 2001/12/23 14:22:46 1.13
@@ -188,7 +188,7 @@
exe.setOutput( new LogOutputStream( this, Project.MSG_INFO ) );
exe.setError( new LogOutputStream( this, Project.MSG_INFO ) );
- log( cmdl.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( cmdl.toString() );
exe.setCommandline( cmdl.getCommandline() );
try
1.9 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
Index: JavaCC.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- JavaCC.java 2001/12/23 06:31:57 1.8
+++ JavaCC.java 2001/12/23 14:22:46 1.9
@@ -11,7 +11,6 @@
import java.util.Enumeration;
import java.util.Hashtable;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.exec.Execute;
import org.apache.tools.ant.types.Argument;
@@ -216,7 +215,7 @@
final File javaFile = getOutputJavaFile( outputDirectory, target );
if( javaFile.exists() && target.lastModified() < javaFile.lastModified() )
{
- log( "Target is already built - skipping (" + target + ")", Project.MSG_VERBOSE );
+ getLogger().debug( "Target is already built - skipping (" + target + ")" );
return;
}
cmdl.createArgument().setValue( target.getAbsolutePath() );
1.12 +2 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
Index: JDependTask.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- JDependTask.java 2001/12/23 06:31:57 1.11
+++ JDependTask.java 2001/12/23 14:22:46 1.12
@@ -275,7 +275,7 @@
if( getHaltonerror() )
throw new TaskException( "JDepend failed" );
else
- log( "JDepend FAILED", Project.MSG_ERR );
+ getLogger().error( "JDepend FAILED" );
}
}
@@ -339,7 +339,7 @@
if( getOutputFile() != null )
getLogger().info( "Output to be stored in " + getOutputFile().getPath() );
- log( "Executing: " + commandline.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( "Executing: " + commandline.toString() );
try
{
return exe.execute();
1.7 +3 -4 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java
Index: JlinkTask.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- JlinkTask.java 2001/12/23 06:31:57 1.6
+++ JlinkTask.java 2001/12/23 14:22:46 1.7
@@ -9,7 +9,6 @@
import java.io.File;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.MatchingTask;
import org.apache.tools.ant.types.Path;
@@ -158,18 +157,18 @@
throw new TaskException( "addfiles or mergefiles required! Please set." );
}
getLogger().info( "linking: " + outfile.getPath() );
- log( "compression: " + compress, Project.MSG_VERBOSE );
+ getLogger().debug( "compression: " + compress );
jlink linker = new jlink();
linker.setOutfile( outfile.getPath() );
linker.setCompression( compress );
if( haveMergeFiles() )
{
- log( "merge files: " + mergefiles.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( "merge files: " + mergefiles.toString() );
linker.addMergeFiles( mergefiles.list() );
}
if( haveAddFiles() )
{
- log( "add files: " + addfiles.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( "add files: " + addfiles.toString() );
linker.addAddFiles( addfiles.list() );
}
try
1.10 +10 -15 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
Index: JspC.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- JspC.java 2001/12/23 06:31:57 1.9
+++ JspC.java 2001/12/23 14:22:46 1.10
@@ -12,7 +12,6 @@
import java.util.Date;
import org.apache.myrmidon.api.TaskException;
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.optional.jsp.compilers.CompilerAdapter;
import org.apache.tools.ant.taskdefs.optional.jsp.compilers.CompilerAdapterFactory;
@@ -58,7 +57,7 @@
* </a>
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
* @author <a href="mailto:jayglanville@home.com">J D Glanville</a>
- * @version $Revision: 1.9 $ $Date: 2001/12/23 06:31:57 $
+ * @version $Revision: 1.10 $ $Date: 2001/12/23 14:22:46 $
*/
public class JspC extends MatchingTask
{
@@ -381,7 +380,7 @@
{
compiler = "jasper";
}
- log( "compiling " + compileList.size() + " files", Project.MSG_VERBOSE );
+ getLogger().debug( "compiling " + compileList.size() + " files" );
if( compileList.size() > 0 )
{
@@ -405,7 +404,7 @@
}
else
{
- log( FAIL_MSG, Project.MSG_ERR );
+ getLogger().error( FAIL_MSG );
}
}
}
@@ -413,11 +412,11 @@
{
if( filecount == 0 )
{
- log( "there were no files to compile", Project.MSG_INFO );
+ getLogger().info( "there were no files to compile" );
}
else
{
- log( "all files are up to date", Project.MSG_VERBOSE );
+ getLogger().debug( "all files are up to date" );
}
}
}
@@ -462,8 +461,9 @@
if( srcFile.lastModified() > now )
{
- log( "Warning: file modified in the future: " +
- files[ i ], Project.MSG_WARN );
+ final String message =
+ "Warning: file modified in the future: " + files[ i ];
+ getLogger().warn( message );
}
if( !javaFile.exists() ||
@@ -471,16 +471,11 @@
{
if( !javaFile.exists() )
{
- log( "Compiling " + srcFile.getPath() +
- " because java file "
- + javaFile.getPath() + " does not exist",
- Project.MSG_DEBUG );
+ getLogger().debug( "Compiling " + srcFile.getPath() + " because java file " + javaFile.getPath() + " does not exist" );
}
else
{
- log( "Compiling " + srcFile.getPath() +
- " because it is out of date with respect to "
- + javaFile.getPath(), Project.MSG_DEBUG );
+ getLogger().debug( "Compiling " + srcFile.getPath() + " because it is out of date with respect to " + javaFile.getPath() );
}
compileList.add( srcFile.getAbsolutePath() );
}
1.12 +4 -5 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
Index: WLJspc.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- WLJspc.java 2001/12/23 06:31:57 1.11
+++ WLJspc.java 2001/12/23 14:22:46 1.12
@@ -13,7 +13,6 @@
import java.util.StringTokenizer;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Java;
import org.apache.tools.ant.taskdefs.MatchingTask;
import org.apache.tools.ant.types.Path;
@@ -233,7 +232,7 @@
helperTask.setClasspath( compileClasspath );
if( helperTask.executeJava() != 0 )
{
- log( files[ i ] + " failed to compile", Project.MSG_WARN );
+ getLogger().warn( files[ i ] + " failed to compile" );
}
}
}
@@ -295,14 +294,14 @@
if( srcFile.lastModified() > now )
{
- log( "Warning: file modified in the future: " +
- files[ i ], Project.MSG_WARN );
+ final String message = "Warning: file modified in the future: " + files[ i ];
+ getLogger().warn( message );
}
if( srcFile.lastModified() > classFile.lastModified() )
{
//log("Files are" + srcFile.getAbsolutePath()+" " +classFile.getAbsolutePath());
filesToDo.add( files[ i ] );
- log( "Recompiling File " + files[ i ], Project.MSG_VERBOSE );
+ getLogger().debug( "Recompiling File " + files[ i ] );
}
}
}
1.6 +4 -6 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultCompilerAdapter.java
Index: DefaultCompilerAdapter.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultCompilerAdapter.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DefaultCompilerAdapter.java 2001/12/23 06:31:58 1.5
+++ DefaultCompilerAdapter.java 2001/12/23 14:22:46 1.6
@@ -9,7 +9,7 @@
import java.util.ArrayList;
import java.util.Iterator;
-import org.apache.tools.ant.Project;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.tools.ant.taskdefs.optional.jsp.JspC;
import org.apache.tools.ant.types.Commandline;
@@ -20,6 +20,7 @@
* @author Matthew Watson <a href="mailto:mattw@i3sp.com">mattw@i3sp.com</a>
*/
public abstract class DefaultCompilerAdapter
+ extends AbstractLogEnabled
implements CompilerAdapter
{
/*
@@ -56,7 +57,7 @@
ArrayList compileList,
Commandline cmd )
{
- jspc.log( "Compilation args: " + cmd.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( "Compilation args: " + cmd.toString() );
StringBuffer niceSourceList = new StringBuffer( "File" );
if( compileList.size() != 1 )
@@ -75,10 +76,7 @@
niceSourceList.append( " " + arg + lSep );
}
- jspc.log( niceSourceList.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( niceSourceList.toString() );
}
- /*
- * ------------------------------------------------------------
- */
}
1.6 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
Index: JasperC.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- JasperC.java 2001/12/23 06:31:58 1.5
+++ JasperC.java 2001/12/23 14:22:46 1.6
@@ -8,7 +8,6 @@
package org.apache.tools.ant.taskdefs.optional.jsp.compilers;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Java;
import org.apache.tools.ant.taskdefs.optional.jsp.JspC;
import org.apache.tools.ant.types.Commandline;
@@ -28,7 +27,7 @@
public boolean execute()
throws TaskException
{
- getJspc().log( "Using jasper compiler", Project.MSG_VERBOSE );
+ getLogger().debug( "Using jasper compiler" );
Commandline cmd = setupJasperCommand();
try
1.8 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java
Index: AggregateTransformer.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AggregateTransformer.java 2001/12/23 06:31:58 1.7
+++ AggregateTransformer.java 2001/12/23 14:22:46 1.8
@@ -17,7 +17,6 @@
import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.avalon.excalibur.io.FileUtil;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.EnumeratedAttribute;
import org.w3c.dom.Document;
@@ -83,7 +82,7 @@
*/
public void setExtension( String ext )
{
- task.log( "extension is not used anymore", Project.MSG_WARN );
+ task.getLogger().warn( "extension is not used anymore" );
}
public void setFormat( Format format )
1.17 +13 -15 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
Index: JUnitTask.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- JUnitTask.java 2001/12/23 06:31:58 1.16
+++ JUnitTask.java 2001/12/23 14:22:46 1.17
@@ -465,27 +465,24 @@
{
int pling = u.indexOf( "!" );
String jarName = u.substring( 9, pling );
- log( "Implicitly adding " + jarName + " to classpath",
- Project.MSG_DEBUG );
+ getLogger().debug( "Implicitly adding " + jarName + " to classpath" );
createClasspath().setLocation( new File( ( new File( jarName ) ).getAbsolutePath() ) );
}
else if( u.startsWith( "file:" ) )
{
int tail = u.indexOf( resource );
String dirName = u.substring( 5, tail );
- log( "Implicitly adding " + dirName + " to classpath",
- Project.MSG_DEBUG );
+ getLogger().debug( "Implicitly adding " + dirName + " to classpath" );
createClasspath().setLocation( new File( ( new File( dirName ) ).getAbsolutePath() ) );
}
else
{
- log( "Don\'t know how to handle resource URL " + u,
- Project.MSG_DEBUG );
+ getLogger().debug( "Don\'t know how to handle resource URL " + u );
}
}
else
{
- log( "Couldn\'t find " + resource, Project.MSG_DEBUG );
+ getLogger().debug( "Couldn\'t find " + resource );
}
}
@@ -542,8 +539,9 @@
}
else
{
- log( "TEST " + test.getName() + " FAILED"
- + ( wasKilled ? " (timeout)" : "" ), Project.MSG_ERR );
+ final String message = "TEST " + test.getName() + " FAILED" +
+ ( wasKilled ? " (timeout)" : "" );
+ getLogger().error( message );
if( errorOccurredHere && test.getErrorProperty() != null )
{
setProperty( test.getErrorProperty(), "true" );
@@ -609,7 +607,7 @@
cmd.createArgument().setValue( "haltOnFailure=" + test.getHaltonfailure() );
if( summary )
{
- log( "Running " + test.getName(), Project.MSG_INFO );
+ getLogger().info( "Running " + test.getName() );
cmd.createArgument().setValue( "formatter=org.apache.tools.ant.taskdefs.optional.junit.SummaryJUnitResultFormatter" );
}
@@ -661,7 +659,7 @@
exe.setWorkingDirectory( dir );
}
- log( "Executing: " + cmd.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( "Executing: " + cmd.toString() );
int retVal;
try
{
@@ -693,7 +691,7 @@
test.setProperties( getProject().getProperties() );
if( dir != null )
{
- log( "dir attribute ignored if running in the same VM", Project.MSG_WARN );
+ getLogger().warn( "dir attribute ignored if running in the same VM" );
}
CommandlineJava.SysProperties sysProperties = commandline.getSystemProperties();
@@ -703,12 +701,12 @@
}
try
{
- log( "Using System properties " + System.getProperties(), Project.MSG_VERBOSE );
+ getLogger().debug( "Using System properties " + System.getProperties() );
AntClassLoader cl = null;
Path classpath = commandline.getClasspath();
if( classpath != null )
{
- log( "Using CLASSPATH " + classpath, Project.MSG_VERBOSE );
+ getLogger().debug( "Using CLASSPATH " + classpath );
cl = new AntClassLoader( null, getProject(), classpath, false );
// make sure the test will be accepted as a TestCase
@@ -719,7 +717,7 @@
runner = new JUnitTestRunner( test, test.getHaltonerror(), test.getFiltertrace(), test.getHaltonfailure(), cl );
if( summary )
{
- log( "Running " + test.getName(), Project.MSG_INFO );
+ getLogger().info( "Running " + test.getName() );
SummaryJUnitResultFormatter f =
new SummaryJUnitResultFormatter();
1.10 +5 -6 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java
Index: XMLResultAggregator.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- XMLResultAggregator.java 2001/12/23 06:31:58 1.9
+++ XMLResultAggregator.java 2001/12/23 14:22:46 1.10
@@ -21,7 +21,6 @@
import org.apache.avalon.framework.ExceptionUtil;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.util.DOMElementWriter;
@@ -275,7 +274,7 @@
{
try
{
- log( "Parsing file: '" + files[ i ] + "'", Project.MSG_VERBOSE );
+ getLogger().debug( "Parsing file: '" + files[ i ] + "'" );
//XXX there seems to be a bug in xerces 1.3.0 that doesn't like file object
// will investigate later. It does not use the given directory but
// the vm dir instead ? Works fine with crimson.
@@ -289,19 +288,19 @@
else
{
// issue a warning.
- log( "the file " + files[ i ] + " is not a valid testsuite XML document", Project.MSG_WARN );
+ getLogger().warn( "the file " + files[ i ] + " is not a valid testsuite XML document" );
}
}
catch( SAXException e )
{
// a testcase might have failed and write a zero-length document,
// It has already failed, but hey.... mm. just put a warning
- log( "The file " + files[ i ] + " is not a valid XML document. It is possibly corrupted.", Project.MSG_WARN );
- log( ExceptionUtil.printStackTrace( e ), Project.MSG_DEBUG );
+ getLogger().warn( "The file " + files[ i ] + " is not a valid XML document. It is possibly corrupted." );
+ getLogger().debug( ExceptionUtil.printStackTrace( e ) );
}
catch( IOException e )
{
- log( "Error while accessing file " + files[ i ] + ": " + e.getMessage(), Project.MSG_ERR );
+ getLogger().error( "Error while accessing file " + files[ i ] + ": " + e.getMessage() );
}
}
return rootElement;
1.11 +3 -3 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
Index: AbstractMetamataTask.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- AbstractMetamataTask.java 2001/12/23 06:31:58 1.10
+++ AbstractMetamataTask.java 2001/12/23 14:22:46 1.11
@@ -229,7 +229,7 @@
// retrieve all the files we want to scan
includedFiles = scanFileSets();
- log( includedFiles.size() + " files added for audit", Project.MSG_VERBOSE );
+ getLogger().debug( includedFiles.size() + " files added for audit" );
// write all the options to a temp file and use it ro run the process
ArrayList options = getOptions();
@@ -314,7 +314,7 @@
{
final Execute exe = new Execute();
setupStreamHandler( exe );
- log( cmdl.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( cmdl.toString() );
exe.setCommandline( cmdl.getCommandline() );
try
{
@@ -376,7 +376,7 @@
DirectoryScanner ds = fs.getDirectoryScanner( getProject() );
ds.scan();
String[] f = ds.getIncludedFiles();
- log( i + ") Adding " + f.length + " files from directory " + ds.getBasedir(), Project.MSG_VERBOSE );
+ getLogger().debug( i + ") Adding " + f.length + " files from directory " + ds.getBasedir() );
for( int j = 0; j < f.length; j++ )
{
String pathname = f[ j ];
1.9 +1 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAudit.java
Index: MAudit.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAudit.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- MAudit.java 2001/12/23 06:31:58 1.8
+++ MAudit.java 2001/12/23 14:22:46 1.9
@@ -200,7 +200,7 @@
}
if( !unused && searchPath != null )
{
- log( "'searchpath' element ignored. 'unused' attribute is disabled.", Project.MSG_WARN );
+ getLogger().warn( "'searchpath' element ignored. 'unused' attribute is disabled." );
}
}
1.8 +3 -4 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAuditStreamHandler.java
Index: MAuditStreamHandler.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAuditStreamHandler.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- MAuditStreamHandler.java 2001/12/23 06:31:58 1.7
+++ MAuditStreamHandler.java 2001/12/23 14:22:46 1.8
@@ -19,7 +19,6 @@
import java.util.Iterator;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.exec.ExecuteStreamHandler;
import org.apache.tools.ant.util.DOMElementWriter;
import org.apache.tools.ant.util.regexp.RegexpMatcher;
@@ -157,7 +156,7 @@
String fullclassname = (String)filemapping.get( filepath );
if( fullclassname == null )
{
- task.log( "Could not find class mapping for " + filepath, Project.MSG_WARN );
+ task.getLogger().warn( "Could not find class mapping for " + filepath );
continue;
}
int pos = fullclassname.lastIndexOf( '.' );
@@ -193,7 +192,7 @@
}
catch( IOException exc )
{
- task.log( "Unable to write log file", Project.MSG_ERR );
+ task.getLogger().error( "Unable to write log file" );
}
finally
{
@@ -265,7 +264,7 @@
{
// this doesn't match..report it as info, it could be
// either the copyright, summary or a multiline message (damn !)
- task.log( line, Project.MSG_INFO );
+ task.getLogger().info( line );
}
}
1.7 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MMetricsStreamHandler.java
Index: MMetricsStreamHandler.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MMetricsStreamHandler.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- MMetricsStreamHandler.java 2001/12/23 06:31:58 1.6
+++ MMetricsStreamHandler.java 2001/12/23 14:22:46 1.7
@@ -26,7 +26,6 @@
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamResult;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.exec.ExecuteStreamHandler;
import org.xml.sax.Attributes;
@@ -323,7 +322,7 @@
{
e.printStackTrace();
// invalid lines are sent to the output as information, it might be anything,
- task.log( line, Project.MSG_INFO );
+ task.getLogger().info( line );
}
}
1.12 +1 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
Index: MParse.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- MParse.java 2001/12/23 06:31:58 1.11
+++ MParse.java 2001/12/23 14:22:46 1.12
@@ -306,7 +306,7 @@
}
final Execute process = new Execute( handler );
- log( cmdl.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( cmdl.toString() );
process.setCommandline( cmdl.getCommandline() );
try
{
1.9 +16 -22 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
Index: FTP.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- FTP.java 2001/12/23 06:31:59 1.8
+++ FTP.java 2001/12/23 14:22:47 1.9
@@ -25,7 +25,6 @@
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.FileScanner;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.EnumeratedAttribute;
import org.apache.tools.ant.types.FileSet;
@@ -287,7 +286,7 @@
try
{
- log( "Opening FTP connection to " + server, Project.MSG_VERBOSE );
+ getLogger().debug( "Opening FTP connection to " + server );
ftp = new FTPClient();
@@ -297,15 +296,15 @@
throw new TaskException( "FTP connection failed: " + ftp.getReplyString() );
}
- log( "connected", Project.MSG_VERBOSE );
- log( "logging in to FTP server", Project.MSG_VERBOSE );
+ getLogger().debug( "connected" );
+ getLogger().debug( "logging in to FTP server" );
if( !ftp.login( userid, password ) )
{
throw new TaskException( "Could not login to FTP server" );
}
- log( "login succeeded", Project.MSG_VERBOSE );
+ getLogger().debug( "login succeeded" );
if( binary )
{
@@ -320,7 +319,7 @@
if( passive )
{
- log( "entering passive mode", Project.MSG_VERBOSE );
+ getLogger().debug( "entering passive mode" );
ftp.enterLocalPassiveMode();
if( !FTPReply.isPositiveCompletion( ftp.getReplyCode() ) )
{
@@ -343,7 +342,7 @@
{
if( remotedir != null )
{
- log( "changing the remote directory", Project.MSG_VERBOSE );
+ getLogger().debug( "changing the remote directory" );
ftp.changeWorkingDirectory( remotedir );
if( !FTPReply.isPositiveCompletion( ftp.getReplyCode() ) )
{
@@ -367,7 +366,7 @@
{
try
{
- log( "disconnecting", Project.MSG_VERBOSE );
+ getLogger().debug( "disconnecting" );
ftp.logout();
ftp.disconnect();
}
@@ -421,7 +420,7 @@
String s = "could not get file: " + ftp.getReplyString();
if( skipFailedTransfers == true )
{
- log( s, Project.MSG_WARN );
+ getLogger().warn( s );
skipped++;
}
else
@@ -432,8 +431,7 @@
}
else
{
- log( "File " + file.getAbsolutePath() + " copied from " + server,
- Project.MSG_VERBOSE );
+ getLogger().debug( "File " + file.getAbsolutePath() + " copied from " + server );
transferred++;
}
}
@@ -467,7 +465,7 @@
protected boolean isUpToDate( FTPClient ftp, File localFile, String remoteFile )
throws IOException, TaskException
{
- log( "checking date for " + remoteFile, Project.MSG_VERBOSE );
+ getLogger().debug( "checking date for " + remoteFile );
FTPFile[] files = ftp.listFiles( remoteFile );
@@ -480,8 +478,7 @@
if( action == SEND_FILES )
{
- log( "Could not date test remote file: " + remoteFile
- + "assuming out of date.", Project.MSG_VERBOSE );
+ getLogger().debug( "Could not date test remote file: " + remoteFile + "assuming out of date." );
return false;
}
else
@@ -562,8 +559,7 @@
dir = (File)parents.get( i );
if( !dirCache.contains( dir ) )
{
- log( "creating remote directory " + resolveFile( dir.getPath() ),
- Project.MSG_VERBOSE );
+ getLogger().debug( "creating remote directory " + resolveFile( dir.getPath() ) );
ftp.makeDirectory( resolveFile( dir.getPath() ) );
// Both codes 550 and 553 can be produced by FTP Servers
// to indicate that an attempt to create a directory has
@@ -603,7 +599,7 @@
String s = "could not delete file: " + ftp.getReplyString();
if( skipFailedTransfers == true )
{
- log( s, Project.MSG_WARN );
+ getLogger().warn( s );
skipped++;
}
else
@@ -613,7 +609,7 @@
}
else
{
- log( "File " + filename + " deleted from " + server, Project.MSG_VERBOSE );
+ getLogger().debug( "File " + filename + " deleted from " + server );
transferred++;
}
}
@@ -747,7 +743,7 @@
String s = "could not put file: " + ftp.getReplyString();
if( skipFailedTransfers == true )
{
- log( s, Project.MSG_WARN );
+ getLogger().warn( s );
skipped++;
}
else
@@ -759,9 +755,7 @@
else
{
- log( "File " + file.getAbsolutePath() +
- " copied to " + server,
- Project.MSG_VERBOSE );
+ getLogger().debug( "File " + file.getAbsolutePath() + " copied to " + server );
transferred++;
}
}
1.9 +4 -6 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java
Index: MimeMail.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- MimeMail.java 2001/12/23 06:31:59 1.8
+++ MimeMail.java 2001/12/23 14:22:47 1.9
@@ -25,7 +25,6 @@
import javax.mail.internet.MimeMultipart;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.FileSet;
@@ -259,7 +258,7 @@
MimeMessage msg = new MimeMessage( sesh );
//set the sender
- log( "message sender: " + from, Project.MSG_VERBOSE );
+ getLogger().debug( "message sender: " + from );
msg.setFrom( new InternetAddress( from ) );
// add recipient lists
@@ -269,7 +268,7 @@
if( subject != null )
{
- log( "subject: " + subject, Project.MSG_VERBOSE );
+ getLogger().debug( "subject: " + subject );
msg.setSubject( subject );
}
@@ -322,8 +321,7 @@
throw new TaskException( "File \"" + file.getAbsolutePath()
+ "\" does not exist or is not readable." );
}
- log( "Attaching " + file.toString() + " - " + file.length() + " bytes",
- Project.MSG_VERBOSE );
+ getLogger().debug( "Attaching " + file.toString() + " - " + file.length() + " bytes" );
FileDataSource fileData = new FileDataSource( file );
DataHandler fileDataHandler = new DataHandler( fileData );
body.setDataHandler( fileDataHandler );
@@ -361,7 +359,7 @@
else
{
String text = e.toString();
- log( text, Project.MSG_ERR );
+ getLogger().error( text );
}
}
}
1.7 +3 -4 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java
Index: TelnetTask.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TelnetTask.java 2001/12/23 06:31:59 1.6
+++ TelnetTask.java 2001/12/23 14:22:47 1.7
@@ -15,14 +15,13 @@
import java.util.Calendar;
import java.util.Iterator;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
/**
* Class to provide automated telnet protocol support for the Ant build tool
*
* @author <a href="mailto:ScottCarlson@email.com">ScottCarlson@email.com</a>
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*/
public class TelnetTask extends Task
@@ -245,7 +244,7 @@
{
os.write( ( s + "\n" ).getBytes() );
if( echoString )
- log( s, Project.MSG_INFO );
+ getLogger().info( s );
os.flush();
}
catch( Exception e )
@@ -304,7 +303,7 @@
sb.append( (char)is.read() );
}
}
- log( sb.toString(), Project.MSG_INFO );
+ getLogger().info( sb.toString() );
}
catch( TaskException be )
{
1.6 +2 -3 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java
Index: P4Add.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- P4Add.java 2001/12/23 06:31:59 1.5
+++ P4Add.java 2001/12/23 14:22:47 1.6
@@ -11,7 +11,6 @@
import java.util.ArrayList;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.FileSet;
/**
@@ -147,7 +146,7 @@
}
else
{
- log( "No files specified to add!", Project.MSG_WARN );
+ getLogger().warn( "No files specified to add!" );
}
}
@@ -155,7 +154,7 @@
private void execP4Add( StringBuffer list )
{
- log( "Execing add " + P4CmdOpts + " " + addCmd + list, Project.MSG_INFO );
+ getLogger().info( "Execing add " + P4CmdOpts + " " + addCmd + list );
execP4Command( "-s add " + P4CmdOpts + " " + addCmd + list, new SimpleP4OutputHandler( this ) );
}
1.11 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java
Index: P4Base.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- P4Base.java 2001/12/23 06:31:59 1.10
+++ P4Base.java 2001/12/23 14:22:47 1.11
@@ -10,7 +10,6 @@
import java.io.IOException;
import org.apache.myrmidon.api.TaskException;
import org.apache.oro.text.perl.Perl5Util;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.exec.Execute;
import org.apache.tools.ant.types.Commandline;
@@ -160,7 +159,7 @@
cmdl += cmdline[ i ] + " ";
}
- log( "Execing " + cmdl, Project.MSG_VERBOSE );
+ getLogger().debug( "Execing " + cmdl );
if( handler == null )
handler = new SimpleP4OutputHandler( this );
1.6 +2 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java
Index: P4Change.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- P4Change.java 2001/12/23 06:31:59 1.5
+++ P4Change.java 2001/12/23 14:22:47 1.6
@@ -48,7 +48,7 @@
if( util.match( "/error/", line ) )
{
- log( "Client Error", Project.MSG_VERBOSE );
+ getLogger().debug( "Client Error" );
throw new TaskException( "Perforce Error, check client settings and/or server" );
}
else if( util.match( "/<enter description here>/", line ) )
@@ -95,7 +95,7 @@
line = util.substitute( "s/[^0-9]//g", line );
int changenumber = Integer.parseInt( line );
- log( "Change Number is " + changenumber, Project.MSG_INFO );
+ getLogger().info( "Change Number is " + changenumber );
setProperty( "p4.change", "" + changenumber );
}
1.6 +1 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java
Index: P4Counter.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- P4Counter.java 2001/12/23 06:31:59 1.5
+++ P4Counter.java 2001/12/23 14:22:47 1.6
@@ -83,7 +83,7 @@
{
public void process( String line )
{
- log( "P4Counter retrieved line \"" + line + "\"", Project.MSG_VERBOSE );
+ getLogger().debug( "P4Counter retrieved line \"" + line + "\"" );
try
{
value = Integer.parseInt( line );
1.4 +13 -14 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Label.java
Index: P4Label.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Label.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- P4Label.java 2001/12/23 06:31:59 1.3
+++ P4Label.java 2001/12/23 14:22:47 1.4
@@ -10,7 +10,6 @@
import java.text.SimpleDateFormat;
import java.util.Date;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
/**
* P4Label - create a Perforce Label. P4Label inserts a label into perforce
@@ -46,23 +45,23 @@
public void execute()
throws TaskException
{
- log( "P4Label exec:", Project.MSG_INFO );
+ getLogger().info( "P4Label exec:" );
if( P4View == null || P4View.length() < 1 )
{
- log( "View not set, assuming //depot/...", Project.MSG_WARN );
+ getLogger().warn( "View not set, assuming //depot/..." );
P4View = "//depot/...";
}
if( desc == null || desc.length() < 1 )
{
- log( "Label Description not set, assuming 'AntLabel'", Project.MSG_WARN );
+ getLogger().warn( "Label Description not set, assuming 'AntLabel'" );
desc = "AntLabel";
}
if( lock != null && !lock.equalsIgnoreCase( "locked" ) )
{
- log( "lock attribute invalid - ignoring", Project.MSG_WARN );
+ getLogger().warn( "lock attribute invalid - ignoring" );
}
if( name == null || name.length() < 1 )
@@ -70,7 +69,7 @@
SimpleDateFormat formatter = new SimpleDateFormat( "yyyy.MM.dd-hh:mm" );
Date now = new Date();
name = "AntLabel-" + formatter.format( now );
- log( "name not set, assuming '" + name + "'", Project.MSG_WARN );
+ getLogger().warn( "name not set, assuming '" + name + "'" );
}
//We have to create a unlocked label first
@@ -85,7 +84,7 @@
{
public void process( String line )
{
- log( line, Project.MSG_VERBOSE );
+ getLogger().debug( line );
}
};
@@ -98,17 +97,17 @@
{
public void process( String line )
{
- log( line, Project.MSG_VERBOSE );
+ getLogger().debug( line );
}
} );
- log( "Created Label " + name + " (" + desc + ")", Project.MSG_INFO );
+ getLogger().info( "Created Label " + name + " (" + desc + ")" );
//Now lock if required
if( lock != null && lock.equalsIgnoreCase( "locked" ) )
{
- log( "Modifying lock status to 'locked'", Project.MSG_INFO );
+ getLogger().info( "Modifying lock status to 'locked'" );
final StringBuffer labelSpec = new StringBuffer();
@@ -121,7 +120,7 @@
{
public void process( String line )
{
- log( line, Project.MSG_VERBOSE );
+ getLogger().debug( line );
if( util.match( "/^Options:/", line ) )
{
@@ -133,15 +132,15 @@
};
execP4Command( "label -o " + name, handler );
- log( labelSpec.toString(), Project.MSG_DEBUG );
+ getLogger().debug( labelSpec.toString() );
- log( "Now locking label...", Project.MSG_VERBOSE );
+ getLogger().debug( "Now locking label..." );
handler =
new P4HandlerAdapter()
{
public void process( String line )
{
- log( line, Project.MSG_VERBOSE );
+ getLogger().debug( line );
}
};
1.4 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java
Index: P4Submit.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- P4Submit.java 2001/12/23 06:31:59 1.3
+++ P4Submit.java 2001/12/23 14:22:47 1.4
@@ -8,7 +8,6 @@
package org.apache.tools.ant.taskdefs.optional.perforce;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
/**
* P4Submit - submit a numbered changelist to Perforce. <B>Note:</B> P4Submit
@@ -40,7 +39,7 @@
{
public void process( String line )
{
- log( line, Project.MSG_VERBOSE );
+ getLogger().debug( line );
}
}
);
1.4 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Sync.java
Index: P4Sync.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Sync.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- P4Sync.java 2001/12/23 06:31:59 1.3
+++ P4Sync.java 2001/12/23 14:22:47 1.4
@@ -8,7 +8,6 @@
package org.apache.tools.ant.taskdefs.optional.perforce;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
/**
* P4Sync - synchronise client space to a perforce depot view. The API allows
@@ -121,7 +120,7 @@
syncCmd = syncCmd + "@" + label;
}
- log( "Execing sync " + P4CmdOpts + " " + syncCmd, Project.MSG_VERBOSE );
+ getLogger().debug( "Execing sync " + P4CmdOpts + " " + syncCmd );
execP4Command( "-s sync " + P4CmdOpts + " " + syncCmd, new SimpleP4OutputHandler( this ) );
}
1.5 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/SimpleP4OutputHandler.java
Index: SimpleP4OutputHandler.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/SimpleP4OutputHandler.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SimpleP4OutputHandler.java 2001/12/23 06:31:59 1.4
+++ SimpleP4OutputHandler.java 2001/12/23 14:22:47 1.5
@@ -8,7 +8,6 @@
package org.apache.tools.ant.taskdefs.optional.perforce;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
public class SimpleP4OutputHandler
extends P4HandlerAdapter
@@ -41,7 +40,7 @@
throw new TaskException( line );
}
- parent.log( parent.util.substitute( "s/^.*: //", line ), Project.MSG_INFO );
+ parent.getLogger().info( parent.util.substitute( "s/^.*: //", line ) );
}
}
1.11 +12 -12 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java
Index: Pvcs.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Pvcs.java 2001/12/23 06:31:59 1.10
+++ Pvcs.java 2001/12/23 14:22:47 1.11
@@ -364,7 +364,7 @@
Random rand = new Random( System.currentTimeMillis() );
tmp = new File( "pvcs_ant_" + rand.nextLong() + ".log" );
tmp2 = new File( "pvcs_ant_" + rand.nextLong() + ".log" );
- log( "Executing " + commandLine.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( "Executing " + commandLine.toString() );
result = runCmd( commandLine, new FileOutputStream( tmp ), new LogOutputStream( this, Project.MSG_WARN ) );
if( result != 0 && !ignorerc )
{
@@ -376,7 +376,7 @@
throw new TaskException( "Communication between ant and pvcs failed. No output generated from executing PVCS commandline interface \"pcli\" and \"get\"" );
// Create folders in workspace
- log( "Creating folders", Project.MSG_INFO );
+ getLogger().info( "Creating folders" );
createFolders( tmp );
// Massage PCLI lvf output transforming '\' to '/' so get command works appropriately
@@ -405,8 +405,8 @@
}
commandLine.createArgument().setValue( "@" + tmp2.getAbsolutePath() );
- log( "Getting files", Project.MSG_INFO );
- log( "Executing " + commandLine.toString(), Project.MSG_VERBOSE );
+ getLogger().info( "Getting files" );
+ getLogger().debug( "Executing " + commandLine.toString() );
final LogOutputStream output = new LogOutputStream( this, Project.MSG_INFO );
final LogOutputStream error = new LogOutputStream( this, Project.MSG_WARN );
result = runCmd( commandLine, output, error );
@@ -491,7 +491,7 @@
String line = in.readLine();
while( line != null )
{
- log( "Considering \"" + line + "\"", Project.MSG_VERBOSE );
+ getLogger().debug( "Considering \"" + line + "\"" );
if( line.startsWith( "\"\\" ) ||
line.startsWith( "\"/" ) ||
line.startsWith( getLineStart() ) )
@@ -505,30 +505,30 @@
File dir = new File( f.substring( 0, index ) );
if( !dir.exists() )
{
- log( "Creating " + dir.getAbsolutePath(), Project.MSG_VERBOSE );
+ getLogger().debug( "Creating " + dir.getAbsolutePath() );
if( dir.mkdirs() )
{
- log( "Created " + dir.getAbsolutePath(), Project.MSG_INFO );
+ getLogger().info( "Created " + dir.getAbsolutePath() );
}
else
{
- log( "Failed to create " + dir.getAbsolutePath(), Project.MSG_INFO );
+ getLogger().info( "Failed to create " + dir.getAbsolutePath() );
}
}
else
{
- log( dir.getAbsolutePath() + " exists. Skipping", Project.MSG_VERBOSE );
+ getLogger().debug( dir.getAbsolutePath() + " exists. Skipping" );
}
}
else
{
- log( "File separator problem with " + line,
- Project.MSG_WARN );
+ final String message = "File separator problem with " + line;
+ getLogger().warn( message );
}
}
else
{
- log( "Skipped \"" + line + "\"", Project.MSG_VERBOSE );
+ getLogger().debug( "Skipped \"" + line + "\"" );
}
line = in.readLine();
}
1.9 +1 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java
Index: CovMerge.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- CovMerge.java 2001/12/23 06:32:00 1.8
+++ CovMerge.java 2001/12/23 14:22:47 1.9
@@ -118,7 +118,7 @@
final Execute exe = new Execute();
exe.setOutput( new LogOutputStream( this, Project.MSG_INFO ) );
exe.setError( new LogOutputStream( this, Project.MSG_WARN ) );
- log( cmdl.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( cmdl.toString() );
exe.setCommandline( cmdl.getCommandline() );
// JProbe process always return 0 so we will not be
1.11 +5 -5 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java
Index: CovReport.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- CovReport.java 2001/12/23 06:32:00 1.10
+++ CovReport.java 2001/12/23 14:22:47 1.11
@@ -245,15 +245,15 @@
final Execute exe = new Execute();
exe.setOutput( new LogOutputStream( this, Project.MSG_INFO ) );
exe.setError( new LogOutputStream( this, Project.MSG_WARN ) );
- log( cmdl.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( cmdl.toString() );
exe.setCommandline( cmdl.getCommandline() );
int exitValue = exe.execute();
if( exitValue != 0 )
{
throw new TaskException( "JProbe Coverage Report failed (" + exitValue + ")" );
}
- log( "coveragePath: " + coveragePath, Project.MSG_VERBOSE );
- log( "format: " + format, Project.MSG_VERBOSE );
+ getLogger().debug( "coveragePath: " + coveragePath );
+ getLogger().debug( "format: " + format );
if( reference != null && "xml".equals( format ) )
{
reference.createEnhancedXMLReport();
@@ -397,13 +397,13 @@
if( filters == null || filters.size() == 0 )
{
createFilters();
- log( "Adding default include filter to *.*()", Project.MSG_VERBOSE );
+ getLogger().debug( "Adding default include filter to *.*()" );
ReportFilters.Include include = new ReportFilters.Include();
filters.addInclude( include );
}
try
{
- log( "Creating enhanced XML report", Project.MSG_VERBOSE );
+ getLogger().debug( "Creating enhanced XML report" );
XMLReport report = new XMLReport( CovReport.this, tofile );
report.setReportFilters( filters );
report.setJProbehome( new File( home.getParent() ) );
1.11 +3 -3 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Coverage.java
Index: Coverage.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Coverage.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Coverage.java 2001/12/23 06:32:00 1.10
+++ Coverage.java 2001/12/23 14:22:47 1.11
@@ -296,7 +296,7 @@
// use the custom handler for stdin issues
LogStreamHandler handler = new CoverageStreamHandler( this );
Execute exec = new Execute( handler );
- log( cmdl.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( cmdl.toString() );
exec.setCommandline( cmdl.getCommandline() );
int exitValue = exec.execute();
if( exitValue != 0 )
@@ -459,7 +459,7 @@
{
//@todo change this when switching to JDK 1.2 and use File.createTmpFile()
File file = createTmpFile();
- log( "Creating parameter file: " + file, Project.MSG_VERBOSE );
+ getLogger().debug( "Creating parameter file: " + file );
// options need to be one per line in the parameter file
// so write them all in a single string
@@ -471,7 +471,7 @@
pw.println( params[ i ] );
}
pw.flush();
- log( "JProbe Coverage parameters:\n" + sw.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( "JProbe Coverage parameters:\n" + sw.toString() );
// now write them to the file
FileWriter fw = null;
1.6 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/XMLReport.java
Index: XMLReport.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/XMLReport.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- XMLReport.java 2001/12/23 06:32:00 1.5
+++ XMLReport.java 2001/12/23 14:22:47 1.6
@@ -15,7 +15,6 @@
import java.util.NoSuchElementException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.optional.sitraka.bytecode.ClassFile;
import org.apache.tools.ant.taskdefs.optional.sitraka.bytecode.ClassPathLoader;
@@ -195,7 +194,7 @@
}
else
{
- task.log( message, Project.MSG_DEBUG );
+ task.getLogger().debug( message );
}
}
1.7 +4 -4 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sound/AntSoundPlayer.java
Index: AntSoundPlayer.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sound/AntSoundPlayer.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- AntSoundPlayer.java 2001/12/23 06:32:00 1.6
+++ AntSoundPlayer.java 2001/12/23 14:22:48 1.7
@@ -31,7 +31,7 @@
* Both seem to work fine.
*
* @author Nick Pellow
- * @version $Revision: 1.6 $, $Date: 2001/12/23 06:32:00 $
+ * @version $Revision: 1.7 $, $Date: 2001/12/23 14:22:48 $
*/
public class AntSoundPlayer
implements LineListener, BuildListener
@@ -203,7 +203,7 @@
}
catch( UnsupportedAudioFileException uafe )
{
- project.log( "Audio format is not yet supported: " + uafe.getMessage(), Project.MSG_INFO );
+ project.getLogger().info( "Audio format is not yet supported: " + uafe.getMessage() );
}
catch( IOException ioe )
{
@@ -223,7 +223,7 @@
}
catch( LineUnavailableException e )
{
- project.log( "The sound device is currently unavailable", Project.MSG_INFO );
+ project.getLogger().info( "The sound device is currently unavailable" );
return;
}
catch( IOException e )
@@ -244,7 +244,7 @@
}
else
{
- project.log( "Can't get data from file " + file.getName(), Project.MSG_INFO );
+ project.getLogger().info( "Can't get data from file " + file.getName() );
}
}
1.8 +4 -5 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sound/SoundTask.java
Index: SoundTask.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sound/SoundTask.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- SoundTask.java 2001/12/23 06:32:00 1.7
+++ SoundTask.java 2001/12/23 14:22:48 1.8
@@ -11,7 +11,6 @@
import java.util.ArrayList;
import java.util.Random;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
/**
@@ -25,7 +24,7 @@
* in xml and have Ant play them back
*
* @author Nick Pellow
- * @version $Revision: 1.7 $, $Date: 2001/12/23 06:32:00 $
+ * @version $Revision: 1.8 $, $Date: 2001/12/23 14:22:48 $
*/
public class SoundTask extends Task
@@ -57,7 +56,7 @@
if( success == null )
{
- log( "No nested success element found.", Project.MSG_WARN );
+ getLogger().warn( "No nested success element found." );
}
else
{
@@ -67,7 +66,7 @@
if( fail == null )
{
- log( "No nested failure element found.", Project.MSG_WARN );
+ getLogger().warn( "No nested failure element found." );
}
else
{
@@ -177,7 +176,7 @@
}
else
{
- log( source + ": invalid path.", Project.MSG_WARN );
+ getLogger().warn( source + ": invalid path." );
this.source = nofile;
}
return this.source;
1.7 +20 -18 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
Index: DefaultRmicAdapter.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DefaultRmicAdapter.java 2001/12/23 06:34:24 1.6
+++ DefaultRmicAdapter.java 2001/12/23 14:22:48 1.7
@@ -10,6 +10,7 @@
import java.io.File;
import java.util.ArrayList;
import java.util.Random;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Rmic;
@@ -28,7 +29,9 @@
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
* @author Takashi Okamoto <to...@rd.nttdata.co.jp>
*/
-public abstract class DefaultRmicAdapter implements RmicAdapter
+public abstract class DefaultRmicAdapter
+ extends AbstractLogEnabled
+ implements RmicAdapter
{
private final static Random rand = new Random();
@@ -145,12 +148,11 @@
if( attributes.getIiop() )
{
- attributes.log( "IIOP has been turned on.", Project.MSG_INFO );
+ getLogger().info( "IIOP has been turned on." );
cmd.createArgument().setValue( "-iiop" );
if( attributes.getIiopopts() != null )
{
- attributes.log( "IIOP Options: " + attributes.getIiopopts(),
- Project.MSG_INFO );
+ getLogger().info( "IIOP Options: " + attributes.getIiopopts() );
cmd.createArgument().setValue( attributes.getIiopopts() );
}
}
@@ -158,12 +160,11 @@
if( attributes.getIdl() )
{
cmd.createArgument().setValue( "-idl" );
- attributes.log( "IDL has been turned on.", Project.MSG_INFO );
+ getLogger().info( "IDL has been turned on." );
if( attributes.getIdlopts() != null )
{
cmd.createArgument().setValue( attributes.getIdlopts() );
- attributes.log( "IDL Options: " + attributes.getIdlopts(),
- Project.MSG_INFO );
+ getLogger().info( "IDL Options: " + attributes.getIdlopts() );
}
}
@@ -243,8 +244,7 @@
{
ArrayList compileList = attributes.getCompileList();
- attributes.log( "Compilation args: " + cmd.toString(),
- Project.MSG_VERBOSE );
+ getLogger().debug( "Compilation args: " + cmd.toString() );
StringBuffer niceSourceList = new StringBuffer( "File" );
if( compileList.size() != 1 )
@@ -260,7 +260,7 @@
niceSourceList.append( " " + arg );
}
- attributes.log( niceSourceList.toString(), Project.MSG_VERBOSE );
+ getLogger().debug( niceSourceList.toString() );
}
/**
@@ -407,20 +407,22 @@
}
catch( ClassNotFoundException e )
{
- attributes.log( "Unable to verify class " + classname
- + ". It could not be found.",
- Project.MSG_WARN );
+ final String message = "Unable to verify class " + classname
+ + ". It could not be found.";
+ getLogger().warn( message );
}
catch( NoClassDefFoundError e )
{
- attributes.log( "Unable to verify class " + classname
- + ". It is not defined.", Project.MSG_WARN );
+ final String message = "Unable to verify class " + classname
+ + ". It is not defined.";
+ getLogger().warn( message );
}
catch( Throwable t )
{
- attributes.log( "Unable to verify class " + classname
- + ". Loading caused Exception: "
- + t.getMessage(), Project.MSG_WARN );
+ final String message = "Unable to verify class " + classname
+ + ". Loading caused Exception: "
+ + t.getMessage();
+ getLogger().warn( message );
}
}
return target;
1.5 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
Index: KaffeRmic.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- KaffeRmic.java 2001/12/23 06:34:24 1.4
+++ KaffeRmic.java 2001/12/23 14:22:48 1.5
@@ -10,7 +10,6 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
/**
@@ -24,7 +23,7 @@
public boolean execute()
throws TaskException
{
- getRmic().log( "Using Kaffe rmic", Project.MSG_VERBOSE );
+ getLogger().debug( "Using Kaffe rmic" );
Commandline cmd = setupRmicCommand();
try
1.6 +1 -1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java
Index: SunRmic.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SunRmic.java 2001/12/23 06:34:24 1.5
+++ SunRmic.java 2001/12/23 14:22:48 1.6
@@ -27,7 +27,7 @@
public boolean execute()
throws TaskException
{
- getRmic().log( "Using SUN rmic compiler", Project.MSG_VERBOSE );
+ getLogger().debug( "Using SUN rmic compiler" );
Commandline cmd = setupRmicCommand();
// Create an instance of the rmic, redirecting output to
1.5 +1 -2 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java
Index: WLRmic.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- WLRmic.java 2001/12/23 06:34:24 1.4
+++ WLRmic.java 2001/12/23 14:22:48 1.5
@@ -9,7 +9,6 @@
import java.lang.reflect.Method;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
/**
@@ -43,7 +42,7 @@
public boolean execute()
throws TaskException
{
- getRmic().log( "Using WebLogic rmic", Project.MSG_VERBOSE );
+ getLogger().debug( "Using WebLogic rmic" );
Commandline cmd = setupRmicCommand( new String[]{"-noexit"} );
try
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>