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

Make build work with Java17 #61

Closed
wants to merge 5 commits into from

Conversation

cstamas
Copy link
Member

@cstamas cstamas commented Sep 6, 2022

In short: now build works on both, Java 11 and Java 17 (tested with 11 and 17 Temurin on Linux).

Also, build (plugins and tooling) is updated as well, dependencies are NOT touched except logging: they are set to slf4j 1.7.36 and logback 1.1.11. Reason is that (in tests) they were "crossed": slf4j 1.6 was used with 1.1.11 logback (while logback 1.1.x requires 1.7.x slf4j). So, dependencies can be set back (slf4j 1.6.x and logback 1.0.0) but then it needs to be consequently set (target AND test POM).

Changes:

  • align POM with CONTRIBUTING (enforce Java11), up Maven requirement to 3.8.4+
  • use javac release=7 flag (instead of source/target+sniffer), remove animal sniffer
  • fix enforcer override (was not working, as parent POM defined it in plugin not pluginMgmt section)
  • move all plugin versions to top level POM
  • update to latest plugins

Java 17 changes (commit 8fa9020):

  • update felix and tycho versions to latest
  • surefire: fixate junit47 provider, as presence of testng on classpath confuses surefire
  • align PDE and POM declared logging lib versions (slf4j, logback), it caused clashes
  • tests: exclude org.osgi:org.eclipse.osgi as it clashes (on test classpath) with felix
  • tests: pass guiceVersion to UTs to be able to create "assumptions"
  • ExampleTestCase testContainerLookup UT fails on Java 17 + Guice4 (did not look deeper), is disabled on that combo

Changes:
* align POM with CONTRIBUTING (enforce Java11)
* up Maven requirement to 3.8.4+
* use javac release flag (instead of source/target), remove animal sniffer
* fix enforcer override (was not working, as parent POM defined it in plugin not pluginMgmt section)
* update to latest plugins
Changes:
* update felix and tycho versions to latest
* surefire: fixate junit47 provider, as presence of testng on classpath confuses surefire
* align PDE and POM declared logging lib versions (slf4j, logback), it caused clashes
* tests: exclude org.osgi:org.eclipse.osgi as it clases (on test classpath) with felix
* tests: pass guiceVersion to UTs to be able to create "assumptions"
@cstamas cstamas changed the title Update build plugins Make build work with Java17 Sep 7, 2022
cstamas added a commit to cstamas/sisu.plexus that referenced this pull request Sep 7, 2022
pom.xml Show resolved Hide resolved
@cstamas cstamas mentioned this pull request Jan 4, 2023
@@ -17,19 +17,19 @@
<location type="Maven" includeSource="true">
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.4</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

If those dependency changes are not strictly necessary for Java 17 let us remove those. They are potentially backwards-incompatible.

Copy link
Member Author

Choose a reason for hiding this comment

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

If I undo these changes, I get errors in tests (LogsTest.testProductionLogging:38 » IllegalState org.slf4j.LoggerFactory could not be successfully initialized. See also http://www.slf4j.org/codes.html#unsuccessfulInit)

@cstamas
Copy link
Member Author

cstamas commented Jan 17, 2023

Frankly, I'd drop this PR and rather continue with #71 that incorporates this one as well....

@cstamas
Copy link
Member Author

cstamas commented Jan 18, 2023

Superseded by #71

@cstamas cstamas closed this Jan 18, 2023
cstamas added a commit to eclipse-sisu/sisu.plexus that referenced this pull request Mar 20, 2023
In short: now build works on both, Java 11 and Java 17 (tested with 11 and 17 Temurin on Linux).

Similar to eclipse-sisu/sisu-project#61 and similarly, once this merged removal of Tycho is pending.

Changes:
* update GH workflow to use mvnw (instead of implicitly provided mvn by setup-java)
* update wrapper to 3.2.0 and Maven to 3.9.1
* update all build plugins to their latest versions
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.

2 participants