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

Binding Customizations errors when using Episode #1099

Closed
Tomas-Kraus opened this issue Jun 10, 2016 · 5 comments · Fixed by #1746
Closed

Binding Customizations errors when using Episode #1099

Tomas-Kraus opened this issue Jun 10, 2016 · 5 comments · Fixed by #1746

Comments

@Tomas-Kraus
Copy link
Member

When using the "episode" mechanism, all plugin customization elements directly embedded in XSD files referenced via the "episode" currently cause the error message "Compiler was unable to honor the ... customization.", regardless whether the respective plugin is actually activated or not.
Expected behavior would be to either ignore all customizations in referenced XSDs listed in the episode, or to make them available to activated plugins in the downstream module.

Environment

Java 1.7, JAXB 2.2.11

Affected Versions

[2.2.11]

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
Reported by flutter

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
Was assigned to yaroska

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
snilloc.bor said:
This bug is annoying and it definitely should be fixed.

I have implemented a workaround that solves my current situation, and want to share it with others that might be bumping up against this bug.

Workaround:
I have added a step in the build during the prepare-package step of the maven lifecycle to execute the maven-replacer-plugin to remove (replace with empty) the jaxb:extensionBindingPrefixes attribute from the XSD files before they are packaged in the jar. In this way, when the XSD is imported in a downstream module (via the episode mechanism), the previously-processed customizations in the imported schema are not seen by xjc, thus side-stepping the bug.

This workaround is not suitable if the jaxb:extensionBindingPrefixes is needed by a consumer of the schema file from the packaged jar file for some other reason.

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAXB-1099

@Tomas-Kraus
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants