[GRADLE-1031] OSGi Manifest ignores attributes Created: 12/Jul/10  Updated: 04/Jan/13  Resolved: 24/Nov/10

Status: Resolved
Project: Gradle
Affects Version/s: 0.9
Fix Version/s: 0.9-rc-3

Type: Bug
Reporter: John Gibson Assignee: Hans Dockter
Resolution: Fixed Votes: 0


Constructing an OSGi manifest ignores attributes, while a normal manifest does not. e.g.

jar {

{ attributes( 'Built-By':System.properties.'user.name', 'Another-Header':'foo' ) }


Will create a jar with the Built-By and Another-Header in the manifest. However, doing something similar with OSGi doesn't work.

jar {

{ attributes( 'Built-By':System.properties.'user.name', 'Another-Header':'foo' ) name = 'Foo' symbolicName = 'com.foo' version = '1.0.0' description = 'A Foo Package' docURL = 'http://www.mycompany.com' vendor = 'The Foo Corp.' license = 'A Spiffy License' instruction 'Import-Package', '*' instruction 'Export-Package', 'com.foo;version=' + version }


Under OSGi will create all of the appropriate OSGi headers, but will lack Built-By and Another-Header in the resulting manifest.

Comment by John Gibson [ 09/Nov/10 ]

I've fixed this bug. You can find the fix and a test for it on Github on branch GRADLE-1031: https://github.com/jgibson/gradle/tree/GRADLE-1031

Comment by Adam Murdoch [ 11/Nov/10 ]

Applied. Thank you for the patch.

Generated at Wed Jun 30 11:45:09 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.