How to select or change JUnit version in Eclipse?

后端 未结 3 1686
别跟我提以往
别跟我提以往 2020-12-20 15:41

Basically the source code I am using requires a very specific JUnit test version such as:

lucene-test-framework-XX.jar
  The compiled Lucene test-framework l         


        
3条回答
  •  无人及你
    2020-12-20 15:43

    The problem, at least in Eclipse Luna SR1/SR2, is that Eclipse seems to prioritize the packaged plugin with JUnit 4.11 in "eclipse/plugins/org.junit_4.11.0.v201303080030". Even after trying the answer above to force the version I needed, I kept getting the same test errors so it seems that Junit 4.11 was still being used.

    The only solution that has worked so far for me is to replace the junit.jar in that directory (eclipse/plugins/org.junit_4.11.0.v201303080030) with the version I wanted.

提交回复
热议问题