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

#211 Support Java 17 and update build #263

Merged
merged 3 commits into from
Jan 13, 2023
Merged

#211 Support Java 17 and update build #263

merged 3 commits into from
Jan 13, 2023

Conversation

ndoschek
Copy link
Contributor

@ndoschek ndoschek commented Jan 10, 2023

  • Support Java 17 and update build #211 Support Java 17 and update build
    • Update to support build with Java 17
      • We will continue compling with Java 11
      • We support the two latest LTS versions 11 and 17
    • Update versions of build plugins
    • Align p2 pom.xml to currently used targetplatform repo
    • Remove includePackedArtifacts option in target-platform-configuration plugin as this is not compatible with Java versions > 14
  • Update test dependencies to be able to execute with Java 17
    • Remove some dependencies from targetplatform and consume via org.eclipse.emfcloud.modelserver.tests bundle
      • Some of the newer dependencies that work with Java 17 are not available in the required version via the targetplatform, therefore we add them to the tests bundle to consume it for the p2 profile build
      • Add dependency libs to tests bundle
      • Export dependencies via tests bundle
    • Introduce MockitoUtil that replaces Mockito's internal 'FieldSetter' class (which was removed with the newer version)
  • Update README, GitHub action build workflow and Jenkins build
    • Update GitHub action build workflow to build both in Java 11 and java 17
    • Jenkins still builds with java 11 (so we publish also the jar built with 11 to avoid any possible backwards compatibility issues)

Resolves #211

- Update to support build with Java 17
  - We will continue compling with Java 11
  - We support the two latest LTS versions 11 and 17
- Update versions of build plugins
- Align p2 pom.xml to currently used targetplatform repo
- Remove includePackedArtifacts option in target-platform-configuration plugin as this is not compatible with Java versions > 14

Resolves #211
@ndoschek ndoschek changed the title Issues/211 #211 #167 Support Java 17, update build and allow EMF Tests to run in p2 build Jan 10, 2023
@ndoschek ndoschek force-pushed the issues/211 branch 6 times, most recently from 252d883 to 1a7a73f Compare January 11, 2023 08:50
@ndoschek ndoschek changed the title #211 #167 Support Java 17, update build and allow EMF Tests to run in p2 build #211 #167 Support Java 17 and update build Jan 11, 2023
@ndoschek ndoschek changed the title #211 #167 Support Java 17 and update build #211 Support Java 17 and update build Jan 11, 2023
@ndoschek ndoschek marked this pull request as ready for review January 11, 2023 09:04
Copy link
Contributor

@eneufeld eneufeld left a comment

Choose a reason for hiding this comment

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

About testing dependencies:

  • byte-buddy is available as 1.12.18 on orbit
  • hamcrest -> 2.2.0 (it's a all in one bundle)
  • mockito-core -> 4.8.1 (do we need mockit-inline?)
  • objenesis -> 3.3.0

So maybe we should simply use https://download.eclipse.org/tools/orbit/downloads/drops/R20221123021534/ ?

@@ -77,9 +77,9 @@
<appArgLine>-application org.eclipse.ant.core.antRunner -buildfile packaging-p2composite.ant p2.composite.add -Dsite.label=${p2.site.label} -Dproject.build.directory=${project.build.directory} -DunqualifiedVersion=${unqualifiedVersion} -DbuildQualifier=${buildQualifier} -Dsoftware.download.area=${rsync.local.dir}</appArgLine>
<repositories>
<repository>
<id>2021-06</id>
<id>2022-03</id>
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need this update here? and if it is needed why not update to 2022-12?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should reflect the actual used targetplatform application, which was not properly updated last time, I just aligned it here.

About 2022-12, we cannot update yet as with 2022-06 they removed Jetty 9 and switched entirely to Jetty 10. We should do this separately as this will be a rather big change (see also #234).
There is also an update regarding the maven plugin for the targetplatform, which is now more stable and got additional features, so I tend to go away from orbit then with the next update.

- Retrieve newer test dependencies from 2022-12 orbit and consume missing via org.eclipse.emfcloud.modelserver.tests bundle
  - Add hamcrest dependency libs to tests bundle, as there is otherwise a plugin clash as junit consumes the former 1.3 version
- Introduce MockitoUtil that replaces Mockito's internal 'FieldSetter' class (which was removed with the newer version)
- Update GitHub action build workflow to build with Java 17
- Jenkins still builds with java 11 (so we publish also the jar built with 11 to avoid any possible backwards compatibility issues)
@ndoschek
Copy link
Contributor Author

ndoschek commented Jan 12, 2023

Thanks @eneufeld for the hint, as discussed I consume most dependencies from the newer orbit, except the missing javax.servlet from the former one.
Regarding hamcrest, this produces a plugin clashfor the p2 build (the junit plugin still uses the prior version internally), so I added it to the test lib feature bundle.
As mentioned in the comment, we will simplify the targetplatform and remove those feature plugins with the upcoming upgrades.

@ndoschek ndoschek merged commit 41c1b16 into master Jan 13, 2023
@ndoschek ndoschek deleted the issues/211 branch January 13, 2023 15:00
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.

Support Java 17 and update build
2 participants