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

Eclipse: errors in imporing packages #128

Open
Arwa1986 opened this issue Jun 19, 2024 · 3 comments
Open

Eclipse: errors in imporing packages #128

Arwa1986 opened this issue Jun 19, 2024 · 3 comments

Comments

@Arwa1986
Copy link

Hi,
I'm new to LearnLib. I've cloned both AutomataLib and LearnLib, and they both build successfully. However, when I tried to import them to Eclipse (after installing the Maven plugin m2e), I encountered many errors, mostly related to importing packages. I've already tried the ''mvn package'' to rebuild the project, and it builds successfully, but the errors are still the same. I took a look at issues #32 and #44, but nothing changed.

Any idea of what might have gone wrong?

here is a screenshot of the errors:
Screenshots
error in emport packages

Desktop:

  • OS: Windows
  • Java version: 17
  • LearnLib version: 0.17.0
@mtf90
Copy link
Member

mtf90 commented Jun 20, 2024

Apparently, the m2e-apt plugin (as described in #32) is no longer needed according to its documentation ("m2e-apt functionality is now directly included in m2e 2.x, therefore this m2e-apt entry is no longer compatible with Eclipse 2022-09 and needs to be removed.") so we may need to update the documentation here. However, Eclipse is still pain. I needed to manually enable automatic annotation processing (under Maven -> Annotation Processing) but even then, the Maven Plugin does not seem to correctly resolve scoped dependencies. This means that a lot of test-cases show alleged compiler errors and even running Example1 fails because the (transitive) compile-scoped Mockito Dependency is not resolved correctly.

If it doesn't cause too much trouble, I would probably suggest using IntelliJ instead (which also supports Eclipse keybindings, so it shouldn't be too much of a change).

@mtf90 mtf90 changed the title errors in imporing packages Eclipse: errors in imporing packages Jun 20, 2024
@Arwa1986
Copy link
Author

Thank you for your quick response.
I've downloaded Intellij and imported LearnLib as suggested in the documentation. It is imported correctly. However, When I tried to run example1 (or example2) this error occurred:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module org.mockito not found, required by de.learnlib.testsupport

mtf90 added a commit that referenced this issue Jun 20, 2024
Includes fixes for the (also broken) ResumableExample

See the discussion of #128
@mtf90
Copy link
Member

mtf90 commented Jun 20, 2024

Oh wow, you are correct. It's an undetected regression of #127. The direct (and therefore deciding) dependencies of testng and mockito are test-scoped but the referenced testsupport module needs them compile-scoped. I refactored the ResumableExample (which was also broken by #127) to no longer require that dependency. As far as I can tell, things should work with 97cc60e.

Edit: You may need to Rightclick -> Maven -> Reload project the examples project after pulling so that IntelliJ reads the new configs.

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

No branches or pull requests

2 participants