diff --git a/proposal/myrmidon/build.xml b/proposal/myrmidon/build.xml
index 831194e08..c2d72d4d9 100644
--- a/proposal/myrmidon/build.xml
+++ b/proposal/myrmidon/build.xml
@@ -105,18 +105,24 @@ Legal:
-
+ manifest="${manifest.dir}/myrmidon-launcher.mf">
-
-
-
-
+ manifest="${manifest.dir}/myrmidon-api.mf">
+
+
+
+
+
+
+
@@ -125,7 +131,29 @@ Legal:
+
+
+
+
+
+
+
@@ -167,10 +195,14 @@ Legal:
+
+
+
+
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/launcher/Main.java b/proposal/myrmidon/src/java/org/apache/myrmidon/launcher/Main.java
index f7b58ab58..dc6711326 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/launcher/Main.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/launcher/Main.java
@@ -13,6 +13,7 @@ import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.StringTokenizer;
/**
@@ -40,9 +41,13 @@ public final class Main
//setup classloader appropriately for myrmidon jar
final File libDir = new File( installDirectory, "lib" );
- final URL[] urls = buildURLList( libDir );
+ final URL[] libUrls = buildURLList( libDir );
+ final URLClassLoader libClassLoader = new URLClassLoader( libUrls );
- final URLClassLoader classLoader = new URLClassLoader( urls );
+ final File containerLibDir = new File( installDirectory, "bin" + File.separator + "lib" );
+ final URL[] containerLibUrls = buildURLList( containerLibDir );
+ final URLClassLoader classLoader =
+ new URLClassLoader( containerLibUrls, libClassLoader );
//load class and retrieve appropriate main method.
final Class clazz = classLoader.loadClass( "org.apache.myrmidon.frontends.CLIMain" );
@@ -116,7 +121,7 @@ public final class Main
{
final String element = tokenizer.nextToken();
- if( element.endsWith( "ant.jar" ) )
+ if( element.endsWith( "myrmidon-launcher.jar" ) )
{
File file = (new File( element )).getAbsoluteFile();
file = file.getParentFile();
@@ -133,3 +138,58 @@ public final class Main
throw new Exception( "Unable to locate ant.jar in classpath" );
}
}
+
+class MyClassLoader extends URLClassLoader
+{
+ MyClassLoader( final URL[] urls, final ClassLoader classLoader )
+ {
+ super( urls, classLoader );
+ }
+
+ public Class loadClass( final String name )
+ throws ClassNotFoundException
+ {
+ System.out.println( "Loading: " + name );
+ try
+ {
+ return super.loadClass( name );
+ }
+ catch( final ClassNotFoundException cnfe )
+ {
+ System.out.println( "Failed to Load: " + name );
+ throw cnfe;
+ }
+ }
+
+ protected Class findClass( final String name )
+ throws ClassNotFoundException
+ {
+ System.out.println( "findClass: " + name );
+ try
+ {
+ return super.findClass( name );
+ }
+ catch( final ClassNotFoundException cnfe )
+ {
+ System.out.println( "Failed to Load: " + name );
+ throw cnfe;
+ }
+ }
+
+ public Class loadClass( final String name, final boolean resolve )
+ throws ClassNotFoundException
+ {
+ System.out.println( "Loading: " + name );
+ try
+ {
+ return super.loadClass( name, resolve );
+ }
+ catch( final ClassNotFoundException cnfe )
+ {
+ System.out.println( "Failed to Load: " + name );
+ throw cnfe;
+ }
+ }
+}
+
+
diff --git a/proposal/myrmidon/src/make/sample.ant b/proposal/myrmidon/src/make/sample.ant
index c4220feb8..691f62ecd 100644
--- a/proposal/myrmidon/src/make/sample.ant
+++ b/proposal/myrmidon/src/make/sample.ant
@@ -101,11 +101,13 @@ Legal:
+
diff --git a/proposal/myrmidon/src/manifest/builtin-ant-roles.xml b/proposal/myrmidon/src/manifest/builtin-ant-roles.xml
index d16b54731..1703ddd32 100644
--- a/proposal/myrmidon/src/manifest/builtin-ant-roles.xml
+++ b/proposal/myrmidon/src/manifest/builtin-ant-roles.xml
@@ -3,5 +3,5 @@
-
+
\ No newline at end of file
diff --git a/proposal/myrmidon/src/manifest/myrmidon-api.mf b/proposal/myrmidon/src/manifest/myrmidon-api.mf
new file mode 100644
index 000000000..0ab1df982
--- /dev/null
+++ b/proposal/myrmidon/src/manifest/myrmidon-api.mf
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Created-By: Apache Ant Project
+Extension-Name: myrmidon.api
+Specification-Title: Myrmidon API
+Specification-Version: 0.01
+Specification-Vendor: Jakarta Apache
+Implementation-Vendor-Id: org.apache.jakarta
+Implementation-Vendor: Jakarta Apache Project
+Implementation-Version: 0.01
\ No newline at end of file
diff --git a/proposal/myrmidon/src/manifest/myrmidon-container.mf b/proposal/myrmidon/src/manifest/myrmidon-container.mf
new file mode 100644
index 000000000..f7941a8ae
--- /dev/null
+++ b/proposal/myrmidon/src/manifest/myrmidon-container.mf
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Created-By: Apache Ant Project
+Main-Class: org.apache.myrmidon.frontends.CLIMain
+Extension-Name: myrmidon.container
+Specification-Title: Myrmidon Framework
+Specification-Version: 0.01
+Specification-Vendor: Jakarta Apache
+Implementation-Vendor-Id: org.apache.jakarta
+Implementation-Vendor: Jakarta Apache Project
+Implementation-Version: 0.01
+Extension-List: myrmidon_api, myrmidon_framework
+myrmidon_api-Extension-Name: myrmidon.api
+myrmidon_api-Specification-Version: 0.01
+myrmidon_api-Implementation-Version: 0.01
+myrmidon_api-Implementation-Vendor-Id: org.apache.jakarta
+myrmidon_framework-Extension-Name: myrmidon.framework
+myrmidon_framework-Specification-Version: 0.01
+myrmidon_framework-Implementation-Version: 0.01
+myrmidon_framework-Implementation-Vendor-Id: org.apache.jakarta
\ No newline at end of file
diff --git a/proposal/myrmidon/src/manifest/myrmidon-framework.mf b/proposal/myrmidon/src/manifest/myrmidon-framework.mf
new file mode 100644
index 000000000..5cbf04aec
--- /dev/null
+++ b/proposal/myrmidon/src/manifest/myrmidon-framework.mf
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Created-By: Apache Ant Project
+Extension-Name: myrmidon.framework
+Specification-Title: Myrmidon Framework
+Specification-Version: 0.01
+Specification-Vendor: Jakarta Apache
+Implementation-Vendor-Id: org.apache.jakarta
+Implementation-Vendor: Jakarta Apache Project
+Implementation-Version: 0.01
+Extension-List: myrmidon.api
+myrmidon.api-Extension-Name: myrmidon.api
+myrmidon.api-Specification-Version: 0.01
+myrmidon.api-Implementation-Version: 0.01
+myrmidon.api-Implementation-Vendor-Id: org.apache.jakarta
+_myrmidon.api-Implementation-URL: http://jakarta.apache.org/ant/myrmidon-api.jar
\ No newline at end of file
diff --git a/proposal/myrmidon/src/manifest/ant-manifest.mf b/proposal/myrmidon/src/manifest/myrmidon-launcher.mf
similarity index 100%
rename from proposal/myrmidon/src/manifest/ant-manifest.mf
rename to proposal/myrmidon/src/manifest/myrmidon-launcher.mf
diff --git a/proposal/myrmidon/src/script/ant b/proposal/myrmidon/src/script/ant
index 18709728f..3e0fbb194 100644
--- a/proposal/myrmidon/src/script/ant
+++ b/proposal/myrmidon/src/script/ant
@@ -42,4 +42,4 @@ else
fi
fi
-$JAVACMD $ANT_OPTS -jar $ANT_HOME/lib/ant.jar $@
+$JAVACMD $ANT_OPTS -jar $ANT_HOME/bin/myrmidon-launcher.jar $@
diff --git a/proposal/myrmidon/src/script/ant.bat b/proposal/myrmidon/src/script/ant.bat
index b0269bd7a..a9d80be12 100644
--- a/proposal/myrmidon/src/script/ant.bat
+++ b/proposal/myrmidon/src/script/ant.bat
@@ -57,7 +57,7 @@ goto setupArgs
:doneArgs
rem Mmmmmm tasty - finished slurping args
-%JAVACMD% %ANT_OPTS% -jar %ANT_HOME%\lib\ant.jar %ANT_CMD_LINE_ARGS%
+%JAVACMD% %ANT_OPTS% -jar %ANT_HOME%\bin\myrmidon-launcher.jar %ANT_CMD_LINE_ARGS%
:end
if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"