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

[MNG-7743] Make the build work on JDK 20 #1065

Merged
merged 5 commits into from
May 16, 2023

Conversation

psiroky
Copy link
Contributor

@psiroky psiroky commented Mar 18, 2023

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MNG-XXX] SUMMARY,
    where you replace MNG-XXX and SUMMARY with the appropriate JIRA issue.
  • Also format the first line of the commit message like [MNG-XXX] SUMMARY.
    Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the Core IT successfully.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

 * the behaviour before the fix was already pretty confusing. JDK 19 and
   older do not check the presense of '{' in the constructor, so the
   URL object got created, but when converting to file the result would
   be e.g. '/../../src/test/remote-repo' which is completely wrong.
   But it seems the affected tests did not really care, as all of them
   were passing
} catch (MalformedURLException e) {
throw new IllegalStateException(e);
String repositoryUrl = repository.getUrl();
if (repositoryUrl.contains("${")) {
Copy link
Contributor Author

@psiroky psiroky Mar 18, 2023

Choose a reason for hiding this comment

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

This is somewhat ugly, but I haven't really found a better way at this point (without some major changes in how the TestRepositoryConnector is being used}.

Basically either the TestRepositoryConnector would need to resolve the properties in the URL, or the constructor would have to be called with a RemoteRepository object which already has these resolved.

The single test that was failing (ProjectBuilderTest.testLocationTrackingResolution) does not really care about the location as far as I can tell.

@gnodet gnodet added this to the 4.0.0-alpha-6 milestone May 16, 2023
@gnodet gnodet merged commit 59342ce into apache:master May 16, 2023
@slachiewicz
Copy link
Member

If you have some time would be good to backport it also

gnodet pushed a commit that referenced this pull request May 16, 2023
* [MNG-7743] Make the build work on JDK 20

 * the behaviour before the fix was already pretty confusing. JDK 19 and
   older do not check the presense of '{' in the constructor, so the
   URL object got created, but when converting to file the result would
   be e.g. '/../../src/test/remote-repo' which is completely wrong.
   But it seems the affected tests did not really care, as all of them
   were passing

* Remove forgotten println

Co-authored-by: Yeikel <email@yeikel.com>

* Test with latest JDK

* Do not run ITs with jdk 20, but just the "build itself"

---------

Co-authored-by: Yeikel <email@yeikel.com>
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
# Conflicts:
#	.github/workflows/maven_build_itself.yml
#	maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java
@gnodet
Copy link
Contributor

gnodet commented May 16, 2023

Backported. Note that the build is broken on JDK 21 due to an incompatibility in spotless.

@gnodet gnodet mentioned this pull request May 24, 2023
dongjoon-hyun added a commit to apache/orc that referenced this pull request Sep 11, 2023
### What changes were proposed in this pull request?

This PR aims to upgrade Maven to 3.9.4.

### Why are the changes needed?

Apache Maven community starts to test Java 20 officially. Although this is only about a test coverage, we had better adopt it because 3.8.x is not tested officially by Apache Maven community.
- https://issues.apache.org/jira/browse/MNG-7743
- apache/maven#1065

Here are the release notes.
- https://maven.apache.org/docs/3.9.0/release-notes.html
- https://maven.apache.org/docs/3.9.1/release-notes.html
- https://maven.apache.org/docs/3.9.2/release-notes.html
- https://maven.apache.org/docs/3.9.3/release-notes.html
- https://maven.apache.org/docs/3.9.4/release-notes.html

### How was this patch tested?

Pass the CIs with Java 21 EA build

Closes #1612 from dongjoon-hyun/ORC-1502.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
dongjoon-hyun added a commit to apache/orc that referenced this pull request Sep 11, 2023
This PR aims to upgrade Maven to 3.9.4.

Apache Maven community starts to test Java 20 officially. Although this is only about a test coverage, we had better adopt it because 3.8.x is not tested officially by Apache Maven community.
- https://issues.apache.org/jira/browse/MNG-7743
- apache/maven#1065

Here are the release notes.
- https://maven.apache.org/docs/3.9.0/release-notes.html
- https://maven.apache.org/docs/3.9.1/release-notes.html
- https://maven.apache.org/docs/3.9.2/release-notes.html
- https://maven.apache.org/docs/3.9.3/release-notes.html
- https://maven.apache.org/docs/3.9.4/release-notes.html

Pass the CIs with Java 21 EA build

Closes #1612 from dongjoon-hyun/ORC-1502.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 20345a2)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
cxzl25 pushed a commit to cxzl25/orc that referenced this pull request Jan 11, 2024
### What changes were proposed in this pull request?

This PR aims to upgrade Maven to 3.9.4.

### Why are the changes needed?

Apache Maven community starts to test Java 20 officially. Although this is only about a test coverage, we had better adopt it because 3.8.x is not tested officially by Apache Maven community.
- https://issues.apache.org/jira/browse/MNG-7743
- apache/maven#1065

Here are the release notes.
- https://maven.apache.org/docs/3.9.0/release-notes.html
- https://maven.apache.org/docs/3.9.1/release-notes.html
- https://maven.apache.org/docs/3.9.2/release-notes.html
- https://maven.apache.org/docs/3.9.3/release-notes.html
- https://maven.apache.org/docs/3.9.4/release-notes.html

### How was this patch tested?

Pass the CIs with Java 21 EA build

Closes apache#1612 from dongjoon-hyun/ORC-1502.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants