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
Tycho 2.4.0 Junit classpathcontainer requires Junit 4.13 #1164
Comments
This is correct behavior, you need to provide 'org.junit' as part of the build because that is how the JUnit container behaves in Eclipse IDE. |
Sorry I wasn't clear enough. In short there is Junit 4.12 in the target platform and since Tycho 2.4.0 it still asks for 4.13. |
Yes I think that would be okay, do you like to propose a PR? |
Did you resolve the issue or have a workaround? Because I'm facing exactly the same error with Tycho 2.7.5 when building our legacy application with the maven-toolchain-plugin. But I can't downgrade Tycho, because then it's not toolchain aware any more :( |
We found a workaround. We added a newer p2 updatesite, which contains the 4.13 version into our target definition: <location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.hamcrest.core" version="0.0.0" />
<unit id="org.hamcrest.core.source" version="0.0.0" />
<unit id="org.junit" version="0.0.0" />
<repository location="https://download.eclipse.org/eclipse/updates/4.16/R-4.16-202006040540" />
</location> |
Closing as there is no plan into looking into ancient versions and user found a workaound. |
In Tycho 2.4.0 special handling for Junit classpath containers was added.
When using this feature some implicit requirement for Junit 4.13 seems to be added.
[ERROR] Cannot resolve project dependencies: [ERROR] You requested to install 'org.eclipse.equinox.p2.iu; org.junit [4.13.0,5.0.0)' but it could not be found
Reproducable with the following mavvn invocation
mvn package -Dtarget-platform=http://download.eclipse.org/eclipse/updates/4.14/ -Dtycho-version='2.4.0'
on the integration tests at https://github.com/eclipse/tycho/tree/master/tycho-its/projects/compiler.junitcontainer/junit4-in-bundleTested up to Tycho 2.6.0.
The text was updated successfully, but these errors were encountered: