open-eid / digidoc4j

DigiDoc for Java. Javadoc:
http://open-eid.github.io/digidoc4j
GNU Lesser General Public License v2.1
72 stars 40 forks source link

Support JakartaEE 9+ #117

Closed morvael closed 5 months ago

morvael commented 1 year ago

Currently the library is depending on old JakartaEE 8 APIs (javax packages) instead of newer 9+ APIs (jakarta packages). Please make a version using newer standards.

martinounap commented 11 months ago

Hi

Could we upgrade digidoc4j to use jakarta. Right now it is impossible move to Spring Boot 3.0. https://spring.io/blog/2022/05/24/preparing-for-spring-boot-3-0#check-if-third-party-projects-have-jakarta-ee-9-compatible-releases

Spring Boot 2 EOL is on 18 Nov 2023. So what we do next?

morvael commented 11 months ago

I guess if someone really needs it there is the option to use Eclipse Transformer or even cloning the project and changing things (for example by incorporating Transformer Maven plugin to produce artifacts with Jakarta classifier). But I think the maintainers of this should add it in the first place.

morvael commented 11 months ago

I can confirm transformer approach works, though is pita because one needs to manually exclude wrong dependencies in correct places and add jakarta-ized versions by hand (they may need exclusions as well). Depends really on how restrictive dependency environment you have. My project is checking for duplicate dependencies and duplicate classes on classpath, so I need all this sorted out completely.

naare commented 11 months ago

Hello, We are looking into how to solve it and how to proceed. Digidoc4j depends heavily on DSS library which needs to be updated as well. This update was on DSS roadmap but we have not yet seen the results regarding the update. In addition, we are supporting Java 8 so this complicates the solution even further.

morvael commented 11 months ago

You can keep JavaEE compatible sources and automate generating -jakarta classifier binary jar using maven plugin. It's really simple. Not sure how to fix dependencies though, classifier is not transitive, so multi-jar libraries are harder to make jakarta versions for. As in the jars are there but wrong one is pulled. And yes, I had to transform DSS library jars mostly.

majorans commented 8 months ago

DSS 6.0 with Jakarta has been released: https://github.com/esig/dss/pull/165 Now waiting for digidoc4j update. When we could expect release this year?

naare commented 8 months ago

We are working on merging the DSS 6.0. The release of DD4J 5.3.0 is planned in Q1 2024.

ErkoRisthein commented 7 months ago

Any updates on this? Spring Boot 2.7 is EOL and digidoc4j 5.2.0 is blocking our migration to Spring Boot 3.

heititobi commented 5 months ago

DD4J 5.3.0 with Jakarta namespace is released and can be used in Spring Boot 3 applications.

For older DD4J versions there is an example in wiki - https://github.com/open-eid/digidoc4j/wiki/Questions-&-Answers#use-digidoc4j-in-spring-boot-3-application.