Manifest in exploded osgi bundle is not migrated · Issue #32 · apache/tomcat-jakartaee-migration · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manifest in exploded osgi bundle is not migrated #32

Closed
wmccusker opened this issue Aug 19, 2022 · 0 comments · Fixed by #33
Closed

Manifest in exploded osgi bundle is not migrated #32

wmccusker opened this issue Aug 19, 2022 · 0 comments · Fixed by #33

Comments

@wmccusker
Copy link
Contributor

Hi,

When running the migration on a war file that contains an exploded osgi bundle the class files and jar files within the exploded bundle are migrated but the manifest file is not.

An example of the war archive layout with an exploded osgi bundle could be

WEB-INF/
WEB-INF/bundles/
WEB-INF/bundles/com.example.service/
WEB-INF/bundles/com.example.service/META-INF/
WEB-INF/bundles/com.example.service/META-INF/MANIFEST.MF <--- not migrated
WEB-INF/bundles/com.example.service/lib/
WEB-INF/bundles/com.example.service/lib/com.example.code.jar <--- migrated

For bundles that are not exploded, the manifest along with classes and jar files inside the bundle are all migrated

WEB-INF/
WEB-INF/bundles/
WEB-INF/bundles/com.example.service.jar <--- everything is migrated

From looking at the code of the class org.apache.tomcat.jakartaee.ManifestConverter the issue appears to be that the check for migrating a manifest will only work when the manifest file is at the root of an archive because it expects to find the parent folder name in the entry name, e.g. "META-INF/MANIFEST.MF", but when running on an exploded artifact then the file name for the entry will be a path inside the parent archive, e.g. "WEB-INF/bundles/com.example.service/META-INF/MANIFEST.MF" from the example above.

@aooohan aooohan linked a pull request Aug 26, 2022 that will close this issue
markt-asf pushed a commit that referenced this issue Sep 6, 2022
Check if file name ends with manifest name

Support migration of manifest files in exploded archives
DanielThomas pushed a commit to DanielThomas/tomcat-jakartaee-migration that referenced this issue Oct 24, 2022
Check if file name ends with manifest name

Support migration of manifest files in exploded archives
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant