Skip to content
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

#241 Update dependency Spring to version 6.x #242

Closed

Conversation

mawiesne
Copy link
Contributor

  • updates Spring dependencies to version 6.0.13
  • adds necessary references to spring-context in wikimachine pom.xml
  • removes reference to XmlBeanFactory in SpringFactory as this interface was long-time deprecated and removed in Spring 6.x

@mawiesne mawiesne requested review from rzo1 and reckart October 26, 2023 08:42
Copy link
Contributor

@rzo1 rzo1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spring 6 requires a Java 17 baseline, so we need to remove Java 11 from the GitHub runners and upgrade compile level to 17.

@mawiesne mawiesne force-pushed the #241-update-dependency-Spring-to-version-6.x branch from 4b654be to 4cec791 Compare October 27, 2023 05:36
@mawiesne mawiesne requested a review from rzo1 October 27, 2023 05:37
@mawiesne mawiesne modified the milestones: 1.2.0, 2.0.0 Oct 29, 2023
@mawiesne mawiesne self-assigned this Oct 29, 2023
@mawiesne mawiesne added the dependencies Pull requests that update a dependency file label Oct 29, 2023
@mawiesne
Copy link
Contributor Author

mawiesne commented Oct 30, 2023

Spring 6 requires a Java 17 baseline, so we need to remove Java 11 from the GitHub runners and upgrade compile level to 17.

@rzo1 According to https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-release.html we can set 11 as the release argument and the class files should become cross-compiled to be compliant with JRE 11 envs.

I, therefore, don't quite understand why the JRE 11 runner did complain. Further investigation required, I guess?

EDIT:
From what I understood:
Spring 6.x has set it's release target to 17 and their classes won't work in an 11 environment at runtime as the class version mismatches.

@rzo1
Copy link
Contributor

rzo1 commented Oct 30, 2023

Spring 6.x has set it's release target to 17 and their classes won't work in an 11 environment at runtime as the class version mismatches.

Yes - and that is the reason, why we can't stay with Java 11, if we want to use Spring 6 :-)

@reckart
Copy link
Member

reckart commented Oct 30, 2023

DKPro Core Parent POM 30 sets the relevant target/source/release Maven properties to 11.

@mawiesne
Copy link
Contributor Author

@reckart
Copy link
Member

reckart commented Oct 30, 2023

If you want to override them, use:

<properties>
    <maven.compiler.target>17</maven.compiler.target>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.release>17</maven.compiler.release>
</properties>

@mawiesne
Copy link
Contributor Author

If you want to override them, use:

Would move JWPL users / community to 17+ Java environments "by force".
Personally, I'd be fine with 17 as minimal / release level.

If you (all) agree, we can go with this direction.

@rzo1
Copy link
Contributor

rzo1 commented Oct 30, 2023

They are forced to Java 17 anyway, if they want proper Jakarta namespace support in Spring (and don't want to rely on custom Spring 5 shade madness). So I am +1 for moving to Java 17 with 2.0.0

@rzo1
Copy link
Contributor

rzo1 commented Oct 30, 2023

Alternative approach (but might be inconsistent):

  • Override for wikimachine only and document accordingly. :)

But I would be in favour for Java 17+ only ;-)

@mawiesne mawiesne force-pushed the #241-update-dependency-Spring-to-version-6.x branch 2 times, most recently from 4cec791 to 125125f Compare October 30, 2023 12:11
- sets the compiler level to `17` to comply with Spring 6.x requirements
- updates Spring dependencies to version 6.0.13
- adds necessary references to `spring-context` in wikimachine pom.xml
- removes reference to `XmlBeanFactory` in `SpringFactory` as this interface was long-time deprecated and removed in Spring 6.x
@mawiesne mawiesne force-pushed the #241-update-dependency-Spring-to-version-6.x branch from 125125f to 6b86cac Compare October 30, 2023 12:13
@mawiesne mawiesne closed this Oct 30, 2023
@mawiesne mawiesne deleted the #241-update-dependency-Spring-to-version-6.x branch October 30, 2023 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants