Skip to content

fix(karaf-maven-plugin): handle KAR files in features-generate-descritor#2578

Merged
jbonofre merged 1 commit into
apache:mainfrom
jbonofre:fix/kar-features-generate-descriptor-main
Apr 24, 2026
Merged

fix(karaf-maven-plugin): handle KAR files in features-generate-descritor#2578
jbonofre merged 1 commit into
apache:mainfrom
jbonofre:fix/kar-features-generate-descriptor-main

Conversation

@jbonofre

Copy link
Copy Markdown
Member

Commit 9afa648 removed the FEATURE_CLASSIFIER guard in processFeatureArtifact, causing .kar artifacts to enter the feature processing branch. Since a KAR is a ZIP archive, JaxbUtil.unmarshal() failed with "Content is not allowed in prolog" when trying to parse it as raw XML.

Fix readFeaturesFile() to detect .kar files and extract their embedded features XML entries from the repository/ directory inside the archive, merging them into a single Features object.

…ptor

Commit 9afa648 removed the FEATURE_CLASSIFIER guard in
processFeatureArtifact, causing .kar artifacts to enter the feature
processing branch. Since a KAR is a ZIP archive, JaxbUtil.unmarshal()
failed with "Content is not allowed in prolog" when trying to parse it
as raw XML.

Fix readFeaturesFile() to detect .kar files and extract their embedded
features XML entries from the repository/ directory inside the archive,
merging them into a single Features object.

@holgerfriedrich holgerfriedrich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested with my app on top of Karaf: cancelled rc0 fails, with this PR completes the build completes

@jbonofre jbonofre merged commit c98092e into apache:main Apr 24, 2026
16 of 18 checks passed
@jbonofre jbonofre deleted the fix/kar-features-generate-descriptor-main branch April 24, 2026 12:29
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 this pull request may close these issues.

2 participants