Skip to content

fix(karaf-maven-plugin): handle KAR files in features-generate-descriptor (4.4.x)#2577

Merged
jbonofre merged 1 commit into
apache:karaf-4.4.xfrom
jbonofre:fix/kar-features-generate-descriptor
Apr 24, 2026
Merged

fix(karaf-maven-plugin): handle KAR files in features-generate-descriptor (4.4.x)#2577
jbonofre merged 1 commit into
apache:karaf-4.4.xfrom
jbonofre:fix/kar-features-generate-descriptor

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.
@jbonofre

Copy link
Copy Markdown
Member Author

@holgerfriedrich that should fix the issue you have with karaf-maven-plugin 4.4.11. That's my bad 🥲

Do you mind to test that before I merge (and release)?

@jbonofre

Copy link
Copy Markdown
Member Author

The fix has been verified (and approved) by @holgerfriedrich in #2578

@jbonofre jbonofre merged commit 36236aa into apache:karaf-4.4.x Apr 24, 2026
11 of 12 checks passed
@jbonofre jbonofre deleted the fix/kar-features-generate-descriptor branch April 24, 2026 14:27
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.

1 participant