You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Bart Elen (JIRA)" <ji...@apache.org> on 2007/10/26 14:54:50 UTC
[jira] Commented: (FELIX-410) Add support for zipped repository
files
[ https://issues.apache.org/jira/browse/FELIX-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537943 ]
Bart Elen commented on FELIX-410:
---------------------------------
I have tested the new version of the bundlerepository and zipped manifest files are working now :-)
Thanks Richard
> Add support for zipped repository files
> ---------------------------------------
>
> Key: FELIX-410
> URL: https://issues.apache.org/jira/browse/FELIX-410
> Project: Felix
> Issue Type: Improvement
> Components: Bundle Repository (OBR)
> Affects Versions: 1.0.0
> Reporter: Bart Elen
> Assignee: Richard S. Hall
> Fix For: 1.0.0
>
>
> The repository XML-file can become relative large when the number of bundles grows.
> The bindex tool reduces the size of the repository file significantly when it's zip function is used (with -r repository.zip)
> usage example:
> java -jar bindex.jar bundleDir -r repository.zip
> The problem is that OBR does not seem to support zipped repository files.
> A solution that does the trick is:
> Replace in RepositoryImpl.java line 146 "is = conn.getInputStream();" of function "private void parseRepositoryFile(int hopCount)"
> with:
> if ( m_url.getPath().endsWith(".zip")) {
> ZipInputStream zin = new ZipInputStream( conn.getInputStream() );
> ZipEntry entry = zin.getNextEntry();
> while ( entry != null ) {
> if ( entry.getName().equals("repository.xml")) {
> is = zin;
> break;
> }
> entry = zin.getNextEntry();
> }
> } else {
> is = conn.getInputStream();
> }
>
> And add following imports:
> import java.util.zip.ZipEntry;
> import java.util.zip.ZipInputStream;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.