-
Notifications
You must be signed in to change notification settings - Fork 115
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
m2e removes junit and test classpath entries on eclipise-plugin project (regression) #1776
Comments
Hello @Liam-Jackson-QAS, But for others, be aware that mixing maven and eclipse declared libraries isn't the way to go. If you realy need to declare local jar as a dependency you still need to declare a dependency inside your pom.xml file but using a "system" scope |
Hi @treilhes, thanks for the reply. We are still facing this as an issue unfortunately. The issue is that the We already have junit and other dependencies inside the pom.xml. I have tried removing the other classpath entries as you suggest (they are likely only there for legacy reasons) but the |
Possibly related to #1461 ? This is supported by Tycho, see https://github.com/eclipse-tycho/tycho/blob/main/RELEASE_NOTES.md#execute-unit-tests-with-eclipse-plugin-packaging |
./junit/test/java is not part of the standard convention used by maven so you need to register it as a test source folder into your project What about moving your tests where maven expects them ./src/test/java ? If you need an additional folder you can register it using the builder helper plugin:
In fact, i don't see any issues here only misconfiguration |
Hi, Thanks again. The We have already tried using the build helper plugin exactly as suggested, but it does not work. The classpath entry is still removed by m2e. I believe we cannot use |
Hello @Liam-Jackson-QAS |
Given a project with the
eclipse-plugin
packaging inpom.xml
and a.classpath
file like:When doing Maven->Update Project... the
classpathentry
forjunit/test/java
and the one for"org.eclipse.jdt.junit.JUNIT_CONTAINER/5"
are removed from the file. The customlib
path is retained.These entries are required to be retained for being able to run the junit tests for the project within the eclipse IDE.
No changes to the pom.xml seem to help (e.g. defining surefire pluginManagement, testSourceDirectory entries, etc).
This did not occur in eclipse 4.24 (m2e 1.20) but does occur since updating to eclipse 4.30 (m2e 2.4.200). Issue is still present in m2e 2.6.1 / m2e PDE 2.3.2.
The text was updated successfully, but these errors were encountered: