-
Notifications
You must be signed in to change notification settings - Fork 46
Java repackage #145
Java repackage #145
Conversation
fickludd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused - when we tried the java-adapter strategy before it didn't seem to work, and I'm not seeing anything different here that would explain why it now works. Could you explain to me what changed? Also I don't think we every made the adapter solve the java 8 dep - I thought requiring java >= 1.8 would not be satisfied by java = 11, because major versions are not backwards compatible.
|
I've added some tests which create a local yum repository of cypher-shell within a docker container. They preinstall a java version and then test installing cypher-shell to see if it decides to install a java dependency. I haven't got tests for oracle javas because there doesn't seem to be a public yum repository for it. I thought java11 wasn't properly backwards compatible as well, but it seems to work if we specify I decided to revisit the java adapter package type solution because I really don't like the idea of releasing a different neo4j for each java type, which is what we'd end up doing if we stuck with the cypher-shell openjava11/java11/java8 solution. |
Java adapter, plus cypher-shell requirement "jre >= 1.8" makes cypher-shell compatible with java8 and java11 in both openjdk and oracle flavours.
I don't expect it will need updating often, so version numbers will need manually changing.
…itory still need to use this to create tests for the java adapter and/or cypher-shell
fickludd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a much cleaner solution, nice. I don't have the tooling or knowledge currently to verify that this works, but as you've tested it (irl discussion) I'm going to approve anyway.
| out/$(rpmfile) \ | ||
| packaging/test/java-adapter/tempneo4j.repo \ | ||
| packaging/test/java-adapter/Dockerfile \ | ||
| packaging/test/java-adapter/entrypoint.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much nicer!
Added a new package
neo4j-java-adapter(name changable if you think it's needed).So now instead of having 3 separate
cypher-shellrpm builds we have one.The workaround is to create an empty java meta-package which depends on
jre-11and providesjre = 11so that oracle java, and openjdk java both provide the same package name. As a bonus, making cypher-shell requirejre >= 1.8means thatjre = 11satisfies that dependency so we can make cypher-shell java 8 and java 11 compatible without extra effort (yay 🎉).