finmath / finmath-lib

Mathematical Finance Library: Algorithms and methodologies related to mathematical finance.
Apache License 2.0
488 stars 168 forks source link

Eclipse - JUnit not recognized - All tests are failing #67

Closed AlessandroGnoatto closed 5 years ago

AlessandroGnoatto commented 5 years ago

Hi,

I am testing finmath with the newest release of Eclipse, Eclipse 2018-12. I started from a fresh install and installed the Maven-Git SCM. After that I imported the project from Import /Maven / Check out project from SCM.

Import works, unfortunately alle test classes are not working because Junit is not recognized.

Junit is mentioned among the dependencies but it is in "dark grey". I looked for multiple solutions on Stackoverflow but nothing worked so far. The best I could understand is that this is related to a new option in Eclipse Photon https://stackoverflow.com/questions/51372670/eclipse-maven-dependency-jar-grayed-out-cant-import-classes-from-it/52946385

Schermata 2019-03-16 alle 10 43 28
AlessandroGnoatto commented 5 years ago

I found the solution: I deleted the whole content of the Maven repository /username/.m2/repository from the file explorer (i.e. Finder on Mac). Running mvn -P java-8 from the command line did the trick. All my Eclipse instances were pointing to a Maven repository which was corrupt for some reason.

Schermata 2019-03-16 alle 14 27 13