-
Notifications
You must be signed in to change notification settings - Fork 9
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
exificient-grammars pulls in xercesImpl #11
Comments
Let me check more closely the implications... Is the main issue for this request
|
The main issue is the surprise presence of another JAXP implementation being present in OSGi environment -- where class resolution works differently from usual the single-classloader world. This is reported downstream in https://jira.opendaylight.org/browse/CONTROLLER-1867 and while we will fix it downstream, it would be nice if we could just use exificient-grammars without this surprise. |
FYI: with this change the Having said that, I think this might be the only issue. |
I played a bit around with the Apache Shade Plugin and created a dedicated branch (see https://github.com/EXIficient/exificient-grammars/tree/xerces-shade). It kind of works for Moreover, I think the idea is to not just relocating packages but also eliminating code that is not needed, correct? I fail doing so. @rovarga do you have used this plugin before? Feel free to provide input on the newly created branch. When it comes to |
Note: Yet another solution could be to do what Sun did by creating its own packages My feeling is that using the shade plugin may cause other issues. |
@rovarga what do you think about the latest proposal? |
exificient-grammars is pulling in xercesImpl, which is a full JAXP implementation, where it only needs a few implementation packages (org.apache.xerces.impl.xs, org.apache.xerces.xs, org.apache.xerces.xni).
This has the downside of requiring users to deal with multiple implementations being present on the classpath and also increasing footprint significantly.
It would be much better if exificient had its own jar containing relocated parts of xercesImpl and relied on that rather than coupling it with complete xercesImpl. That way those classes become an implementation detail without interfering with other classpath tenants. One possibility would be to use https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html to directly embed those pieces inside exificient-grammars.
The text was updated successfully, but these errors were encountered: