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

Always configure JRE container to be the highest environment from #843

Conversation

kwin
Copy link
Member

@kwin kwin commented Jul 6, 2022

m-compile-p and m-enforcer-p parametrisation

This closes #842

m-compile-p and m-enforcer-p parametrisation

This closes eclipse-m2e#842
@github-actions
Copy link

github-actions bot commented Jul 6, 2022

Unit Test Results

50 tests   49 ✔️  2m 19s ⏱️
12 suites    1 💤
12 files      0

Results for commit 69d608c.

@@ -198,6 +201,24 @@ public void configure(ProjectConfigurationRequest request, IProgressMonitor moni
MavenJdtPlugin.getDefault().getBuildpathManager().updateClasspath(project, monitor);
}

static String getHighestEnvironmentId(String... environmentIds) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Where could I put a unit test for this (no IT necessary, no bundling into an Eclipse plugin either)? m2e.jdt.tests also only contains package o.e.m.jdt.tests and this test would need to be located in the same package.

Copy link
Member Author

@kwin kwin Jul 7, 2022

Choose a reason for hiding this comment

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

The approach from https://stackoverflow.com/a/44926613 seems reasonable to me but as only the reactor has a pom.xml one would need to generally enable that....

Copy link
Contributor

Choose a reason for hiding this comment

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

o.e.m.jdt.tests would be the best place. As the class is internal you could make the method static.
Another approach, that m2e is not leveraging yet so it may require more work to get started, is https://github.com/eclipse/tycho/blob/master/RELEASE_NOTES.md#execute-unit-tests-with-eclipse-plugin-packaging

@kwin
Copy link
Member Author

kwin commented Jul 22, 2022

As discussed in #842 (comment) different compiler settings for test and compile are not supported by Eclipse and having a lower enforced minimum Java version than compile target would be a bug in the pom.xml already there is no need for this approach.

@kwin kwin closed this Jul 22, 2022
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.

Java version mismatch between JRE_CONTAINER and targetPlatform in M2E 2.0.0
2 participants