-
Notifications
You must be signed in to change notification settings - Fork 63
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
Relocate dependencies #6020
Relocate dependencies #6020
Conversation
ed89a5f
to
0e4a1fb
Compare
@thomaslow would you mind taking a look at this? I know you said you would not have time to do reviews for Kitodo at the moment we last talked, but since this is a smaller PR concerning a topic you have already invested some time investigating I think you'd be the best suited for this and perhaps might do an exception? |
3472e96
to
5949616
Compare
Hi Henning, Arved asked me to review your pull request, because I previously experimented with upgrading Kitodo-Production to Java 17 and Tomcat 10. I do have a preliminary branch that allows to start Kitodo-Production with Java 17 and Tomcat 10 (untested unit and integration tests). However, I mixed changes related to Java 17 and Tomcat 10. I don't know which of those changes can be applied safely for Java 17 while keeping backwards compatibility to Java 11. Anyway, I found this Eclipse reference that lists all Maven Package changes to the Jakarta-Namespace. Maybe you find that helpful. |
@thomaslow : thanks for your input and your link which should be helpful. This pull request is independent of the Java 11-> 17 and Tomcat 9 -> 10 issue but is part of it. My approach was the following: step one: update / relocate all the dependencies which can be moved to the new groupId and / or arctifactId where the development of the dependencies is going on which must be done time by time. Step 3 and 4 can maybe switched but it is even possible that the javax to jakarta migration need even the Java 11 to 17 update if one or more dependencies made trouble. I did myself an approach for the javax to jakarta migration (see master...slub:kitodo-production:javax_to_jakarta) but I'm got some issues with Hibernate and I stopped the migration at this point as Matthias is doing the Hibernate Search integration right now and I don't want to made him more work to integrate my javax -> jakarta changes into his work. |
6bd752c
to
2d3937b
Compare
2d3937b
to
4bffd55
Compare
Hi Henning, are you still working on these changes or do you force-push your commits to be up-to-date with master? |
If I'm working on this this pull request would not visible or on draft mode. I'm only refreshing all my pull request after changes on the main / master branch to keep them up to date. |
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 tested your changes on a local deployment of kitodo-production and could not observe any problems.
A minor note is that the change from javax.xml.bind:jaxb-api:2.3.1
to jakarta.xml.bind-api:2.3.3
is actually not making any difference in the final war file. The resolved dependencies are the same. The old javax.xml.bind:jaxb-api:2.3.1
is still included indirectly via hibernate-core:5.6.10.Final
. The newer dependency jakarta.xml.bind-api:2.3.3
was already included before via org.glassfish.jaxb:jaxb-runtime:2.3.6
.
Technically, having two jar files in the classpath that provide the same files for the same namespace (javax.xml.bind
) is not a good idea.
You could try to fix that by specifically excluding the old dependency javax.xml.bind:jaxb-api:2.3.1
from the hibernate pom import. Of course, that would assume hibernate is compatible with the newer version.
Personally, I would leave it as is. It seems to have worked fine for a long time already.
Thanks for hinting this out @thomaslow ! I will try to adjust this PR als dublicated / similar jar files are bad (jaxb-api) and if a dependency is already provided by an other this is not needed (even Maven is not using it). |
@thomaslow : I updated my PR according to your suggestions. If one or both additional commits are not wanted I would remove them. |
Your exclusion rule for I'm not sure whether the explicit pom dependency declaration for The recommended strategy of the official @solth What do you think? |
22b9f60
to
cb6f002
Compare
cb6f002
to
bbf70a2
Compare
Updating |
bbf70a2
to
f46777d
Compare
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 think this PR can be merged.
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.
Looks good, just one small remark, see below.
@@ -220,11 +219,6 @@ | |||
</dependency> | |||
<!-- Include jaxb runtime dependencies which have been removed |
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.
Do we still need this comment when the corresponding dependency is removed?
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 don't know if this comment is only for the direct following mentioned dependency or more. I can remove it if you want.
Thanks a lot for the explanation @thomaslow I understand that both approaches have their advantages (streamlining pom files vs. explicit dependencies for directly used packages and classes) and would agree with you that we should stick with keeping those dependencies in the pom file, especially when this is an officially recommended strategy. |
@solth : Did I understand you correct, that I should revert my commit f46777d in total? If so then your commenting is obsolete or? |
@henning-gerhardt yes, please revert that commit. |
f46777d
to
cf48416
Compare
Done. I must rebase the branch in any way. |
cf48416
to
19f0f53
Compare
19f0f53
to
710e89b
Compare
Relocate some XML based dependencies as needed for switch to Java 17 and Jakarta support without changing existing code.