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

Support JDK9 methods using MR-JAR #98

Merged
merged 1 commit into from
Jul 17, 2020
Merged

Support JDK9 methods using MR-JAR #98

merged 1 commit into from
Jul 17, 2020

Conversation

FroMage
Copy link
Contributor

@FroMage FroMage commented Sep 9, 2019

WDYT @manovotn ? I'm not too sure how to test this though. I have to check how other projects do it in the CI.

Copy link
Contributor

@manovotn manovotn left a comment

Choose a reason for hiding this comment

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

I'm not too sure how to test this though.

Hmm, not sure either. We would need some special settings for surefire plugin that only adds certain test sources with JDK 9+?

core/pom.xml Outdated Show resolved Hide resolved
tests/src/test/java/io/smallrye/context/test/MiscTest.java Outdated Show resolved Hide resolved
core/pom.xml Outdated Show resolved Hide resolved
@FroMage FroMage requested a review from a team as a code owner July 16, 2020 13:32
@FroMage
Copy link
Contributor Author

FroMage commented Jul 16, 2020

@manovotn I've updated the way I do the MR to the first option recommended on https://maven.apache.org/plugins/maven-compiler-plugin/multirelease.html which means we have two virtual modules:

  • core-java8 (the base)
  • core-java9 (the MR for 9)

and core just assembles the two into an MR jar.

It's more standard build for Maven I guess, but it has two drawbacks:

  • Eclipse can't load the modules properly because it doesn't see that the core module has classes, so you need to add the core-java8/9 projects to its build path.
  • Dependencies from core-java8 need to be duplicated in core because that's the pom that will be used.

I added tests for the new methods too.

@FroMage
Copy link
Contributor Author

FroMage commented Jul 16, 2020

Updated it again with the structure supported by smallrye-parent, that's much cleaner.

core/bin/mrjar.xml Outdated Show resolved Hide resolved
Copy link
Contributor

@manovotn manovotn left a comment

Choose a reason for hiding this comment

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

I am probably missing something but why do you need empty files such as core/build-release-8 or tests/build-release-8?

Otherwise looks pretty good.

core/src/main/resources/META-INF/beans.xml Outdated Show resolved Hide resolved
core/bin/mrjar.xml Outdated Show resolved Hide resolved
@FroMage
Copy link
Contributor Author

FroMage commented Jul 17, 2020

I think this PR's CI is toast, lemme reopen one.

@FroMage
Copy link
Contributor Author

FroMage commented Jul 17, 2020

Same CI issue so let's keep this one open.

@FroMage FroMage closed this Jul 17, 2020
@FroMage FroMage reopened this Jul 17, 2020
@FroMage
Copy link
Contributor Author

FroMage commented Jul 17, 2020

Finally, CI rules are fixed.

@FroMage FroMage requested a review from manovotn July 17, 2020 09:42
@FroMage FroMage merged commit b0951e2 into smallrye:master Jul 17, 2020
@dmlloyd
Copy link

dmlloyd commented Jul 17, 2020

I am probably missing something but why do you need empty files such as core/build-release-8 or tests/build-release-8?

Otherwise looks pretty good.

Have a look at the docs here: https://github.com/smallrye/smallrye-parent/blob/master/README.adoc

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