jvanzyl 2002/07/16 09:18:41
Modified: src/java/org/apache/maven/app PluginManager.java
Log:
o Make the plugin manager work with the renamed plugins
Revision Changes Path
1.13 +2 -23
jakarta-turbine-maven/src/java/org/apache/maven/app/PluginManager.java
Index: PluginManager.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/PluginManager.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- PluginManager.java 16 Jul 2002 08:01:34 -0000 1.12
+++ PluginManager.java 16 Jul 2002 16:18:41 -0000 1.13
@@ -166,12 +166,12 @@
// First we expand any JARs that contain plugins.
for (int i = 0; i < files.length; ++i)
{
- if (files[i].getName().endsWith("plugin.jar"))
+ if (files[i].getName().endsWith(".jar"))
{
Expand unzipper = new Expand();
unzipper.setSrc(files[i]);
String directory = files[i].getName();
- directory = directory.substring(0,
directory.indexOf("plugin.jar")-1);
+ directory = directory.substring(0, directory.indexOf(".jar")-1);
File unzipDir = new File(getPluginsDir(), directory);
unzipper.setDest(unzipDir);
unzipper.execute();
@@ -206,29 +206,11 @@
if (!pluginScript.exists())
{
- /*
- output.write("Unable to load plugin script: "
- + pluginScript
- + "\n");
- */
return;
}
loadPluginProperties(name);
- // Setup the classloader that adds the plugin's own
- // directory/jar to the classloader available to
- // jelly. Don't forget to set it back to how it
- // was. Leave nothing but footprints, take nothing
- // but photographs.
-
- ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
-
- ClassLoader cl = new URLClassLoader(new URL[]{getPluginDir(name).toURL()},
- getAntProject().getClass().getClassLoader());
-
- // Thread.currentThread().setContextClassLoader(cl);
-
log.debug("plugin: " + name + " -> " + getPluginDir(name));
Forehead.getInstance().getClassLoader("root.maven").addURL(getPluginDir(name).toURL());
@@ -284,9 +266,6 @@
getPluginDir(name).toURL(),
pluginJellyContext,
getXMLOutput());
-
- // Thread.currentThread().setContextClassLoader(oldCl);
-
}
/**
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>