You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Olaf Bergner <ol...@gmx.de> on 2007/10/16 21:41:48 UTC

[maven-bundle-plugin] Linebreaks in description element can lead to invalid manifest header

Sometimes I left a perfectly running build to do some cosmetic work in the
projects that produce my osgi wrapper bundles for external libraries, using
the maven-bundle-plugin. Getting back to the real stuff I fired up maven
only to see my build fail with a compilation error, although I didn't touch
any 'real' code. Eventually, I found out that the compilation failure was
caused by an invalid header in one of my osgi wrapper bundle's manifest
file. It turns out that the maven-bundle-plugin copies the 'description'
section from the pom into the generated MANIFEST.MF. So that description
better be on one line. If you are like me and habitually format each and
every file before saving - strg-shift-F in eclipse - that restriction easily
gets violated. I therefore made it a habit to include the description in a
CDATA-section. Same goes for the 'Include-Resource' instruction.

I wonder whether this warrants a bug report, i.e. 'Remove linebreaks in
those elements that are copied to the generated manifest file'?

Cheers,
Olaf


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


AW: [maven-bundle-plugin] Linebreaks in description element can lead to invalid manifest header

Posted by Olaf Bergner <ol...@gmx.de>.
Done: https://issues.apache.org/jira/browse/FELIX-404

Cheers,
Olaf

> -----Ursprüngliche Nachricht-----
> Von: mcculls@gmail.com [mailto:mcculls@gmail.com] Im Auftrag von Stuart
> McCulloch
> Gesendet: Sonntag, 21. Oktober 2007 18:41
> An: users@felix.apache.org
> Betreff: Re: [maven-bundle-plugin] Linebreaks in description element can
> lead to invalid manifest header
> 
> On 21/10/2007, Olaf Bergner <ol...@gmx.de> wrote:
> >
> > Thank you, Stuart, for your instant reaction. On a related note:
> wouldn't
> > it
> > be a good idea if the maven-bundle-plugin verified the correctness of
> the
> > manifest it produced, reported any errors it produced and failed the
> build
> > if need be.
> 
> 
> sure - that's a good idea, would you mind raising it as an improvement on
> JIRA?
> 
>    https://issues.apache.org/jira/browse/FELIX/component/12311143
> 
> Maybe it's just me - I certainly often do get that impression in
> > the face of most of the problems I encounter - but invalid manifests
> gave
> > me
> > a lot of trouble. What's so aggravating is that these problems are
> usually
> > easy to fix but a little tricky to diagnose, especially if you haven't
> yet
> > been bitten by them.
> >
> > Cheers,
> > Olaf
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: mcculls@gmail.com [mailto:mcculls@gmail.com] Im Auftrag von
> Stuart
> > > McCulloch
> > > Gesendet: Sonntag, 21. Oktober 2007 10:15
> > > An: users@felix.apache.org
> > > Betreff: Re: [maven-bundle-plugin] Linebreaks in description element
> can
> > > lead to invalid manifest header
> > >
> > > On 17/10/2007, Stuart McCulloch <st...@jayway.net> wrote:
> > > >
> > > > On 17/10/2007, Olaf Bergner <ol...@gmx.de> wrote:
> > > > >
> > > > > Sometimes I left a perfectly running build to do some cosmetic
> work
> > in
> > > > > the
> > > > > projects that produce my osgi wrapper bundles for external
> > libraries,
> > > > > using
> > > > > the maven-bundle-plugin. Getting back to the real stuff I fired up
> > > maven
> > > > >
> > > > > only to see my build fail with a compilation error, although I
> > didn't
> > > > > touch
> > > > > any 'real' code. Eventually, I found out that the compilation
> > failure
> > > > > was
> > > > > caused by an invalid header in one of my osgi wrapper bundle's
> > > manifest
> > > > > file. It turns out that the maven-bundle-plugin copies the
> > > 'description'
> > > > > section from the pom into the generated MANIFEST.MF. So that
> > > description
> > > > > better be on one line. If you are like me and habitually format
> each
> > > and
> > > > >
> > > > > every file before saving - strg-shift-F in eclipse - that
> > restriction
> > > > > easily
> > > > > gets violated. I therefore made it a habit to include the
> > description
> > > in
> > > > > a
> > > > > CDATA-section. Same goes for the 'Include-Resource' instruction.
> > > >
> > > >
> > > FYI, I've fixed the description problem in trunk under the following
> > > issue:
> > >
> > >    https://issues.apache.org/jira/browse/FELIX-403
> > >
> > > the Include-Resource problem was already fixed in the latest snapshot
> > >
> > > --
> > > Cheers, Stuart
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
> >
> 
> 
> --
> Cheers, Stuart


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: [maven-bundle-plugin] Linebreaks in description element can lead to invalid manifest header

Posted by Stuart McCulloch <st...@jayway.net>.
On 21/10/2007, Olaf Bergner <ol...@gmx.de> wrote:
>
> Thank you, Stuart, for your instant reaction. On a related note: wouldn't
> it
> be a good idea if the maven-bundle-plugin verified the correctness of the
> manifest it produced, reported any errors it produced and failed the build
> if need be.


sure - that's a good idea, would you mind raising it as an improvement on
JIRA?

   https://issues.apache.org/jira/browse/FELIX/component/12311143

Maybe it's just me - I certainly often do get that impression in
> the face of most of the problems I encounter - but invalid manifests gave
> me
> a lot of trouble. What's so aggravating is that these problems are usually
> easy to fix but a little tricky to diagnose, especially if you haven't yet
> been bitten by them.
>
> Cheers,
> Olaf
>
> > -----Ursprüngliche Nachricht-----
> > Von: mcculls@gmail.com [mailto:mcculls@gmail.com] Im Auftrag von Stuart
> > McCulloch
> > Gesendet: Sonntag, 21. Oktober 2007 10:15
> > An: users@felix.apache.org
> > Betreff: Re: [maven-bundle-plugin] Linebreaks in description element can
> > lead to invalid manifest header
> >
> > On 17/10/2007, Stuart McCulloch <st...@jayway.net> wrote:
> > >
> > > On 17/10/2007, Olaf Bergner <ol...@gmx.de> wrote:
> > > >
> > > > Sometimes I left a perfectly running build to do some cosmetic work
> in
> > > > the
> > > > projects that produce my osgi wrapper bundles for external
> libraries,
> > > > using
> > > > the maven-bundle-plugin. Getting back to the real stuff I fired up
> > maven
> > > >
> > > > only to see my build fail with a compilation error, although I
> didn't
> > > > touch
> > > > any 'real' code. Eventually, I found out that the compilation
> failure
> > > > was
> > > > caused by an invalid header in one of my osgi wrapper bundle's
> > manifest
> > > > file. It turns out that the maven-bundle-plugin copies the
> > 'description'
> > > > section from the pom into the generated MANIFEST.MF. So that
> > description
> > > > better be on one line. If you are like me and habitually format each
> > and
> > > >
> > > > every file before saving - strg-shift-F in eclipse - that
> restriction
> > > > easily
> > > > gets violated. I therefore made it a habit to include the
> description
> > in
> > > > a
> > > > CDATA-section. Same goes for the 'Include-Resource' instruction.
> > >
> > >
> > FYI, I've fixed the description problem in trunk under the following
> > issue:
> >
> >    https://issues.apache.org/jira/browse/FELIX-403
> >
> > the Include-Resource problem was already fixed in the latest snapshot
> >
> > --
> > Cheers, Stuart
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Cheers, Stuart

AW: [maven-bundle-plugin] Linebreaks in description element can lead to invalid manifest header

Posted by Olaf Bergner <ol...@gmx.de>.
Thank you, Stuart, for your instant reaction. On a related note: wouldn't it
be a good idea if the maven-bundle-plugin verified the correctness of the
manifest it produced, reported any errors it produced and failed the build
if need be. Maybe it's just me - I certainly often do get that impression in
the face of most of the problems I encounter - but invalid manifests gave me
a lot of trouble. What's so aggravating is that these problems are usually
easy to fix but a little tricky to diagnose, especially if you haven't yet
been bitten by them.

Cheers,
Olaf 

> -----Ursprüngliche Nachricht-----
> Von: mcculls@gmail.com [mailto:mcculls@gmail.com] Im Auftrag von Stuart
> McCulloch
> Gesendet: Sonntag, 21. Oktober 2007 10:15
> An: users@felix.apache.org
> Betreff: Re: [maven-bundle-plugin] Linebreaks in description element can
> lead to invalid manifest header
> 
> On 17/10/2007, Stuart McCulloch <st...@jayway.net> wrote:
> >
> > On 17/10/2007, Olaf Bergner <ol...@gmx.de> wrote:
> > >
> > > Sometimes I left a perfectly running build to do some cosmetic work in
> > > the
> > > projects that produce my osgi wrapper bundles for external libraries,
> > > using
> > > the maven-bundle-plugin. Getting back to the real stuff I fired up
> maven
> > >
> > > only to see my build fail with a compilation error, although I didn't
> > > touch
> > > any 'real' code. Eventually, I found out that the compilation failure
> > > was
> > > caused by an invalid header in one of my osgi wrapper bundle's
> manifest
> > > file. It turns out that the maven-bundle-plugin copies the
> 'description'
> > > section from the pom into the generated MANIFEST.MF. So that
> description
> > > better be on one line. If you are like me and habitually format each
> and
> > >
> > > every file before saving - strg-shift-F in eclipse - that restriction
> > > easily
> > > gets violated. I therefore made it a habit to include the description
> in
> > > a
> > > CDATA-section. Same goes for the 'Include-Resource' instruction.
> >
> >
> FYI, I've fixed the description problem in trunk under the following
> issue:
> 
>    https://issues.apache.org/jira/browse/FELIX-403
> 
> the Include-Resource problem was already fixed in the latest snapshot
> 
> --
> Cheers, Stuart


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: [maven-bundle-plugin] Linebreaks in description element can lead to invalid manifest header

Posted by Stuart McCulloch <st...@jayway.net>.
On 17/10/2007, Stuart McCulloch <st...@jayway.net> wrote:
>
> On 17/10/2007, Olaf Bergner <ol...@gmx.de> wrote:
> >
> > Sometimes I left a perfectly running build to do some cosmetic work in
> > the
> > projects that produce my osgi wrapper bundles for external libraries,
> > using
> > the maven-bundle-plugin. Getting back to the real stuff I fired up maven
> >
> > only to see my build fail with a compilation error, although I didn't
> > touch
> > any 'real' code. Eventually, I found out that the compilation failure
> > was
> > caused by an invalid header in one of my osgi wrapper bundle's manifest
> > file. It turns out that the maven-bundle-plugin copies the 'description'
> > section from the pom into the generated MANIFEST.MF. So that description
> > better be on one line. If you are like me and habitually format each and
> >
> > every file before saving - strg-shift-F in eclipse - that restriction
> > easily
> > gets violated. I therefore made it a habit to include the description in
> > a
> > CDATA-section. Same goes for the 'Include-Resource' instruction.
>
>
FYI, I've fixed the description problem in trunk under the following issue:

   https://issues.apache.org/jira/browse/FELIX-403

the Include-Resource problem was already fixed in the latest snapshot

-- 
Cheers, Stuart

Re: [maven-bundle-plugin] Linebreaks in description element can lead to invalid manifest header

Posted by Stuart McCulloch <st...@jayway.net>.
On 17/10/2007, Olaf Bergner <ol...@gmx.de> wrote:
>
> Sometimes I left a perfectly running build to do some cosmetic work in the
> projects that produce my osgi wrapper bundles for external libraries,
> using
> the maven-bundle-plugin. Getting back to the real stuff I fired up maven
> only to see my build fail with a compilation error, although I didn't
> touch
> any 'real' code. Eventually, I found out that the compilation failure was
> caused by an invalid header in one of my osgi wrapper bundle's manifest
> file. It turns out that the maven-bundle-plugin copies the 'description'
> section from the pom into the generated MANIFEST.MF. So that description
> better be on one line. If you are like me and habitually format each and
> every file before saving - strg-shift-F in eclipse - that restriction
> easily
> gets violated. I therefore made it a habit to include the description in a
> CDATA-section. Same goes for the 'Include-Resource' instruction.


Hi Olaf - which version of the bundleplugin are you using?

the latest code in 1.1.0-SNAPSHOT should already handle and fix line breaks
in Include-Resource, although I'm not sure if it also fixes the description
field.

I wonder whether this warrants a bug report, i.e. 'Remove linebreaks in
> those elements that are copied to the generated manifest file'?


if you can recreate this using the 1.1.0-SNAPSHOT build from
apache-snapshots
(or build the plugin from source) then please open an issue on JIRA and
attach
your example POM

Cheers,
> Olaf
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Cheers, Stuart