You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Brian Demers (Jira)" <ji...@apache.org> on 2023/03/23 16:00:00 UTC
[jira] [Created] (FELIX-6603) Rebuilding Manifest generates different content
Brian Demers created FELIX-6603:
-----------------------------------
Summary: Rebuilding Manifest generates different content
Key: FELIX-6603
URL: https://issues.apache.org/jira/browse/FELIX-6603
Project: Felix
Issue Type: Bug
Components: Maven Bundle Plugin
Reporter: Brian Demers
I have a project that uses the bundle plugin's `manifest` goal. (version 5.1.8)
https://github.com/jwtk/jjwt/blob/27b3caba80d653227d271d9ff8e474314f00b9e0/pom.xml#L595-L613
If I run a clean build `mvn clean verify` and then run `mvn verify`, the second run generates different content in the manifest.
In my case, a new header is added: `Originally-Created-By`
And both `Export-Package` and `Import-Package` have different values:
```diff
< Export-Package: io.jsonwebtoken;uses:="io.jsonwebtoken.io,io.jsonwebtoke
< n.lang,io.jsonwebtoken.security,javax.crypto";version="0.11.6",io.jsonw
< ebtoken.security;uses:="io.jsonwebtoken,io.jsonwebtoken.io,io.jsonwebto
< ken.lang,javax.crypto,javax.security.auth";version="0.11.6",io.jsonwebt
< oken.io;uses:="io.jsonwebtoken";version="0.11.6",io.jsonwebtoken.lang;v
---
> Export-Package: io.jsonwebtoken;version="0.11.6";uses:="io.jsonwebtoken.
> io,io.jsonwebtoken.lang,io.jsonwebtoken.security,javax.crypto",io.jsonw
> ebtoken.security;version="0.11.6";uses:="io.jsonwebtoken,io.jsonwebtoke
> n.io,io.jsonwebtoken.lang,javax.crypto,javax.security.auth",io.jsonwebt
> oken.io;version="0.11.6";uses:="io.jsonwebtoken",io.jsonwebtoken.lang;v
20,22c20,23
< Import-Package: io.jsonwebtoken,io.jsonwebtoken.io,io.jsonwebtoken.lang,
< io.jsonwebtoken.security,javax.crypto,javax.crypto.spec,javax.security.
< auth
---
> Import-Package: io.jsonwebtoken;version="[0.11,1)",io.jsonwebtoken.io;ve
> rsion="[0.11,1)",io.jsonwebtoken.lang;version="[0.11,1)",io.jsonwebtoke
> n.security;version="[0.11,1)",javax.crypto,javax.crypto.spec,javax.secu
> rity.auth
```
NOTE: The clean build's `Import-Package` value does NOT contain any versions. and the `Export-Package` looks to be in a different order.
Ideally, rerunning the `manifest` goal should produce exactly the same results (assuming no files have changed)
A quick and dirty fix for this is to use the maven-clean-plugin, to delete the previously generated manifest. This is not ideal and may not work in all scenarios.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)