[Bug 152] New: Bundle manifest headers have invalid version specifications in SLF4J version 1 .5.9-RC0

7 messages Options
Embed this post
Permalink
Bugzilla from bugzilla-daemon@pixie.qos.ch

[Bug 152] New: Bundle manifest headers have invalid version specifications in SLF4J version 1 .5.9-RC0

Reply Threaded More More options
Print post
Permalink
http://bugzilla.slf4j.org/show_bug.cgi?id=152

           Summary: Bundle manifest headers have invalid version
                    specifications  in SLF4J version 1.5.9-RC0
           Product: SLF4J
           Version: 1.5.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: Unspecified
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]


Hi,

The 'Bundle-Version' bundle manifest header for the OSGi bundles in the
1.5.9-RC0 is invalid. The META/MANIFEST.MF files of the OSGi bundles in the
release candidate (RC0) version contain the following header:

  Bundle-Version: 1.5.9-RC0

The hyphen-minus character ('-') between the micro attribute (i.e. '9') and the
qualifier attribute (i.e. 'RC0') is invalid, at least without a full stop ('.')
before it.

Section 3.2.5 'Version' of the OSGi Service Platform Core Specification
(Release 4, Version 4.2, June 2009) states:

  Version specifications are used in several places. A version
  token has the following grammar:

    version ::=
      major( '.' minor ( '.' micro ( '.' qualifier )? )? )?
    major ::= number // See 1.3.2
    minor ::= number
    micro ::= number
    qualifier ::= ( alphanum | ’_’ | '-' )+

The invalid '1.5.9-RC0' version specification is also a problem where it is
used in the Import-Package and Export-Package headers.

The work around is to modified the bundle manifests (i.e. META/MANIFEST.MF
files) for the OSGi bundles being used and change the version specification to
'1.5.9.RC0'.

Regards,
Eddy.


--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dev mailing list
[hidden email]
http://www.slf4j.org/mailman/listinfo/dev
Bugzilla from bugzilla-daemon@pixie.qos.ch

[Bug 152] Bundle manifest headers have invalid version specifications in SLF4J version 1 .5.9-RC0

Reply Threaded More More options
Print post
Permalink
http://bugzilla.slf4j.org/show_bug.cgi?id=152


Hugues Malphettes <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]




--- Comment #1 from Hugues Malphettes <[hidden email]>  2009-11-10 23:06:46 ---
I have checked out this current trunk and this bug is fixed in 1.5.9.RC1


--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dev mailing list
[hidden email]
http://www.slf4j.org/mailman/listinfo/dev
Bugzilla from bugzilla-daemon@pixie.qos.ch

[Bug 152] Bundle manifest headers have invalid version specifications in SLF4J version 1 .5.9-RC0

Reply Threaded More More options
Print post
Permalink
In reply to this post by Bugzilla from bugzilla-daemon@pixie.qos.ch
http://bugzilla.slf4j.org/show_bug.cgi?id=152





--- Comment #2 from Eddy <[hidden email]>  2009-11-10 23:40:45 ---
Yes, this has been addressed by the fix for (duplicate?) bug #157
http://bugzilla.slf4j.org/show_bug.cgi?id=157

It is fixed in
http://github.com/ceki/slf4j/commit/e967f5135e1bd2eb0d3165ec08cdb7a35bd1b200

The fix was to change the format of the version so that the hyphen-minus
character ('-') between the micro attribute and the qualifier attribute is not
longer present in the version token specified in the 'Bundle-Version' bundle
manifest header. That is, the new version is 1.5.9.RC1 where it was previously
1.5.9-RC0 (note the hyphen-minus character ('-')).

However, if the previous format for version numbers is used in the future, this
problem will be reintroduced. As mentioned by Pete Muir (in bug #157), a more
robust fix may be to convert (or "normalise") the version to the OSGi version
format of "MAJOR.MINOR.MICRO.QUALIFIER" as described in:
http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html#ApacheFelixMavenBundlePlugin%28BND%29-DefaultBehavior


--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dev mailing list
[hidden email]
http://www.slf4j.org/mailman/listinfo/dev
Bugzilla from bugzilla-daemon@pixie.qos.ch

[Bug 152] Bundle manifest headers have invalid version specifications in SLF4J version 1 .5.9-RC0

Reply Threaded More More options
Print post
Permalink
In reply to this post by Bugzilla from bugzilla-daemon@pixie.qos.ch
http://bugzilla.slf4j.org/show_bug.cgi?id=152





--- Comment #3 from Hugues Malphettes <[hidden email]>  2009-11-10 23:50:40 ---
In a similar situation I used
http://mojo.codehaus.org/build-helper-maven-plugin/parse-version-mojo.html

1- invoke it (in the parent pom to not copy-paste it everywhere)
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>build-helper-maven-plugin</artifactId>
  <version>1.3</version>
  <executions>
    <execution>
      <id>parse-version</id>
      <goals>
        <goal>parse-version</goal>
      </goals>
    </execution>
  </executions>
</plugin>

2- call ant to replace the Bundle-Version with the one generated in #1
(assuming the MANIFEST.MF contains Bundle-Version: 1.5.9.qualifier)
<plugin>
  <artifactId>maven-antrun-plugin</artifactId>
  <executions>
    <execution>
      <phase>process-resources</phase>
      <configuration>
        <tasks>
          <replace file="${project.build.outputDirectory}/META-INF/MANIFEST.MF"
              token="Bundle-Version: 1.5.9.qualifier"
              value="Bundle-Version: ${parsedVersion.osgiVersion}"/>
        </tasks>
      </configuration>
      <goals>
        <goal>run</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Let me know if that would suit this project and I'll work on a patch for your
sources.
The drawback is that for some reason, I had to copy-paste #2 in every pom.xml.


--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dev mailing list
[hidden email]
http://www.slf4j.org/mailman/listinfo/dev
Bugzilla from bugzilla-daemon@pixie.qos.ch

[Bug 152] Bundle manifest headers have invalid version specifications in SLF4J version 1 .5.9-RC0

Reply Threaded More More options
Print post
Permalink
In reply to this post by Bugzilla from bugzilla-daemon@pixie.qos.ch
http://bugzilla.slf4j.org/show_bug.cgi?id=152





--- Comment #4 from Hugues Malphettes <[hidden email]>  2009-11-11 00:40:34 ---
Created an attachment (id=64)
 --> (http://bugzilla.slf4j.org/attachment.cgi?id=64)
generate osgi compliant Bundle-Version when version ends with "-SNAPSHOT"

It turns out the ant replace target is not necessary.
In my situation, the MANIFEST.MF needed to be actually complete and valid as it
was used by eclipse-PDE during development.

So the suggested patch consists of:
compute the ${parsedVersion.osgiVersion} in the parent pom.xml
and use it for every manifest:
<manifestEntries>
  <Bundle-Version>${parsedVersion.osgiVersion}</Bundle-Version>

as replacement to
<manifestEntries>
  <Bundle-Version>${project.version}</Bundle-Version>


Also, the proposed fix for http://bugzilla.slf4j.org/show_bug.cgi?id=75 is part
of this patch (one line change in
slf4j-api/src/main/resources/META-INF/MANIFEST.MF). Let me know if you want a
new patch without it.


--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dev mailing list
[hidden email]
http://www.slf4j.org/mailman/listinfo/dev
Bugzilla from bugzilla-daemon@pixie.qos.ch

[Bug 152] Bundle manifest headers have invalid version specifications in SLF4J version 1 .5.9-RC0

Reply Threaded More More options
Print post
Permalink
In reply to this post by Bugzilla from bugzilla-daemon@pixie.qos.ch
http://bugzilla.slf4j.org/show_bug.cgi?id=152


Hugues Malphettes <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #64 is|0                           |1
           obsolete|                            |




--- Comment #5 from Hugues Malphettes <[hidden email]>  2009-11-11 01:05:12 ---
Created an attachment (id=65)
 --> (http://bugzilla.slf4j.org/attachment.cgi?id=65)
also fix the version of the Import-Package and Export-Package

My apologies, I had forgotten to replace the ${project.version} by its
osgiVersion counterpart in the src/main/resources/META-INF/MANIFEST.MF

This updated patch takes care of it.


--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dev mailing list
[hidden email]
http://www.slf4j.org/mailman/listinfo/dev
Bugzilla from bugzilla-daemon@pixie.qos.ch

[Bug 152] Bundle manifest headers have invalid version specifications in SLF4J version 1 .5.9-RC0

Reply Threaded More More options
Print post
Permalink
In reply to this post by Bugzilla from bugzilla-daemon@pixie.qos.ch
http://bugzilla.slf4j.org/show_bug.cgi?id=152


Ceki Gulcu <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #6 from Ceki Gulcu <[hidden email]>  2009-11-24 00:43:32 ---
Applied patch 65. See
http://github.com/ceki/slf4j/commit/e5bbca3f28f08327497f591c72b5aac429e15f65


--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dev mailing list
[hidden email]
http://www.slf4j.org/mailman/listinfo/dev