ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Bruch <br...@st.informatik.tu-darmstadt.de>
Subject Re: Advice for managing large-scale OSGI repository for data analysis
Date Fri, 02 Sep 2011 17:04:05 GMT
Hi Nicolas,


two minor fixes:

org.apache.ivy.osgi.p2.P2MetadataParser.UnitHandler.handleAttributes(Attributes):

boolean singleton = Boolean.getBoolean(atts.getValue(SINGLETON)); 
--> changed to 
boolean singleton = Boolean.parseBoolean(atts.getValue(SINGLETON));

Despite that this information is not used, calling Boolean.getBoolean seems to be wrong.


in org.apache.ivy.osgi.updatesite.UpdateSiteResolver.init()

loader.load(u);
 --> changed to:
RepoDescriptor repoDescriptor = loader.load(u);
setRepoDescriptor(repoDescriptor);

otherwise, repoDescriptor gets never initialized.


However, I couldn't make downloading and installing work due to other problems. I tried to
follow your advice to iterate over all organisations and from there over all modules. This
is the resulting code:

 String resolverName = url.toExternalForm();
 UpdateSiteResolver resolver = new UpdateSiteResolver();
 resolver.setName(resolverName);
 resolver.setUrl(url.toExternalForm());
 for (final OrganisationEntry organisation : resolver.listOrganisations()) {
   for (final ModuleEntry entry : resolver.listModules(organisation)) {
     System.out.println(entry);
   }
 }

resolver.listOganizations returns an empty list (which is not that amazing since there is
no organization attribute).


thus, I tried to use the RepoDescriptor directly :

RepoDescriptor repo = opt.get();
for (final ModuleDescriptor module : (Set<ModuleDescriptor>)
 repo.getModules()) {
 ModuleRevisionId moduleRevisionId =
 module.getModuleRevisionId();
 ivy.install(moduleRevisionId, resolverName, "local-disk", new InstallOptions()
 setTransitive(true).setValidate(true).setOverwrite(true));
 }
}

This approach fails because Ivy cannot download the Artifacts because there is no URL associated
with the artifact.
Any ideas?


Thanks,
Marcel


Mime
View raw message