[ 
https://issues.apache.org/jira/browse/FELIX-661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stuart McCulloch updated FELIX-661:
-----------------------------------

    Fix Version/s:     (was: maven-bundle-plugin-1.6.0)
                   maven-bundle-plugin-1.4.3
         Assignee: Stuart McCulloch

Ok, here's my proposed plan:

1.4.2 has already been cut and the release vote is in progress, so because this 
issue existed in earlier releases I don't see any reason to abort this release 
(because that wouldn't save any time in fixing this problem) - so I'll release 
1.4.2 once the vote ends.

In the meantime I'm running the failing build on various machines (although I 
have yet to recreate the failure) - once I receive the patches I will review 
them and make the necessary commits to the bundleplugin. The other components, 
such as Bnd, can be temporarily patched by adding the patched source directly 
to the bundleplugin build - this will be removed when we update Bnd.

The patched bundleplugin will become 1.4.3, and the next stable release with 
the new version of Bnd will become 1.6.0 - this is because the Bnd tool now 
requires Java5 which is a potentially big change, so we should reflect that in 
the bundleplugin version.

WDYT?

> maven bundle plugin does not close the accessed fie /jar streams
> ----------------------------------------------------------------
>
>                 Key: FELIX-661
>                 URL: https://issues.apache.org/jira/browse/FELIX-661
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-1.4.2
>         Environment: maven 2
> jdk 5 or 6 
> any OS where JDK is supported
>            Reporter: Harsha Godugu
>            Assignee: Stuart McCulloch
>            Priority: Blocker
>             Fix For: maven-bundle-plugin-1.4.3
>
>
> Maven bundle plugin is doing the following.
> i)  When someone (from a pom.xml)  uses this plug-in, to bundlize their 
> project jars,  this plugin  first opens  a jar file for reading. And then 
> later after in some other method call, it opens the SAME file for writing.  
> Basically it dynamically changes the content of the jar for reading and 
> writing.  
> ii)  This plugin forgets to call the close() method on the file / zip/jar/ 
> resource of  jdk and aQute packages.
> How to fix:
> i)  Please call close() at places wherever your are trying to read and write 
> ZipFile  JarFile or aQute's  Analyzer , ZipResource , Jar class files from 
>                   biz/aQute/bndlib/0.0.255/.. /OSGI-OPT/src/aQute/lib/osgi
>     And also at 
>                  
> org/apache/maven/shared/maven-osgi/0.2.0/tt/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java
> ii) At    org/apache/felix/bundleplugin/BundlePlugin.java
>          where  where "classpath" variable is actually an Array of Jar files 
> that need to closed upon task is done.
>         Note that  the Jar here is from aQute and it has got resource map. So 
> each Jar object might have recursive resources. So, please walk through the 
> map 
>        and close each resource if it is  FileResource/ JarResource / 
> ZipResource.
>         
> iii)   At    org/apache/felix/bundleplugin/BundlePlugin.java
>        I also suspect the place in the same BundlePlugin.java,  where we  
> call unpackBundle(...) and call  ManifestPlugin.writeManifest(... , ..)
>        Please make sure the streams are closed.
> -- A generic message.
> We need this very urgently.  We appreciate your timely action.  Any comments, 
> questions please send it to me directly.
> I can work with you to provide the fix and verify the fix.
> Many thanks in advance.
> Harsha

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to