target.setCategory("Samples");
target.setDescription("A sample application");
PluginArtifactType instance = new PluginArtifactType();
target.getPluginArtifact().add(instance);
instance.getDependency().add(PluginInstallerGBean.toDependencyType(new Dependency(Artifact.create(moduleIdName), ImportType.ALL), true));
PluginListType list = new PluginListType();
list.getPlugin().add(target);
// list.getDefaultRepository().add(repo.toString());
//todo this is surely wrong
list.getDefaultRepository().add("http://www.ibiblio.org/maven2/");
DownloadResults results = installer.install(list, repo.toString(), false, null, null);
if (results.isFailed()) {
throw new ServletException("Unable to install sample application", results.getFailure());
}
ConfigurationManager mgr = ConfigurationUtil.getConfigurationManager(kernel);