mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-06 00:25:58 +00:00
[FIXED HUDSON-6966] Plugins with dependencies show wrong description on
installed plugins page. DependencyClassLoader checks dependencies before this plugin, so wrong index.jelly is found for plugins with dependencies. Added implementation of findResources in DependencyClassLoader, and use getResources to find the right index.jelly in PluginWrapper.getIndexPage(). git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@32876 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
3c4dd890e1
commit
81b3603c13
4 files changed
+101
-3
No files matched your search
@@ -37,6 +37,7 @@ import java.io.OutputStream;
|
||||
import java.io.Closeable;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
import java.util.jar.Manifest;
|
||||
import java.util.logging.Logger;
|
||||
@@ -192,7 +193,15 @@ public final class PluginWrapper implements Comparable<PluginWrapper> {
|
||||
* Returns the URL of the index page jelly script.
|
||||
*/
|
||||
public URL getIndexPage() {
|
||||
return classLoader.getResource("index.jelly");
|
||||
// In the current impl dependencies are checked first, so the plugin itself
|
||||
// will add the last entry in the getResources result.
|
||||
URL idx = null;
|
||||
try {
|
||||
Enumeration<URL> en = classLoader.getResources("index.jelly");
|
||||
while (en.hasMoreElements())
|
||||
idx = en.nextElement();
|
||||
} catch (IOException ignore) { }
|
||||
return idx;
|
||||
}
|
||||
|
||||
private String computeShortName(Manifest manifest, File archive) {
|
||||
|
||||
Reference in new issue
Block a user