[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-dev
Subject:    Re: MANIFEST.MF broken in log4j-1.2.15.jar
From:       "Dominique Laurent" <lauredo () gmail ! com>
Date:       2008-02-06 18:35:33
Message-ID: 89706c0f0802061035y7f3da2adw6a62f5b005c78e3d () mail ! gmail ! com
[Download RAW message or body]

Hi Curt,

What you can use with dots is "Extension-Name" e.g.

Extension-Name: org.apache.log4j

but "Name" needs slashes and using "Name" with dots prevents
Package#getImplementationVersion() from returning something useful.

So you could have:

Extension-Name: org.apache.log4j
Name: org/apache/log4j/

and everyone would be happy I guess.

Kind regards,
Dominique


On 06/02/2008, Curt Arnold <carnold@apache.org> wrote:
>
>
> On Feb 6, 2008, at 9:32 AM, Dominique Laurent wrote:
>
> > Hi,
> >
> > Just to let you know that the manifest (MANIFEST.MF) in
> > log4j-1.2.15.jar uses:
> >
> >
> > Name: org.apache.log4j
> >
> > instead of
> >
> >
> > Name: org/apache/log4j/
> >
> >
> > Note the dot '.' instead of the slash '/'.
> >
> > It means that the following piece of code:
> >
> >         String implementationVersion =
> > org
> > .apache.log4j.Appender.class.getPackage().getImplementationVersion();
> >         System.out.println("implementationVersion: \"" +
> > implementationVersion + '"');
> >
> > now returns null instead of implementationVersion: "1.2.15" as it
> > did in previous releases.
> >
> > Could you please reset it to "Name: org/apache/log4j/" ?
> >
> > Thanks in advance,
> >
> > Best regards,
> > Dominique
>
>
> I've confirmed it is a change from log4j 1.2.14 and earlier.  It may
> have been a mistake when writing the Maven POM file, but it may have
> been intentional and needs a bit more research to see if there was a
> motivation behind the change.
>
> From
> http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html#Manifest%20Specification
> >
> > The individual sections define various attributes for packages or
> > files contained in this JAR file. Not all files in the JAR file need
> > to be listed in the manifest as entries, but all files which are to
> > be signed must be listed. The manifest file itself must not be
> > listed.  Each section must start with an attribute with the name as
> > "Name", and the value must be a relative path to the file, or an
> > absolute URL referencing data outside the archive.
>
> So the name definitely should be separated with slashes.
>
> Could you file a bug report (http://issues.apache.org/bugzilla) for
> this issue and specify the JVM vendor and version you were using.
>
> Likely best to keep the "org.apache.log4j" entry and add a second
> entry for "org/apache/log4j".
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>

[Attachment #3 (text/html)]

Hi Curt,<br><br>What you can use with dots is &quot;Extension-Name&quot; \
e.g.<br><br>Extension-Name: org.apache.log4j<br><br>but &quot;Name&quot; needs \
slashes and using &quot;Name&quot; with dots prevents \
Package#getImplementationVersion() from returning something useful.<br> <br>So you \
could have:<br><br>Extension-Name: org.apache.log4j<br>Name: \
org/apache/log4j/<br><br>and everyone would be happy I guess.<br><br>Kind \
regards,<br>Dominique<br><br><br><div><span class="gmail_quote">On 06/02/2008, <b \
class="gmail_sendername">Curt Arnold</b> &lt;<a \
href="mailto:carnold@apache.org">carnold@apache.org</a>&gt; wrote:</span><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> <br>On Feb 6, 2008, at 9:32 AM, Dominique Laurent \
wrote:<br><br>&gt; Hi,<br>&gt;<br>&gt; Just to let you know that the manifest \
(MANIFEST.MF) in<br>&gt; log4j-1.2.15.jar uses:<br>&gt;<br>&gt;<br>&gt; Name: \
org.apache.log4j<br> &gt;<br>&gt; instead of<br>&gt;<br>&gt;<br>&gt; Name: \
org/apache/log4j/<br>&gt;<br>&gt;<br>&gt; Note the dot &#39;.&#39; instead of the \
slash &#39;/&#39;.<br>&gt;<br>&gt; It means that the following piece of \
code:<br>&gt;<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String \
implementationVersion =<br>&gt; org<br>&gt; \
.apache.log4j.Appender.class.getPackage().getImplementationVersion();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
System.out.println(&quot;implementationVersion: \&quot;&quot; +<br>&gt; \
implementationVersion + &#39;&quot;&#39;);<br> &gt;<br>&gt; now returns null instead \
of implementationVersion: &quot;1.2.15&quot; as it<br>&gt; did in previous \
releases.<br>&gt;<br>&gt; Could you please reset it to &quot;Name: \
org/apache/log4j/&quot; ?<br>&gt;<br>&gt; Thanks in advance,<br> &gt;<br>&gt; Best \
regards,<br>&gt; Dominique<br><br><br>I&#39;ve confirmed it is a change from log4j \
1.2.14 and earlier.&nbsp;&nbsp;It may<br>have been a mistake when writing the Maven \
POM file, but it may have<br>been intentional and needs a bit more research to see if \
there was a<br> motivation behind the change.<br><br> From <a \
href="http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html#Manifest%20Specification" \
>http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html#Manifest%20Specification</a><br>&gt;<br>
> 
&gt; The individual sections define various attributes for packages or<br>&gt; files \
contained in this JAR file. Not all files in the JAR file need<br>&gt; to be listed \
in the manifest as entries, but all files which are to<br> &gt; be signed must be \
listed. The manifest file itself must not be<br>&gt; listed.&nbsp;&nbsp;Each section \
must start with an attribute with the name as<br>&gt; &quot;Name&quot;, and the value \
must be a relative path to the file, or an<br> &gt; absolute URL referencing data \
outside the archive.<br><br>So the name definitely should be separated with \
slashes.<br><br>Could you file a bug report (<a \
href="http://issues.apache.org/bugzilla">http://issues.apache.org/bugzilla</a>) \
for<br> this issue and specify the JVM vendor and version you were \
using.<br><br>Likely best to keep the &quot;org.apache.log4j&quot; entry and add a \
second<br>entry for &quot;org/apache/log4j&quot;.<br><br><br>---------------------------------------------------------------------<br>
 To unsubscribe, e-mail: <a \
href="mailto:log4j-dev-unsubscribe@logging.apache.org">log4j-dev-unsubscribe@logging.apache.org</a><br>For \
additional commands, e-mail: <a \
href="mailto:log4j-dev-help@logging.apache.org">log4j-dev-help@logging.apache.org</a><br>
 <br></blockquote></div><br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic