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

[SUREFIRE-1955] Switch project to Java 8 #415

Merged
merged 1 commit into from Dec 31, 2021
Merged

Conversation

slawekjaranowski
Copy link
Member

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 [SUREFIRE-XXX] - Fixes bug in ApproximateQuantiles,
    where you replace SUREFIRE-XXX with the appropriate JIRA issue. Best practice
    is to use the JIRA issue title in 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 install to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its clean install).

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.

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 26, 2021

Usually, we split this activity to multiple activities.

  1. changing the Maven parent POM and Java Version 1.8 in POM.
  2. Changing the Maven API version
  3. changing the code towards Java 8 (there is one plugin which converts the code to java 8 features)

@slawekjaranowski
Copy link
Member Author

This PR only change Java version to 1.8 with only necessary changes to make project build.
So it is for 1 only from your list.

Maven Api was changed in #412

Copy link
Member

@olamy olamy left a comment

Choose a reason for hiding this comment

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

Good job

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 29, 2021

@slawekjaranowski
The build process is currently using two JDKs. One is 1.8 and the other is in the range [1.7, ) for tests.
This movement towards 1.8 would simplify and finally only one JDK will be used.
So please go to the Jenkinsfile and remove jdkTestName and rename it with jdkName, and final String jdkName = jenkinsEnv.jdkFromVersion(os, '8')
and substitute
final String jdkTestName = jenkinsEnv.jdkFromVersion(os, jdk.toString())
with
final String jdkName = jenkinsEnv.jdkFromVersion(os, jdk.toString()).
Then remove def script = cmd + ['\"-DjdkHome=$JAVA_HOME_IT\"'] and def script = cmd + ['\"-DjdkHome=%JAVA_HOME_IT%\"'] and rename script.join(' ') with cmd.join(' ').

Then remove the following in maven-failsafe-plugin/pom.xml:

                        <configuration>
                            <javaHome>${jdkHome}</javaHome>
                        </configuration>

Pls remove -DjdkHome=... from README.md.
Remove <jvm>${jdkHome}/bin/java</jvm> and <property>jdkHome</property> from the main POM.
Remove <jvm>${jdkHome}/bin/java</jvm> from the surefire-its/pom.xml

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 30, 2021

@slawekjaranowski
The plugin animal-sniffer-maven-plugin has a newer version 1.20. It is used to check the JDK API signatures. We can update the version here or in another PR. It's up to you.

@slawekjaranowski
Copy link
Member Author

animal-sniffer-maven-plugin in next PR, there is one #411 - can be reopened after it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants