donaldp 01/05/29 03:48:00
Modified: proposal/myrmidon build.xml
proposal/myrmidon/src/java/org/apache/ant/convert
ConverterException.java
proposal/myrmidon/src/java/org/apache/ant/convert/engine
DefaultConverterEngine.java
proposal/myrmidon/src/java/org/apache/ant/modules/basic
AntCall.java Echo.java Pattern.java Property.java
proposal/myrmidon/src/java/org/apache/ant/modules/core
AbstractResourceRegisterer.java
RegisterConverter.java RegisterDataType.java
RegisterTasklet.java RegisterTasklib.java
proposal/myrmidon/src/java/org/apache/ant/modules/test
ConfigurationTest.java ContentTest.java
PrimitiveTypesTest.java SubElementTest.java
proposal/myrmidon/src/java/org/apache/ant/util
Condition.java
proposal/myrmidon/src/java/org/apache/myrmidon/api
DefaultTaskContext.java TaskContext.java
proposal/myrmidon/src/java/org/apache/myrmidon/components/builder
DefaultProjectBuilder.java ProjectBuilder.java
proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer
DefaultTskDeployer.java
proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor
MyrmidonEmbeddor.java
proposal/myrmidon/src/java/org/apache/myrmidon/components/executor
DefaultExecutor.java Executor.java
proposal/myrmidon/src/java/org/apache/myrmidon/components/manager
DefaultProjectManager.java ProjectManager.java
proposal/myrmidon/src/java/org/apache/myrmidon/components/model
DefaultProject.java
proposal/myrmidon/src/java/org/apache/myrmidon/launcher
Main.java
proposal/myrmidon/src/manifest myrmidon-manifest.mf
Added: proposal/myrmidon/src/java/org/apache/myrmidon
AntException.java Constants.java Main.java
Removed: proposal/myrmidon/src/java/org/apache/ant AntException.java
Constants.java Main.java
Log:
Moved Main/Constants/AntException to new package and made AntException not a RuntimeException
Revision Changes Path
1.11 +1 -1 jakarta-ant/proposal/myrmidon/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/build.xml,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- build.xml 2001/05/28 10:27:47 1.10
+++ build.xml 2001/05/29 10:46:53 1.11
@@ -58,7 +58,7 @@
<property name="dist.bin" value="${dist.dir}/bin"/>
<property name="dist.lib" value="${dist.dir}/lib"/>
- <property name="constants.file" value="org/apache/ant/Constants.java"/>
+ <property name="constants.file" value="org/apache/myrmidon/Constants.java"/>
<path id="project.class.path">
<pathelement path="${java.class.path}" />
1.2 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/convert/ConverterException.java
Index: ConverterException.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/convert/ConverterException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ConverterException.java 2000/12/06 06:11:24 1.1
+++ ConverterException.java 2001/05/29 10:46:59 1.2
@@ -7,7 +7,7 @@
*/
package org.apache.ant.convert;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
/**
* ConverterException thrown when a problem occurs during convertion etc.
1.3 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/convert/engine/DefaultConverterEngine.java
Index: DefaultConverterEngine.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/convert/engine/DefaultConverterEngine.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DefaultConverterEngine.java 2001/05/28 06:28:07 1.2
+++ DefaultConverterEngine.java 2001/05/29 10:47:01 1.3
@@ -7,7 +7,7 @@
*/
package org.apache.ant.convert.engine;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.ant.convert.Converter;
import org.apache.ant.convert.ConverterException;
import org.apache.avalon.framework.logger.AbstractLoggable;
1.8 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/basic/AntCall.java
Index: AntCall.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/basic/AntCall.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AntCall.java 2001/05/29 09:11:48 1.7
+++ AntCall.java 2001/05/29 10:47:03 1.8
@@ -8,7 +8,7 @@
package org.apache.ant.modules.basic;
import java.util.ArrayList;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.myrmidon.components.model.Project;
import org.apache.myrmidon.components.manager.ProjectManager;
import org.apache.myrmidon.api.AbstractTask;
1.4 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/basic/Echo.java
Index: Echo.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/basic/Echo.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Echo.java 2001/05/28 07:36:41 1.3
+++ Echo.java 2001/05/29 10:47:04 1.4
@@ -7,7 +7,7 @@
*/
package org.apache.ant.modules.basic;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.myrmidon.api.AbstractTask;
/**
1.2 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/basic/Pattern.java
Index: Pattern.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/basic/Pattern.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Pattern.java 2001/02/07 05:37:15 1.1
+++ Pattern.java 2001/05/29 10:47:04 1.2
@@ -7,7 +7,7 @@
*/
package org.apache.ant.modules.basic;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.ant.tasklet.DataType;
import org.apache.ant.util.Condition;
1.7 +15 -4 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/basic/Property.java
Index: Property.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/basic/Property.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Property.java 2001/05/29 06:00:46 1.6
+++ Property.java 2001/05/29 10:47:05 1.7
@@ -8,7 +8,7 @@
package org.apache.ant.modules.basic;
import java.util.Iterator;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.ant.convert.Converter;
import org.apache.ant.tasklet.DataType;
import org.apache.ant.tasklet.engine.DataTypeEngine;
@@ -61,11 +61,18 @@
final String name = attributes[ i ];
final String value = configuration.getAttribute( name );
- final Object object = getContext().resolveValue( value );
+
+ Object object = null;
+ try { object = getContext().resolveValue( value ); }
+ catch( final AntException ae )
+ {
+ throw new ConfigurationException( "Error resolving value: " + value, ae );
+ }
+
if( null == object )
{
- throw new AntException( "Value for attribute " + name + "resolved to null" );
+ throw new ConfigurationException( "Value for attribute " + name + "resolved to null" );
}
if( name.equals( "name" ) )
@@ -83,7 +90,11 @@
}
else if( name.equals( "value" ) )
{
- setValue( object );
+ try { setValue( object ); }
+ catch( final AntException ae )
+ {
+ throw new ConfigurationException( "Error setting value: " + value, ae );
+ }
}
else if( name.equals( "local-scope" ) )
{
1.7 +2 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/AbstractResourceRegisterer.java
Index: AbstractResourceRegisterer.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/AbstractResourceRegisterer.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- AbstractResourceRegisterer.java 2001/05/29 09:55:54 1.6
+++ AbstractResourceRegisterer.java 2001/05/29 10:47:09 1.7
@@ -10,12 +10,12 @@
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
-import org.apache.ant.AntException;
import org.apache.ant.tasklet.engine.DataTypeEngine;
import org.apache.avalon.framework.camelot.RegistryException;
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.component.Composable;
+import org.apache.myrmidon.AntException;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.components.deployer.TskDeployer;
import org.apache.myrmidon.components.executor.Executor;
@@ -90,6 +90,7 @@
}
protected URL getURL( final String libName )
+ throws AntException
{
if( null != libName )
{
1.7 +2 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterConverter.java
Index: RegisterConverter.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterConverter.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- RegisterConverter.java 2001/05/29 09:55:54 1.6
+++ RegisterConverter.java 2001/05/29 10:47:10 1.7
@@ -10,7 +10,7 @@
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.ant.convert.engine.ConverterEngine;
import org.apache.ant.convert.engine.DefaultConverterInfo;
import org.apache.myrmidon.api.AbstractTask;
@@ -126,6 +126,7 @@
}
protected URL getURL( final String libName )
+ throws AntException
{
if( null != libName )
{
1.4 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterDataType.java
Index: RegisterDataType.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterDataType.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- RegisterDataType.java 2001/05/28 12:57:13 1.3
+++ RegisterDataType.java 2001/05/29 10:47:11 1.4
@@ -8,7 +8,7 @@
package org.apache.ant.modules.core;
import java.net.URL;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.avalon.framework.camelot.DefaultLocator;
import org.apache.avalon.framework.camelot.DeploymentException;
import org.apache.avalon.framework.camelot.RegistryException;
1.5 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterTasklet.java
Index: RegisterTasklet.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterTasklet.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RegisterTasklet.java 2001/05/29 06:00:47 1.4
+++ RegisterTasklet.java 2001/05/29 10:47:11 1.5
@@ -8,7 +8,7 @@
package org.apache.ant.modules.core;
import java.net.URL;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.avalon.framework.camelot.DefaultLocator;
import org.apache.avalon.framework.camelot.DeploymentException;
import org.apache.avalon.framework.camelot.RegistryException;
1.6 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterTasklib.java
Index: RegisterTasklib.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterTasklib.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- RegisterTasklib.java 2001/05/29 09:55:54 1.5
+++ RegisterTasklib.java 2001/05/29 10:47:12 1.6
@@ -10,11 +10,11 @@
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
-import org.apache.ant.AntException;
import org.apache.avalon.framework.camelot.DeploymentException;
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.component.Composable;
+import org.apache.myrmidon.AntException;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.components.deployer.TskDeployer;
1.4 +10 -2 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/test/ConfigurationTest.java
Index: ConfigurationTest.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/test/ConfigurationTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ConfigurationTest.java 2001/05/28 07:36:45 1.3
+++ ConfigurationTest.java 2001/05/29 10:47:16 1.4
@@ -7,7 +7,7 @@
*/
package org.apache.ant.modules.test;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.Configurable;
@@ -28,7 +28,15 @@
throws ConfigurationException
{
String message = configuration.getAttribute( "message" );
- final Object object = getContext().resolveValue( message );
+
+ Object object = null;
+
+ try { object = getContext().resolveValue( message ); }
+ catch( final AntException ae )
+ {
+ throw new ConfigurationException( "Error resolving : " + message, ae );
+ }
+
if( object instanceof String )
{
m_message = (String)object;
1.4 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/test/ContentTest.java
Index: ContentTest.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/test/ContentTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ContentTest.java 2001/05/28 07:36:45 1.3
+++ ContentTest.java 2001/05/29 10:47:17 1.4
@@ -7,7 +7,7 @@
*/
package org.apache.ant.modules.test;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.myrmidon.api.AbstractTask;
/**
1.4 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/test/PrimitiveTypesTest.java
Index: PrimitiveTypesTest.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/test/PrimitiveTypesTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PrimitiveTypesTest.java 2001/05/28 07:36:45 1.3
+++ PrimitiveTypesTest.java 2001/05/29 10:47:18 1.4
@@ -8,7 +8,7 @@
*/
package org.apache.ant.modules.test;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.myrmidon.api.AbstractTask;
/**
1.4 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/test/SubElementTest.java
Index: SubElementTest.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/modules/test/SubElementTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SubElementTest.java 2001/05/28 07:36:46 1.3
+++ SubElementTest.java 2001/05/29 10:47:19 1.4
@@ -7,7 +7,7 @@
*/
package org.apache.ant.modules.test;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.myrmidon.api.AbstractTask;
/**
1.3 +2 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/util/Condition.java
Index: Condition.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/util/Condition.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Condition.java 2001/05/28 06:28:13 1.2
+++ Condition.java 2001/05/29 10:47:23 1.3
@@ -7,7 +7,7 @@
*/
package org.apache.ant.util;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.avalon.framework.component.Component;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.context.ContextException;
@@ -42,6 +42,7 @@
}
public boolean evaluate( final Context context )
+ throws AntException
{
boolean result = false;
1.1 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/AntException.java
Index: AntException.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.myrmidon;
import org.apache.avalon.framework.CascadingException;
/**
* AntException thrown when a problem with tasks etc.
* It is cascading so that further embedded information can be contained.
* ie ANtException was caused by IOException etc.
* It is RuntimeException as it has to pass through a number of Java-defined
* interfaces - ala Runnable and also to aid in ease of indicating an error.
*
* @author <a href="mailto:donaldp@apache.org">Peter Donald</a>
*/
public class AntException
extends CascadingException
{
/**
* Basic constructor with a message
*
* @param message the message
*/
public AntException( final String message )
{
this( message, null );
}
/**
* Constructor that builds cascade so that other exception information can be retained.
*
* @param message the message
* @param throwable the throwable
*/
public AntException( final String message, final Throwable throwable )
{
super( message, throwable );
}
}
1.1 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/Constants.java
Index: Constants.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.myrmidon;
/**
* Abstract interface to hold constants.
*
* @author <a href="mailto:donaldp@apache.org">Peter Donald</a>
*/
interface Constants
{
//Constants to indicate the build of Ant/Myrmidon
String BUILD_DATE = "@@DATE@@";
String BUILD_VERSION = "@@VERSION@@";
}
1.1 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/Main.java
Index: Main.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.myrmidon;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.avalon.excalibur.cli.CLArgsParser;
import org.apache.avalon.excalibur.cli.CLOption;
import org.apache.avalon.excalibur.cli.CLOptionDescriptor;
import org.apache.avalon.excalibur.cli.CLUtil;
import org.apache.avalon.excalibur.io.ExtensionFileFilter;
import org.apache.avalon.framework.ExceptionUtil;
import org.apache.avalon.framework.logger.AbstractLoggable;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.log.Hierarchy;
import org.apache.log.LogTarget;
import org.apache.log.Logger;
import org.apache.log.Priority;
import org.apache.myrmidon.api.DefaultTaskContext;
import org.apache.myrmidon.api.TaskContext;
import org.apache.myrmidon.components.builder.ProjectBuilder;
import org.apache.myrmidon.components.embeddor.Embeddor;
import org.apache.myrmidon.components.embeddor.MyrmidonEmbeddor;
import org.apache.myrmidon.components.manager.LogTargetToListenerAdapter;
import org.apache.myrmidon.components.manager.ProjectManager;
import org.apache.myrmidon.components.model.Project;
import org.apache.myrmidon.launcher.LauncherClassLoader;
import org.apache.myrmidon.listeners.ProjectListener;
/**
* The class to kick the tires and light the fires.
* Starts ant, loads ProjectBuilder, builds project then uses ProjectManager
* to run project.
*
* @author <a href="mailto:donaldp@apache.org">Peter Donald</a>
*/
public class Main
extends AbstractLoggable
{
//Constants to indicate the build of Ant/Myrmidon
public final static String VERSION =
"Ant " + Constants.BUILD_VERSION + " compiled on " + Constants.BUILD_DATE;
//default log level
protected final static String DEFAULT_LOGLEVEL = "WARN";
//Some defaults for file locations/names
protected final static String DEFAULT_FILENAME = "build.ant";
protected final static String DEFAULT_LISTENER =
"org.apache.myrmidon.listeners.DefaultProjectListener";
//defines for the Command Line options
private static final int HELP_OPT = 'h';
private static final int QUIET_OPT = 'q';
private static final int VERBOSE_OPT = 'v';
private static final int FILE_OPT = 'f';
private static final int LOG_LEVEL_OPT = 'l';
private static final int DEFINE_OPT = 'D';
private static final int VERSION_OPT = 1;
private static final int LISTENER_OPT = 2;
private static final int TASKLIB_DIR_OPT = 5;
private static final int INCREMENTAL_OPT = 6;
private static final int HOME_DIR_OPT = 7;
//incompatable options for info options
private static final int[] INFO_OPT_INCOMPAT = new int[]
{
HELP_OPT, QUIET_OPT, VERBOSE_OPT, FILE_OPT,
LOG_LEVEL_OPT, VERSION_OPT, LISTENER_OPT,
DEFINE_OPT //TASKLIB_DIR_OPT, HOME_DIR_OPT
};
//incompatable options for other logging options
private static final int[] LOG_OPT_INCOMPAT = new int[]
{
QUIET_OPT, VERBOSE_OPT, LOG_LEVEL_OPT
};
private ProjectListener m_listener;
private File m_homeDir;
/**
* Main entry point called to run standard Ant.
*
* @param args the args
*/
public static void main( final String[] args )
{
final Main main = new Main();
main.setLogger( Hierarchy.getDefaultHierarchy().getLoggerFor( "default" ) );
try { main.execute( args ); }
catch( final AntException ae )
{
main.getLogger().error( "Error: " + ae.getMessage() );
main.getLogger().debug( "Exception..." + ExceptionUtil.printStackTrace( ae ) );
}
catch( final Throwable throwable )
{
main.getLogger().error( "Error: " + throwable );
main.getLogger().debug( "Exception..." + ExceptionUtil.printStackTrace( throwable ) );
}
}
/**
* Display usage report.
*
*/
protected void usage( final CLOptionDescriptor[] options )
{
System.out.println( "java " + getClass().getName() + " [options]" );
System.out.println( "\tAvailable options:");
System.out.println( CLUtil.describeOptions( options ) );
}
/**
* Initialise the options for command line parser.
*/
private CLOptionDescriptor[] createCLOptions()
{
//TODO: localise
final CLOptionDescriptor[] options = new CLOptionDescriptor[ 11 ];
options[0] =
new CLOptionDescriptor( "help",
CLOptionDescriptor.ARGUMENT_DISALLOWED,
HELP_OPT,
"display this help message",
INFO_OPT_INCOMPAT );
options[1] =
new CLOptionDescriptor( "file",
CLOptionDescriptor.ARGUMENT_REQUIRED,
FILE_OPT,
"the build file." );
options[2] =
new CLOptionDescriptor( "log-level",
CLOptionDescriptor.ARGUMENT_REQUIRED,
LOG_LEVEL_OPT,
"the verbosity level at which to log messages. " +
"(DEBUG|INFO|WARN|ERROR|FATAL_ERROR)",
LOG_OPT_INCOMPAT );
options[3] =
new CLOptionDescriptor( "quiet",
CLOptionDescriptor.ARGUMENT_DISALLOWED,
QUIET_OPT,
"equivelent to --log-level=FATAL_ERROR",
LOG_OPT_INCOMPAT );
options[4] =
new CLOptionDescriptor( "verbose",
CLOptionDescriptor.ARGUMENT_DISALLOWED,
VERBOSE_OPT,
"equivelent to --log-level=INFO",
LOG_OPT_INCOMPAT );
options[5] =
new CLOptionDescriptor( "listener",
CLOptionDescriptor.ARGUMENT_REQUIRED,
LISTENER_OPT,
"the listener for log events." );
options[6] =
new CLOptionDescriptor( "version",
CLOptionDescriptor.ARGUMENT_DISALLOWED,
VERSION_OPT,
"display version",
INFO_OPT_INCOMPAT );
options[7] =
new CLOptionDescriptor( "task-lib-dir",
CLOptionDescriptor.ARGUMENT_REQUIRED,
TASKLIB_DIR_OPT,
"the task lib directory to scan for .tsk files." );
options[8] =
new CLOptionDescriptor( "incremental",
CLOptionDescriptor.ARGUMENT_DISALLOWED,
INCREMENTAL_OPT,
"Run in incremental mode" );
options[9] =
new CLOptionDescriptor( "ant-home",
CLOptionDescriptor.ARGUMENT_REQUIRED,
HOME_DIR_OPT,
"Specify ant home directory" );
options[10] =
new CLOptionDescriptor( "define",
CLOptionDescriptor.ARGUMENTS_REQUIRED_2,
DEFINE_OPT,
"Define a variable (ie -Dfoo=var)",
new int[ 0 ] );
return options;
}
protected void execute( final String[] args )
throws Exception
{
final CLOptionDescriptor[] options = createCLOptions();
final CLArgsParser parser = new CLArgsParser( args, options );
if( null != parser.getErrorString() )
{
System.err.println( "Error: " + parser.getErrorString() );
return;
}
final List clOptions = parser.getArguments();
final int size = clOptions.size();
final ArrayList targets = new ArrayList();
String filename = null;
String listenerName = null;
String logLevel = null;
String homeDir = null;
String taskLibDir = null;
boolean incremental = false;
HashMap defines = new HashMap();
for( int i = 0; i < size; i++ )
{
final CLOption option = (CLOption)clOptions.get( i );
switch( option.getId() )
{
case 0: targets.add( option.getArgument() ); break;
case HELP_OPT: usage( options ); return;
case VERSION_OPT: System.out.println( VERSION ); return;
case FILE_OPT: filename = option.getArgument(); break;
case HOME_DIR_OPT: homeDir = option.getArgument(); break;
case TASKLIB_DIR_OPT: taskLibDir = option.getArgument(); break;
case VERBOSE_OPT: logLevel = "INFO"; break;
case QUIET_OPT: logLevel = "ERROR"; break;
case LOG_LEVEL_OPT: logLevel = option.getArgument(); break;
case LISTENER_OPT: listenerName = option.getArgument(); break;
case INCREMENTAL_OPT: incremental = true; break;
case DEFINE_OPT:
defines.put( option.getArgument( 0 ), option.getArgument( 1 ) );
break;
}
}
if( null == logLevel ) logLevel = DEFAULT_LOGLEVEL;
if( null == listenerName ) listenerName = DEFAULT_LISTENER;
if( null == filename ) filename = DEFAULT_FILENAME;
//handle logging...
setLogger( createLogger( logLevel ) );
//if ant home not set then use system property ant.home
//that was set up by launcher.
if( null == homeDir ) homeDir = System.getProperty( "ant.home" );
final Parameters parameters = new Parameters();
parameters.setParameter( "ant.home", homeDir );
if( null != taskLibDir ) parameters.setParameter( "ant.path.task-lib", taskLibDir );
m_homeDir = (new File( homeDir )).getAbsoluteFile();
if( !m_homeDir.isDirectory() )
{
throw new AntException( "ant-home (" + m_homeDir + ") is not a directory" );
}
final File libDir = new File( m_homeDir, "lib" );
final File buildFile = (new File( filename )).getCanonicalFile();
if( !buildFile.isFile() )
{
throw new AntException( "File " + buildFile + " is not a file or doesn't exist" );
}
//setup classloader so that it will correctly load
//the Project/ProjectBuilder/ProjectManager and all dependencies
//FIXEME: Use separate classloader instead of injecting
final ClassLoader classLoader = createClassLoader( libDir );
Thread.currentThread().setContextClassLoader( classLoader );
//handle listener..
final ProjectListener listener = createListener( listenerName );
getLogger().warn( "Ant Build File: " + buildFile );
getLogger().info( "Ant Home Directory: " + m_homeDir );
//getLogger().info( "Ant Bin Directory: " + m_binDir );
//getLogger().debug( "Ant Lib Directory: " + m_libDir );
//getLogger().debug( "Ant Task Lib Directory: " + m_taskLibDir );
final Embeddor embeddor = new MyrmidonEmbeddor();
setupLogger( embeddor );
embeddor.parameterize( parameters );
embeddor.initialize();
embeddor.start();
final ProjectBuilder builder = embeddor.getProjectBuilder();
//create the project
final Project project = builder.build( buildFile );
final ProjectManager manager = embeddor.getProjectManager();
manager.addProjectListener( listener );
BufferedReader reader = null;
//loop over build if we are in incremental mode..
while( true )
{
//actually do the build ...
final TaskContext context = new DefaultTaskContext();
setupContext( context, defines );
context.setProperty( TaskContext.BASE_DIRECTORY, project.getBaseDirectory() );
context.setProperty( Project.PROJECT_FILE, buildFile );
//context.setProperty( Project.PROJECT, projectName );
doBuild( manager, project, context, targets );
if( !incremental ) break;
System.out.println( "Continue ? (Enter no to stop)" );
if( null == reader )
{
reader = new BufferedReader( new InputStreamReader( System.in ) );
}
String line = reader.readLine();
if( line.equalsIgnoreCase( "no" ) ) break;
}
embeddor.stop();
embeddor.dispose();
}
/**
* Actually do the build.
*
* @param manager the manager
* @param project the project
* @param targets the targets to build as passed by CLI
*/
protected void doBuild( final ProjectManager manager,
final Project project,
final TaskContext context,
final ArrayList targets )
{
try
{
final int targetCount = targets.size();
//if we didn't specify a target on CLI then choose default
if( 0 == targetCount )
{
manager.executeTarget( project, project.getDefaultTargetName(), context );
}
else
{
for( int i = 0; i < targetCount; i++ )
{
manager.executeTarget( project, (String)targets.get( i ), context );
}
}
}
catch( final AntException ae )
{
getLogger().error( "BUILD FAILED" );
getLogger().error( "Reason:\n" + ExceptionUtil.printStackTrace( ae, 5, true ) );
}
}
/**
* Create Logger of appropriate log-level.
*
* @param logLevel the log-level
* @return the logger
* @exception AntException if an error occurs
*/
protected Logger createLogger( final String logLevel )
throws AntException
{
final String logLevelCapitalized = logLevel.toUpperCase();
final Priority priority = Priority.getPriorityForName( logLevelCapitalized );
if( !priority.getName().equals( logLevelCapitalized ) )
{
throw new AntException( "Unknown log level - " + logLevel );
}
final Logger logger =
Hierarchy.getDefaultHierarchy().getLoggerFor( "ant" );
logger.setPriority( priority );
return logger;
}
/**
* Setup project listener.
*
* @param listenerName the name of project listener
*/
protected ProjectListener createListener( final String listenerName )
throws AntException
{
ProjectListener result = null;
try { result = (ProjectListener)Class.forName( listenerName ).newInstance(); }
catch( final Throwable t )
{
throw new AntException( "Error creating the listener " + listenerName +
" due to " + ExceptionUtil.printStackTrace( t, 5, true ),
t );
}
final LogTarget target = new LogTargetToListenerAdapter( result );
getLogger().setLogTargets( new LogTarget[] { target } );
return result;
}
/**
* Try to load all extra zipz/jars from lib directory into CURRENT classloader.
*
* @param libDir the directory of lib files to add
*/
protected ClassLoader createClassLoader( final File libDir )
{
final ClassLoader candidate = getClass().getClassLoader();
if( !(candidate instanceof LauncherClassLoader) )
{
getLogger().warn( "Warning: Unable to add entries from " +
"lib-path to classloader" );
return candidate;
}
final LauncherClassLoader classLoader = (LauncherClassLoader)candidate;
final ExtensionFileFilter filter =
new ExtensionFileFilter( new String[] { ".jar", ".zip" } );
final File[] files = libDir.listFiles( filter );
for( int i = 0; i < files.length; i++ )
{
//except for a few *special* files add all the
//.zip/.jars to classloader
final String name = files[ i ].getName();
if( !name.equals( "ant.jar" ) &&
!name.equals( "myrmidon.jar" ) &&
!name.equals( "avalonapi.jar" ) )
{
try { classLoader.addURL( files[ i ].toURL() ); }
catch( final MalformedURLException mue ) {}
}
}
return classLoader;
}
/**
* Setup the projects context so all the "default" properties are defined.
* This also takes a hashmap that is added to context. Usually these are the
* ones defined on command line.
*
* @param project the project
* @param defines the defines
* @exception AntException if an error occurs
*/
protected void setupContext( final TaskContext context, final HashMap defines )
throws AntException
{
//put these values into defines so that they overide
//user-defined proeprties
//defines.put( AntContextResources.HOME_DIR, m_homeDir );
//defines.put( AntContextResources.BIN_DIR, m_binDir );
//defines.put( AntContextResources.LIB_DIR, m_libDir );
//defines.put( AntContextResources.TASKLIB_DIR, m_taskLibDir );
//defines.put( TaskletContext.JAVA_VERSION, getJavaVersion() );
addToContext( context, defines );
//Add system properties second so that they overide user-defined properties
addToContext( context, System.getProperties() );
}
/**
* Helper method to add values to a context
*
* @param context the context
* @param map the map of names->values
*/
protected void addToContext( final TaskContext context, final Map map )
throws AntException
{
final Iterator keys = map.keySet().iterator();
while( keys.hasNext() )
{
final String key = (String)keys.next();
final Object value = map.get( key );
context.setProperty( key, value );
}
}
}
1.2 +9 -5 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/api/DefaultTaskContext.java
Index: DefaultTaskContext.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/api/DefaultTaskContext.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultTaskContext.java 2001/05/28 07:36:54 1.1
+++ DefaultTaskContext.java 2001/05/29 10:47:27 1.2
@@ -8,7 +8,7 @@
package org.apache.myrmidon.api;
import java.io.File;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.avalon.excalibur.io.FileUtil;
import org.apache.avalon.excalibur.property.PropertyException;
import org.apache.avalon.excalibur.property.PropertyUtil;
@@ -116,6 +116,7 @@
* @return the resolved property
*/
public Object resolveValue( final String property )
+ throws AntException
{
try { return PropertyUtil.resolveProperty( property, this, false ); }
catch( final PropertyException pe )
@@ -147,6 +148,7 @@
* @param value the value of property
*/
public void setProperty( final String name, final Object value )
+ throws AntException
{
setProperty( name, value, CURRENT );
}
@@ -156,7 +158,8 @@
*
* @param property the property
*/
- public void setProperty( final String name, final Object value, final ScopeEnum scope )
+ public void setProperty( final String name, final Object value, final ScopeEnum scope )
+ throws AntException
{
checkPropertyValid( name, value );
@@ -182,7 +185,7 @@
context = (DefaultTaskContext)context.m_parent;
}
- context.put( name, value );
+ context.putValue( name, value );
}
else
{
@@ -199,7 +202,8 @@
* @param key the key
* @param value the value
*/
- public void put( final Object key, final Object value )
+ public void putValue( final Object key, final Object value )
+ throws AntException
{
if( key.equals( BASE_DIRECTORY ) )
{
@@ -211,7 +215,7 @@
}
}
- super.put( key, value );
+ put( key, value );
}
/**
1.2 +9 -4 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/api/TaskContext.java
Index: TaskContext.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/api/TaskContext.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TaskContext.java 2001/05/28 07:36:54 1.1
+++ TaskContext.java 2001/05/29 10:47:28 1.2
@@ -10,6 +10,7 @@
import java.io.File;
import org.apache.avalon.framework.Enum;
import org.apache.avalon.framework.context.Context;
+import org.apache.myrmidon.AntException;
/**
* This interface represents the <em>Context</em> in which Task is executed.
@@ -65,7 +66,8 @@
* @param filename the filename to resolve
* @return the resolved file
*/
- File resolveFile( String filename );
+ File resolveFile( String filename )
+ throws AntException;
/**
* Resolve property.
@@ -74,7 +76,8 @@
* @param property the property to resolve
* @return the resolved property
*/
- Object resolveValue( String property );
+ Object resolveValue( String property )
+ throws AntException;
/**
* Retrieve property for name.
@@ -90,7 +93,8 @@
* @param name the name of property
* @param value the value of property
*/
- void setProperty( String name, Object value );
+ void setProperty( String name, Object value )
+ throws AntException;
/**
* Set property value.
@@ -99,7 +103,8 @@
* @param value the value of property
* @param scope the scope at which to set property
*/
- void setProperty( String name, Object value, ScopeEnum scope );
+ void setProperty( String name, Object value, ScopeEnum scope )
+ throws AntException;
/**
* Safe wrapper class for Scope enums.
1.3 +2 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/DefaultProjectBuilder.java
Index: DefaultProjectBuilder.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/DefaultProjectBuilder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DefaultProjectBuilder.java 2001/05/29 07:39:28 1.2
+++ DefaultProjectBuilder.java 2001/05/29 10:47:31 1.3
@@ -9,7 +9,6 @@
import java.io.File;
import java.io.IOException;
-import org.apache.ant.AntException;
import org.apache.ant.util.Condition;
import org.apache.avalon.framework.ExceptionUtil;
import org.apache.avalon.framework.configuration.Configuration;
@@ -17,6 +16,7 @@
import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
import org.apache.avalon.framework.logger.AbstractLoggable;
import org.apache.log.Logger;
+import org.apache.myrmidon.AntException;
import org.apache.myrmidon.api.TaskContext;
import org.apache.myrmidon.components.model.DefaultProject;
import org.apache.myrmidon.components.model.DefaultTarget;
@@ -164,6 +164,7 @@
* @param task the Configuration
*/
protected void buildTarget( final DefaultProject project, final Configuration target )
+ throws AntException
{
final String name = target.getAttribute( "name", null );
final String depends = target.getAttribute( "depends", null );
1.3 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/ProjectBuilder.java
Index: ProjectBuilder.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/ProjectBuilder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ProjectBuilder.java 2001/05/29 07:39:28 1.2
+++ ProjectBuilder.java 2001/05/29 10:47:32 1.3
@@ -9,7 +9,7 @@
import java.io.File;
import java.io.IOException;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.avalon.framework.component.Component;
import org.apache.myrmidon.components.model.Project;
1.2 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/DefaultTskDeployer.java
Index: DefaultTskDeployer.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/DefaultTskDeployer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultTskDeployer.java 2001/05/29 09:56:00 1.1
+++ DefaultTskDeployer.java 2001/05/29 10:47:35 1.2
@@ -15,10 +15,10 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;
import java.util.zip.ZipFile;
-import org.apache.ant.tasklet.engine.DataTypeEngine;
import org.apache.ant.convert.engine.ConverterEngine;
import org.apache.ant.convert.engine.ConverterRegistry;
import org.apache.ant.convert.engine.DefaultConverterInfo;
+import org.apache.ant.tasklet.engine.DataTypeEngine;
import org.apache.avalon.framework.camelot.AbstractDeployer;
import org.apache.avalon.framework.camelot.DefaultLocator;
import org.apache.avalon.framework.camelot.DefaultRegistry;
1.7 +2 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/MyrmidonEmbeddor.java
Index: MyrmidonEmbeddor.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/MyrmidonEmbeddor.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- MyrmidonEmbeddor.java 2001/05/29 09:56:01 1.6
+++ MyrmidonEmbeddor.java 2001/05/29 10:47:37 1.7
@@ -8,7 +8,7 @@
package org.apache.myrmidon.components.embeddor;
import java.io.File;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.ant.convert.engine.ConverterEngine;
import org.apache.ant.tasklet.engine.DataTypeEngine;
import org.apache.avalon.excalibur.io.FileUtil;
@@ -290,6 +290,7 @@
* Setup all the files attributes.
*/
private void setupFiles()
+ throws AntException
{
String filepath = null;
1.2 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java
Index: DefaultExecutor.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultExecutor.java 2001/05/29 06:00:50 1.1
+++ DefaultExecutor.java 2001/05/29 10:47:41 1.2
@@ -8,7 +8,7 @@
package org.apache.myrmidon.components.executor;
import java.util.HashMap;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.ant.convert.engine.ConverterEngine;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.activity.Initializable;
1.2 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/Executor.java
Index: Executor.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/Executor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Executor.java 2001/05/29 06:00:50 1.1
+++ Executor.java 2001/05/29 10:47:43 1.2
@@ -7,7 +7,7 @@
*/
package org.apache.myrmidon.components.executor;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.avalon.framework.camelot.Registry;
import org.apache.avalon.framework.component.Component;
import org.apache.avalon.framework.configuration.Configuration;
1.2 +2 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/manager/DefaultProjectManager.java
Index: DefaultProjectManager.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/manager/DefaultProjectManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultProjectManager.java 2001/05/29 09:13:35 1.1
+++ DefaultProjectManager.java 2001/05/29 10:47:47 1.2
@@ -9,7 +9,7 @@
import java.util.ArrayList;
import java.util.Iterator;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.ant.util.Condition;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.activity.Initializable;
@@ -192,6 +192,7 @@
private void executeTargetWork( final String name,
final Target target,
final TaskContext context )
+ throws AntException
{
//check the condition associated with target.
//if it is not satisfied then skip target
1.2 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/manager/ProjectManager.java
Index: ProjectManager.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/manager/ProjectManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ProjectManager.java 2001/05/29 09:13:36 1.1
+++ ProjectManager.java 2001/05/29 10:47:48 1.2
@@ -7,7 +7,7 @@
*/
package org.apache.myrmidon.components.manager;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
import org.apache.avalon.framework.component.Component;
import org.apache.myrmidon.api.TaskContext;
import org.apache.myrmidon.components.model.Project;
1.2 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/DefaultProject.java
Index: DefaultProject.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/DefaultProject.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultProject.java 2001/05/29 07:39:29 1.1
+++ DefaultProject.java 2001/05/29 10:47:52 1.2
@@ -10,7 +10,7 @@
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
-import org.apache.ant.AntException;
+import org.apache.myrmidon.AntException;
/**
* Default project implementation.
1.2 +1 -1 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/launcher/Main.java
Index: Main.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/launcher/Main.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Main.java 2001/05/28 10:27:59 1.1
+++ Main.java 2001/05/29 10:47:55 1.2
@@ -44,7 +44,7 @@
final LauncherClassLoader classLoader = new LauncherClassLoader( urls );
//load class and retrieve appropriate main method.
- final Class clazz = classLoader.loadClass( "org.apache.ant.Main" );
+ final Class clazz = classLoader.loadClass( "org.apache.myrmidon.Main" );
final Method method = clazz.getMethod( "main", new Class[] { args.getClass() } );
//kick the tires and light the fires....
1.2 +1 -1 jakarta-ant/proposal/myrmidon/src/manifest/myrmidon-manifest.mf
Index: myrmidon-manifest.mf
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/manifest/myrmidon-manifest.mf,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- myrmidon-manifest.mf 2000/12/05 09:22:03 1.1
+++ myrmidon-manifest.mf 2001/05/29 10:47:58 1.2
@@ -1,4 +1,4 @@
Manifest-Version: 1.0
-Main-Class: org.apache.ant.Main
+Main-Class: org.apache.myrmidon.Main
Class-Path: avalonapi.jar
Created-By: Apache Ant Project
|