diff --git a/Kieker.WebGUI/lib/kieker-1.5-SNAPSHOT.jar b/Kieker.WebGUI/lib/kieker-1.5-SNAPSHOT.jar index c5392a5d13f23073c3251dac83c4557ec0ccadd2..43951c2c219d6cd5e08376d746e595be6abb7c15 100644 Binary files a/Kieker.WebGUI/lib/kieker-1.5-SNAPSHOT.jar and b/Kieker.WebGUI/lib/kieker-1.5-SNAPSHOT.jar differ diff --git a/Kieker.WebGUI/nbactions.xml b/Kieker.WebGUI/nbactions.xml index 2e15c87a2608d388ee8649072a889b9d481b10db..14cb2ebfff786f58162788fb9ad56421b116f530 100644 --- a/Kieker.WebGUI/nbactions.xml +++ b/Kieker.WebGUI/nbactions.xml @@ -3,9 +3,9 @@ <action> <actionName>run</actionName> <goals> - <goal>package</goal> <goal>jetty:run</goal> + </goals> </action> </actions> diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/AvailableDependenciesBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/AvailableDependenciesBean.java index d87bf9dec48e303b8078bbc820d9a08f83914546..92e90171c12984e66883ff1330e63d97f189776b 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/AvailableDependenciesBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/AvailableDependenciesBean.java @@ -20,12 +20,16 @@ package kieker.webgui.beans.application; +import java.net.MalformedURLException; +import java.net.URL; import java.util.List; import javax.faces.bean.ApplicationScoped; import javax.faces.bean.ManagedBean; import kieker.analysis.model.analysisMetaModel.MIDependency; +import kieker.common.logging.Log; +import kieker.common.logging.LogFactory; import kieker.webgui.common.FileManager; import kieker.webgui.common.PluginClassLoader; @@ -39,7 +43,10 @@ import org.primefaces.model.UploadedFile; @ManagedBean @ApplicationScoped public class AvailableDependenciesBean { - + /** + * The logger within this class. + */ + private static final Log LOG = LogFactory.getLog(AvailableDependenciesBean.class); /** * The list containing the depenencies. */ @@ -80,8 +87,12 @@ public class AvailableDependenciesBean { break; } } - PluginClassLoader.getInstance().addURL(dependency.getFilePath()); - this.dependencies.add(dependency); + try { + PluginClassLoader.getInstance().addURL(new URL("file", "localhost", dependency.getFilePath())); + this.dependencies.add(dependency); + } catch (final MalformedURLException ex) { + AvailableDependenciesBean.LOG.error("Could not add the dependency to the ClassLoader.", ex); + } } } } @@ -96,8 +107,13 @@ public class AvailableDependenciesBean { synchronized (this) { final boolean result = FileManager.getInstance().deleteDependency(dependency); if (result) { - PluginClassLoader.getInstance().removeURL(dependency.getFilePath()); this.dependencies.remove(dependency); + try { + PluginClassLoader.getInstance().removeURL(new URL("file", "localhost", dependency.getFilePath())); + this.dependencies.remove(dependency); + } catch (final MalformedURLException ex) { + AvailableDependenciesBean.LOG.error("Could not remove the dependency from the ClassLoader.", ex); + } } } } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/AvailableProjectsBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/AvailableProjectsBean.java index 8d793dee74d93ccfb8d49a0db3e8f4ad50e44bb2..69308739306fe789b0becd66a6ba12c693130d8b 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/AvailableProjectsBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/AvailableProjectsBean.java @@ -19,12 +19,14 @@ ***************************************************************************/ package kieker.webgui.beans.application; +import java.io.File; import java.util.List; import javax.faces.bean.ApplicationScoped; import javax.faces.bean.ManagedBean; import javax.faces.context.FacesContext; +import kieker.analysis.model.analysisMetaModel.MIDependency; import kieker.analysis.model.analysisMetaModel.MIPlugin; import kieker.analysis.model.analysisMetaModel.MIProject; import kieker.analysis.model.analysisMetaModel.impl.MAnalysisMetaModelFactory; @@ -107,11 +109,15 @@ public class AvailableProjectsBean { for (final MIProject project : this.projects) { final TreeNode projectNode = new DefaultTreeNode("project", project, root); - new DefaultTreeNode("dependencies", "Dependencies", projectNode); + final TreeNode dependenciesNode = new DefaultTreeNode("dependencies", "Dependencies", projectNode); final TreeNode usedPluginsNode = new DefaultTreeNode("usedPlugins", "Used Plugins", projectNode); + for (final MIPlugin plugin : project.getPlugins()) { new DefaultTreeNode("usedPlugin", plugin.getClassname(), usedPluginsNode); } + for (final MIDependency dependency : project.getDependencies()) { + new DefaultTreeNode("dependencies", new File(dependency.getFilePath()).getName(), dependenciesNode); + } } return root; diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/request/SelectedDependenciesBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/request/SelectedDependenciesBean.java index 12a453996bf168b37273c0ab13975f9f2a0b3375..c1e0a79d4709bf6354a94855c1154034ae2a05da 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/request/SelectedDependenciesBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/request/SelectedDependenciesBean.java @@ -29,11 +29,8 @@ import javax.faces.context.FacesContext; import kieker.analysis.model.analysisMetaModel.MIDependency; import kieker.analysis.model.analysisMetaModel.MIProject; -import kieker.webgui.beans.application.AvailableDependenciesBean; import kieker.webgui.beans.session.SelectedProjectBean; -import org.primefaces.model.DualListModel; - /** * This bean contains the currently choosen dependencies. * @@ -44,23 +41,11 @@ import org.primefaces.model.DualListModel; @RequestScoped public class SelectedDependenciesBean { - /** - * A dual model containing all available dependencies and the currently choosen one. - */ - private DualListModel<MIDependency> dependencies; - /** - * The currently selected project. - */ + private List<MIDependency> dependencies; private final MIProject project; - /** - * Creates a new instance of this class. - */ public SelectedDependenciesBean() { - final List<MIDependency> source = new ArrayList<MIDependency>(); - final List<MIDependency> target = new ArrayList<MIDependency>(); - - this.dependencies = new DualListModel<MIDependency>(source, target); + this.dependencies = new ArrayList<MIDependency>(); final FacesContext context = FacesContext.getCurrentInstance(); @@ -71,49 +56,94 @@ public class SelectedDependenciesBean { } else { this.project = null; } - - /* Get all available libs. */ - - final AvailableDependenciesBean availDepBean = context.getApplication().evaluateExpressionGet(context, "#{availableDependenciesBean}", - AvailableDependenciesBean.class); - this.dependencies.getSource().clear(); - if (availDepBean != null) { - this.dependencies.getSource().addAll(availDepBean.getDependencies()); - } - this.dependencies.getTarget().clear(); - - /* Now move the already selected to the right side. */ - if (this.project != null) { - final List<MIDependency> projectLibs = this.project.getDependencies(); - for (final MIDependency lib : projectLibs) { - this.dependencies.getSource().remove(lib); - this.dependencies.getTarget().add(lib); - } - } } - /** - * Delivers the stored dependencies within this bean. - * - * @return The dependencies dual model. - */ - public final DualListModel<MIDependency> getDependencies() { + // + // /** + // * A dual model containing all available dependencies and the currently choosen one. + // */ + // private DualListModel<MIDependency> dependencies; + // /** + // * The currently selected project. + // */ + // private final MIProject project; + // + // /** + // * Creates a new instance of this class. + // */ + // public SelectedDependenciesBean() { + // final List<MIDependency> source = new ArrayList<MIDependency>(); + // final List<MIDependency> target = new ArrayList<MIDependency>(); + // + // this.dependencies = new DualListModel<MIDependency>(source, target); + // + // final FacesContext context = FacesContext.getCurrentInstance(); + // + // final SelectedProjectBean selProjBean = context.getApplication().evaluateExpressionGet(context, "#{selectedProjectBean}", + // SelectedProjectBean.class); + // if (selProjBean != null) { + // this.project = selProjBean.getSelectedProject(); + // } else { + // this.project = null; + // } + // + // /* Get all available libs. */ + // + // final AvailableDependenciesBean availDepBean = context.getApplication().evaluateExpressionGet(context, "#{availableDependenciesBean}", + // AvailableDependenciesBean.class); + // this.dependencies.getSource().clear(); + // if (availDepBean != null) { + // this.dependencies.getSource().addAll(availDepBean.getDependencies()); + // } + // this.dependencies.getTarget().clear(); + // + // /* Now move the already selected to the right side. */ + // if (this.project != null) { + // final List<MIDependency> projectLibs = this.project.getDependencies(); + // for (final MIDependency lib : projectLibs) { + // this.dependencies.getSource().remove(lib); + // this.dependencies.getTarget().add(lib); + // } + // } + // } + // + // /** + // * Delivers the stored dependencies within this bean. + // * + // * @return The dependencies dual model. + // */ + // public final DualListModel<MIDependency> getDependencies() { + // return this.dependencies; + // } + // + // /** + // * Sets the dependencies to be stored within this bean to a new value. + // * + // * @param dependencies + // * The new dependencies dual model. + // */ + // public final void setDependencies(final DualListModel<MIDependency> dependencies) { + // this.dependencies = dependencies; + // /* Remember the selected libs. */ + // if (this.project != null) { + // this.project.getDependencies().clear(); + // this.project.getDependencies().addAll(dependencies.getTarget()); + // } + // } + + public List<MIDependency> getDependencies() { return this.dependencies; } - /** - * Sets the dependencies to be stored within this bean to a new value. - * - * @param dependencies - * The new dependencies dual model. - */ - public final void setDependencies(final DualListModel<MIDependency> dependencies) { + public void setDependencies(final List<MIDependency> dependencies) { this.dependencies = dependencies; + } - /* Remember the selected libs. */ + public void submit() { + // TODO Error while executing this method if (this.project != null) { this.project.getDependencies().clear(); - this.project.getDependencies().addAll(dependencies.getTarget()); + this.project.getDependencies().addAll(this.dependencies); } } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/FileManager.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/FileManager.java index 04618341a994baac2c3deb9ce87b0dc7052fbe29..d80476fe2c78c6f8f14e6d1828beffe50d595ef1 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/FileManager.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/FileManager.java @@ -144,7 +144,7 @@ public final class FileManager { final File fileProject = new File(dirProject, projectName + FileManager.EXTENSION); try { final AnalysisController controller = new AnalysisController(project); - return controller.saveToFile(fileProject, projectName); + return controller.saveToFile(fileProject); } catch (final Exception ex) { FileManager.LOG.error("Could not save project '" + projectName + "'."); return false; diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/PluginClassLoader.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/PluginClassLoader.java index 5e1f9034fc088b018359ac377bd8baa8322a75b3..7e543f092f99d269f31909cb90db336b4507bbef 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/PluginClassLoader.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/PluginClassLoader.java @@ -21,6 +21,11 @@ package kieker.webgui.common; import java.net.URL; +import java.net.URLClassLoader; +import java.util.HashMap; +import java.util.Iterator; + +import kieker.analysis.AnalysisController; /** * This singleton class is responsible for the dynamic loading of classes. @@ -29,6 +34,7 @@ import java.net.URL; * plugin objects have to be created. * * @author Nils Christian Ehmke + * @version 1.0 */ public final class PluginClassLoader { @@ -36,6 +42,10 @@ public final class PluginClassLoader { * The singleton instance of this class. */ private static final PluginClassLoader INSTANCE = new PluginClassLoader(); + /** + * This list contains a class loader for each url added to this class loader. + */ + private final HashMap<URL, URLClassLoader> classLoaders = new HashMap<URL, URLClassLoader>(); /** * The default constructor of this class. @@ -47,20 +57,23 @@ public final class PluginClassLoader { /** * This method can be used to add an url to the class loader. * - * @param fileName - * The file name of the dependency to be added. + * @param url + * The URL of the dependency to be added. */ - public void addURL(final String fileName) { - // TODO Implement + public void addURL(final URL url) { + final URLClassLoader newClassLoader = new URLClassLoader(new URL[] { url }, AnalysisController.class.getClassLoader()); + synchronized (this) { + this.classLoaders.put(url, newClassLoader); + } } /** * This method can be used to remove an url from the class loader. * - * @param fileName - * The file name of the dependency to be removed. + * @param url + * The URL of the dependency to be added. */ - public void removeURL(final String fileName) { + public void removeURL(final URL url) { // TODO Implement } @@ -80,9 +93,24 @@ public final class PluginClassLoader { * @param name * The name of the class to be loaded. * @return The class. + * @throws ClassNotFoundException + * If a class with the given name could not be found. */ - public Class<?> loadClass(final String name) { - // TODO Implement - return null; + public Class<?> loadClass(final String name) throws ClassNotFoundException { + synchronized (this) { + /* Run through all available class loaders and try to find the correct class. */ + final Iterator<URLClassLoader> classLoaderIter = this.classLoaders.values().iterator(); + while (classLoaderIter.hasNext()) { + final URLClassLoader currClassLoader = classLoaderIter.next(); + /* If no exception is thrown, we found the correct class and return it. Otherwise we continue the search. */ + try { + final Class<?> resultingClass = currClassLoader.loadClass(name); + return resultingClass; + } catch (final ClassNotFoundException ex) { + } + } + } + /* We were not able to found any class and throw an exception. */ + throw new ClassNotFoundException(); } } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/PluginFinder.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/PluginFinder.java index 6296d9c66463cd4385bde3d0ad0a249112e323cd..7c3bf66ce57bf9c96e71eed49ea9c93076d1099b 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/PluginFinder.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/PluginFinder.java @@ -22,15 +22,13 @@ package kieker.webgui.common; import java.io.File; import java.io.IOException; import java.net.URL; -import java.net.URLClassLoader; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; import java.util.jar.JarEntry; import java.util.jar.JarFile; -import kieker.analysis.AnalysisController; -import kieker.analysis.plugin.port.Plugin; +import kieker.analysis.plugin.annotation.Plugin; /** * @author Nils Christian Ehmke @@ -53,13 +51,7 @@ public final class PluginFinder { * exception occured. */ public static List<Class<?>> getAllPluginsWithinJar(final URL url) { - URLClassLoader classLoader = null; try { - /* - * Get a classloader and make sure that it has the system class - * loader as parent and that it knows the url. - */ - classLoader = new URLClassLoader(new URL[] { url }, AnalysisController.class.getClassLoader()); /* * Open the jar file and run through all entries within this file. */ @@ -75,7 +67,7 @@ public final class PluginFinder { /* * Try to find a class with the same name. */ - final Class<?> c = classLoader.loadClass(name); + final Class<?> c = PluginClassLoader.getInstance().loadClass(name); /* * If it is a class and has the annotation - put it into our * list. @@ -87,18 +79,10 @@ public final class PluginFinder { /* Ignore error. */ } } - //jarFile.close(); + jarFile.close(); return result; } catch (final IOException ex) { ex.printStackTrace(); - } finally { - /*try { - if (classLoader != null) { - classLoader.close(); - } - } catch (IOException ex) { - ex.printStackTrace(); - }*/ } return null; } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/converter/MIDependencyToCountPluginsConverter.java b/Kieker.WebGUI/src/main/java/kieker/webgui/converter/MIDependencyToCountPluginsConverter.java index 07ecd110331980b0e10925b98f59ff35e8cb3ee7..89d7ffad1f71339e352bce38aac7b115874d3a62 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/converter/MIDependencyToCountPluginsConverter.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/converter/MIDependencyToCountPluginsConverter.java @@ -19,8 +19,8 @@ ***************************************************************************/ package kieker.webgui.converter; -import java.io.File; import java.net.MalformedURLException; +import java.net.URL; import java.util.HashMap; import java.util.Map; @@ -104,8 +104,8 @@ public class MIDependencyToCountPluginsConverter implements Converter { return ""; } else { /* Try to find the library within the cache. */ - if (this.cache.containsKey((MIDependency) o)) { - return this.cache.get((MIDependency) o); + if (this.cache.containsKey(o)) { + return this.cache.get(o); } /* If the cache is too big, remove one of the objects. */ if (this.cache.size() > MIDependencyToCountPluginsConverter.MAX_CACHE_SIZE) { @@ -113,7 +113,7 @@ public class MIDependencyToCountPluginsConverter implements Converter { } String result; try { - result = Integer.toString(PluginFinder.getAllPluginsWithinJar(new File(((MIDependency) o).getFilePath()).toURL()).size()); + result = Integer.toString(PluginFinder.getAllPluginsWithinJar(new URL("file", "localhost", ((MIDependency) o).getFilePath())).size()); } catch (final MalformedURLException ex) { result = ""; } catch (final NullPointerException ex) { diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/converter/MIDependencyToStringConverter.java b/Kieker.WebGUI/src/main/java/kieker/webgui/converter/MIDependencyToStringConverter.java index ef439027d4450137edf6a0c4e02c593c719c50d5..7b8d985cd99bfe4316492b4784f47f835a219b05 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/converter/MIDependencyToStringConverter.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/converter/MIDependencyToStringConverter.java @@ -17,9 +17,11 @@ * See the License for the specific language governing permissions and * limitations under the License. ***************************************************************************/ + package kieker.webgui.converter; import java.io.File; +import java.util.HashMap; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; @@ -29,8 +31,7 @@ import javax.faces.convert.FacesConverter; import kieker.analysis.model.analysisMetaModel.MIDependency; /** - * This converter can be used to convert an instance of <i>MIDependency</i> to a - * human readable string, but <b>not</b> vice versa. + * This converter can be used to convert an instance of <i>MIDependency</i> to a human readable string, but <b>not</b> vice versa. * * @author Nils Christian Ehmke * @version 1.0 @@ -47,7 +48,9 @@ public class MIDependencyToStringConverter implements Converter { * Creates a new instance of this class. */ public MIDependencyToStringConverter() { - /* No code necessary. */ + /* + * No code necessary. + */ } /** @@ -56,11 +59,10 @@ public class MIDependencyToStringConverter implements Converter { * @param fc * The FacesContext for the request being processed. * @param uic - * The component with which this model object value is - * associated. + * The component with which this model object value is associated. * @param string * The string to be converted. - * @return null + * @return null; */ @Override public Object getAsObject(final FacesContext fc, final UIComponent uic, final String string) { @@ -68,18 +70,15 @@ public class MIDependencyToStringConverter implements Converter { } /** - * This method converts the given object (on condition that it is an - * instance of the class <code>MIDependency</code>) to a human readable string. + * This method converts the given object (on condition that it is an instance of the class <code>MIDependency</code>) to a human readable string. * * @param fc * The FacesContext for the request being processed. * @param uic - * The component with which this model object value is - * associated. + * The component with which this model object value is associated. * @param o * The object to be converted. - * @return A human readable represantation of the given object or null, of - * the object is from the wrong class. + * @return A human readable represantation of the given object or null, of the object is from the wrong class. */ @Override public String getAsString(final FacesContext fc, final UIComponent uic, final Object o) { diff --git a/Kieker.WebGUI/src/main/webapp/manageDependencies.xhtml b/Kieker.WebGUI/src/main/webapp/manageDependencies.xhtml index 44a75feeb2e6e521f96870c27c1a366ea35c5fad..d37c663d204812f41c59b0671406c1af5fe1c01a 100644 --- a/Kieker.WebGUI/src/main/webapp/manageDependencies.xhtml +++ b/Kieker.WebGUI/src/main/webapp/manageDependencies.xhtml @@ -18,9 +18,7 @@ <!-- The control panel to get back. --> <h:form> Click - <p:commandLink ajax="false" action="/main"> - <h:outputText value="here" /> - </p:commandLink> + <h:link outcome="/main">here</h:link> to get back to the main menu. </h:form> </p:layoutUnit> diff --git a/Kieker.WebGUI/src/main/webapp/projectDependencies.xhtml b/Kieker.WebGUI/src/main/webapp/projectDependencies.xhtml index b8bea451a3f01ca32c8a52f60bf56fc24ed0d22a..550dedbeb3dcf4f5811620da23885d7df1e13328 100644 --- a/Kieker.WebGUI/src/main/webapp/projectDependencies.xhtml +++ b/Kieker.WebGUI/src/main/webapp/projectDependencies.xhtml @@ -15,24 +15,22 @@ <p:layout fullPage="true"> <p:layoutUnit header="Navigation" position="north" collapsible="true" resizable="true"> <!-- The control panel to get back. --> - <h:form> - Click - <p:commandLink ajax="false" action="/main"> - <h:outputText value="here" /> - </p:commandLink> - to get back to the main menu. - </h:form> + Click + <h:link outcome="/main">here</h:link> + to get back to the main menu. </p:layoutUnit> <p:layoutUnit header="Currently used Dependencies" position="center" > - <div align="center"> - <p:pickList id="pickList" value="#{selectedDependenciesBean.dependencies}" var="dependency" - itemLabel="#{dependency.getFilePath()}" itemValue="#{dependency}" - converter="kieker.webgui.converter.MIDependencyToStringConverter" > - <f:facet name="sourceCaption">Available</f:facet> - <f:facet name="targetCaption">Project</f:facet> - </p:pickList> - </div> + <h:form> + <p:selectManyCheckbox value="#{selectedDependenciesBean.dependencies}" + layout="pageDirection"> + <f:selectItems value="#{availableDependenciesBean.dependencies}" /> + </p:selectManyCheckbox> + <p:spacer width="0px" height="20px"/> + <div align="center"> + <p:commandButton ajax="false" value="Submit" actionListener="#{selectedDependenciesBean.submit()}"/> + </div> + </h:form> </p:layoutUnit> </p:layout> diff --git a/Kieker.WebGUI/src/test/java/kieker/webgui/common/PluginFinderTest.java b/Kieker.WebGUI/src/test/java/kieker/webgui/common/PluginFinderTest.java index 26cb9b6ae80b5b8bea3008e22d7149035535eac4..4b3512fa08f2febdc819aa20106136e41ea08f4d 100644 --- a/Kieker.WebGUI/src/test/java/kieker/webgui/common/PluginFinderTest.java +++ b/Kieker.WebGUI/src/test/java/kieker/webgui/common/PluginFinderTest.java @@ -20,12 +20,13 @@ package kieker.webgui.common; -import java.io.File; import java.net.MalformedURLException; +import java.net.URL; import java.util.List; import junit.framework.Assert; import junit.framework.TestCase; + import org.junit.Test; /** @@ -43,8 +44,8 @@ public class PluginFinderTest extends TestCase { public void testKiekerJarContainsPlugins() { /* It can be assumed that the kieker jar contains at least one plugin. */ try { - final List<Class<?>> availableKiekerPlugins = PluginFinder.getAllPluginsWithinJar(new File("lib/kieker-1.5-SNAPSHOT.jar").toURL()); - + PluginClassLoader.getInstance().addURL(new URL("file", "localhost", "lib/kieker-1.5-SNAPSHOT.jar")); + final List<Class<?>> availableKiekerPlugins = PluginFinder.getAllPluginsWithinJar(new URL("file", "localhost", "lib/kieker-1.5-SNAPSHOT.jar")); Assert.assertTrue("Kieker-Jar seems to contain no plugins.", availableKiekerPlugins.size() > 0); } catch (final MalformedURLException ex) { Assert.fail("Exception occured.");