-
Notifications
You must be signed in to change notification settings - Fork 113
Modularize project #244
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
Modularize project #244
Conversation
@oliemansm
Then i end up with this: If i understood your point correctly, you said that servlet is the "leaf project", meaning projects will only add and use this as dependency, then it shouldn't matter whatever that project is using further down. The bnd file change fixes this issue |
I don't get that... graphql-java-servlet is a multi-module gradle project consisting of two modules. That's because the kickstart module contains some shared code that's used by other libraries too. the graphql-java-servlet module does not contain a On another note... The main issue is that these project don't play nice in a Java 9 modular setup and the idea is to make it compatible with it so it can be used in those projects. However the way it's being made compatible now is by upgrading the entire thing to Java 9 making it incompatible with anyone still using Java 8. Java 8 is still the most widely used version of Java today, so we can't make this library incompatible with that. |
You are correct here, the graphql-java-servlet does indeed NOT contain the graphql.kickstart.execution package, but even so... it does copy this package into the output jar. As for java 8 compatibility i will look into a solution for this. |
Nice catch for the bnd module! That's something specific for OSGi (which I don't use myself). I'm actually not sure if that's an error in the configuration or not, but it does sound like it. |
Hi @IceBlizz6. Did you find any time to look into that Java 8 plugin solution to make it backwards compatible? |
@IceBlizz6 There have been some updates to the bnd configuration too in the meantime. Does the latest released version of this library still cause problems with modularized projects requiring these changes or is this no longer relevant? |
@IceBlizz6 Is this still necessary? |
We are not using this project anymore, |
Now introducing java modules.
As for the bnd change i'm not sure if this was the right way to do it.
The main goal was to avoid graphql-java-servlet to include execution packages into the jar, if there is a better way to do this then please let me know.
Any project that references graphql-java-servlet will also end up with graphql-java-kickstart, even though they dont reference this directly.
graphql-java-servlet has all packages that are also in graphql-java-kickstart, this creates a split package for the maven project that tries to reference them.
The error ends up as:
java.lang.module.ResolutionException: Module graphql.kickstart.servlet contains package graphql.kickstart.execution.error, module graphql.kickstart.execution exports package graphql.kickstart.execution.error to graphql.kickstart.servlet
By excluding execution packages from servlet jar this error is avoided.