Message:
The following issue has been closed.
Resolver: Emmanuel Venisse
Date: Wed, 2 Jul 2003 4:02 AM
patch applied.
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-343
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MAVEN-343
Summary: jnlp-plugin UpdateManifest code fails for some jar files
Type: Bug
Status: Closed
Priority: Minor
Resolution: FIXED
Time Spent: Unknown
Estimate: 5 minutes
Project: maven
Fix Fors:
1.0-beta-10
Versions:
1.0-beta-9
Assignee: Emmanuel Venisse
Reporter: James Macgill
Created: Thu, 20 Mar 2003 4:18 PM
Updated: Wed, 2 Jul 2003 4:02 AM
Environment: Windows XP Java SDK 1.4.1_01-b01
Description:
The UpdateManifest code in the jnlp plugin does not work for all Jar files, especialy
if they are large.
The code copies from one jar to another using code which is known to fail. For
details see:
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=38&t=000768
To fix, replace the process() method with:
private void process(JarFile jarFile, JarOutputStream jos, JarEntry entry)
throws Exception
{
InputStream is = jarFile.getInputStream(entry);
JarEntry je = entry;
if (entry.getName().equalsIgnoreCase("META-INF/MANIFEST.MF"))
{
je = new JarEntry("META-INF/MANIFEST.MF");
is = new FileInputStream(manifest);
}
ZipEntry destEntry = new ZipEntry (je.getName());
jos.putNextEntry(destEntry);
byte[] buffer = new byte[2048];
int read = 0;
while((read = is.read(buffer)) > 0)
{
jos.write(buffer, 0, read);
}
jos.closeEntry();
}
Sorry this is not a patch file, I can't get CVS working at the moment on this machine.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]