You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by asookazian <as...@gmail.com> on 2014/11/19 05:42:07 UTC

hard wrap in manifest.mf by maven-bundle-plugin

We're using the maven-bundle-plugin for Karaf bundles.  I noticed today that
there is a hard-wrap at column 71 in the generated manifest.mf.  For the
<Bundle-Name> value, this is causing a problem b/c there is a variable at
column 71 (#build.date#) that is being cut in half (half on line X and other
half on line X+1) which is causing an ant task <replace> to fail b/c there
is a space at the beginning on the 2nd line:

Bundle-Name: Foo :: Bar :: Baz (build: 14448.#build.d
 ate#)

Is there a way to instruct/config maven-bundle-plugin to wrap at column
71+X?  thus the build.date variable which is dynamically substituted would
not be broken in half and the replace would succeed?  thx.



--
View this message in context: http://apache-felix.18485.x6.nabble.com/hard-wrap-in-manifest-mf-by-maven-bundle-plugin-tp5010553.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

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


Re: hard wrap in manifest.mf by maven-bundle-plugin

Posted by Felix Meschberger <fm...@adobe.com>.
Hi

I am not even sure, whether it is the bundle plugin itself doing this. But in any case, I seem to remember that this is how Manifest.MF files are specified: There has to be a line break at this column and the continuation line has to be indented by a single character.

You might want to think about how to properly read the Manifest.MF file in ant.

Regards
Felix

> Am 19.11.2014 um 05:42 schrieb asookazian <as...@gmail.com>:
> 
> We're using the maven-bundle-plugin for Karaf bundles.  I noticed today that
> there is a hard-wrap at column 71 in the generated manifest.mf.  For the
> <Bundle-Name> value, this is causing a problem b/c there is a variable at
> column 71 (#build.date#) that is being cut in half (half on line X and other
> half on line X+1) which is causing an ant task <replace> to fail b/c there
> is a space at the beginning on the 2nd line:
> 
> Bundle-Name: Foo :: Bar :: Baz (build: 14448.#build.d
> ate#)
> 
> Is there a way to instruct/config maven-bundle-plugin to wrap at column
> 71+X?  thus the build.date variable which is dynamically substituted would
> not be broken in half and the replace would succeed?  thx.
> 
> 
> 
> --
> View this message in context: http://apache-felix.18485.x6.nabble.com/hard-wrap-in-manifest-mf-by-maven-bundle-plugin-tp5010553.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 


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


Re: hard wrap in manifest.mf by maven-bundle-plugin

Posted by Felix Meschberger <fm...@adobe.com>.
Hi

The Maven Build Number plugin might be of help.

Regards
Felix

> Am 19.11.2014 um 18:56 schrieb asookazian <as...@gmail.com>:
> 
> we want to encode the build-date in the build/version for the <Bundle-Name>
> and that is obviously a variable that must be post-processed...
> 
> unless there is a better way (i.e. have maven-bundle-plugin set this
> variable?)
> 
> 
> 
> --
> View this message in context: http://apache-felix.18485.x6.nabble.com/hard-wrap-in-manifest-mf-by-maven-bundle-plugin-tp5010553p5010570.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 


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


Re: hard wrap in manifest.mf by maven-bundle-plugin

Posted by asookazian <as...@gmail.com>.
we want to encode the build-date in the build/version for the <Bundle-Name>
and that is obviously a variable that must be post-processed...

unless there is a better way (i.e. have maven-bundle-plugin set this
variable?)



--
View this message in context: http://apache-felix.18485.x6.nabble.com/hard-wrap-in-manifest-mf-by-maven-bundle-plugin-tp5010553p5010570.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

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


Re: hard wrap in manifest.mf by maven-bundle-plugin

Posted by Stuart McCulloch <mc...@gmail.com>.
The manifest line limit is imposed by the JAR specification: 

https://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#Notes_on_Manifest_and_Signature_Files

"No line may be longer than 72 bytes (not characters), in its UTF8-encoded form. If a value would make the initial line longer than this, it should be continued on extra lines (each starting with a single SPACE)." 

Why do you need to post-process the manifest using Ant and what are you replacing? It should be possible to perform most manifest customisations using bnd instructions.

-- 
Cheers, Stuart


On Wednesday, 19 November 2014 at 04:42, asookazian wrote:

> We're using the maven-bundle-plugin for Karaf bundles. I noticed today that
> there is a hard-wrap at column 71 in the generated manifest.mf. For the
> <Bundle-Name> value, this is causing a problem b/c there is a variable at
> column 71 (#build.date#) that is being cut in half (half on line X and other
> half on line X+1) which is causing an ant task <replace> to fail b/c there
> is a space at the beginning on the 2nd line:
> 
> Bundle-Name: Foo :: Bar :: Baz (build: 14448.#build.d
> ate#)
> 
> Is there a way to instruct/config maven-bundle-plugin to wrap at column
> 71+X? thus the build.date variable which is dynamically substituted would
> not be broken in half and the replace would succeed? thx.
> 
> 
> 
> --
> View this message in context: http://apache-felix.18485.x6.nabble.com/hard-wrap-in-manifest-mf-by-maven-bundle-plugin-tp5010553.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com (http://Nabble.com).
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org (mailto:users-unsubscribe@felix.apache.org)
> For additional commands, e-mail: users-help@felix.apache.org (mailto:users-help@felix.apache.org)
> 
>