[GRADLE-978] Gradle adds an extra line feed when generating a manifest Created: 13/Jun/10  Updated: 04/Jan/13  Resolved: 13/Jun/10

Status: Resolved
Project: Gradle
Affects Version/s: 0.9
Fix Version/s: None

Type: Bug
Reporter: Bryan Keller Assignee: Hans Dockter
Resolution: Not A Bug Votes: 0


 Description   

When generating a manifest, Gradle adds an extra blank line at the end of the manifest, so there are actually two blank lines at the end. The manifest should end with a single blank line. The extra line feed causes bundles to not be detected in some OSGi containers.

For example, the following will have 2 blank lines at the end.

manifest

{ attributes "Bundle-ManifestVersion": "2", "Bundle-Name": "osgi-core", "Bundle-SymbolicName": "osgi-core", "Bundle-Version": "1.0.0", "Bundle-RequiredExecutionEnvironment": "JavaSE-1.6", }

 Comments   
Comment by Bryan Keller [ 13/Jun/10 ]

This appears to be the fault of Ant 1.8.1. Gradle's DefaultManifest.writeTo() calls Ant's Manifest.write() method, and the Ant method call is writing the file with the extra line break. This happens when using plain old Ant by itself too.

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