	protected Collection<URL> getAllPluginResourceURLs() {
		Set<URL> result = Sets.newLinkedHashSet();
		ClassLoader classLoader = ClassLoader.getSystemClassLoader();
		try {
			Enumeration<URL> resources = classLoader.getResources("plugin.xml");
			while (resources.hasMoreElements())
				result.add(resources.nextElement());
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
		if (classLoader instanceof URLClassLoader) {
			URLClassLoader ucl = (URLClassLoader) classLoader;
			for (URL u : ucl.getURLs())
				if (!u.getFile().endsWith(".jar")) {
					try {
						java.io.File f = new java.io.File(u.toURI());
						if (f.isDirectory()) {
							int levels = 5;
							while (levels >= 0) {
								java.io.File pl = new java.io.File(f + "/" + "plugin.xml");
								if (pl.isFile()) {
									result.add(pl.toURI().toURL());
									break;
								}
								levels--;
								f = f.getParentFile();
							}
						}
					} catch (URISyntaxException e) {
						throw new RuntimeException(e);
					} catch (MalformedURLException e) {
						throw new RuntimeException(e);
					}
				}
		}
		return result;
	}

	protected Collection<URL> getAllPluginResourceURLs() {
		Set<URL> result = Sets.newLinkedHashSet();
		ClassLoader classLoader = ClassLoader.getSystemClassLoader();
		try {
			Enumeration<URL> resources = classLoader.getResources("plugin.xml");
			while (resources.hasMoreElements())
				result.add(resources.nextElement());
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
		if (classLoader instanceof URLClassLoader) {
			URLClassLoader ucl = (URLClassLoader) classLoader;
			for (URL u : ucl.getURLs())
				if (!u.getFile().endsWith(".jar")) {
					try {
						java.io.File f = new java.io.File(u.toURI());
						if (f.isDirectory()) {
							int levels = 5;
							while (levels >= 0 && f != null) {
								java.io.File pl = new java.io.File(f + "/" + "plugin.xml");
								if (pl.isFile()) {
									result.add(pl.toURI().toURL());
									break;
								}
								levels--;
								f = f.getParentFile();
							}
						}
					} catch (URISyntaxException e) {
						throw new RuntimeException(e);
					} catch (MalformedURLException e) {
						throw new RuntimeException(e);
					}
				}
		}
		return result;
	}
