Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

JUnit version 3.8 or later expected

$
0
0

Hi guys,

 

I am getting this rather strange error... I think I know WHY I am getting it, just don't know how to solve the problem.

 

Here is my setup:

 

OS: Windows 7 64bit

 

I have Maven installed and set up:

 

$ mvn --version

Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)

Maven home: c:\Development\Maven

Java version: 1.6.0_20, vendor: Sun Microsystems Inc.

Java home: c:\Program Files (x86)\Java\jdk1.6.0_20\jre

Default locale: da_DK, platform encoding: Cp1252

OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

 

I have created a multi module where I have a parent pom.xml and one Android project and one Android Integration Test project. In the Android project I have also created a /src/test/ folder where I have placed the unit tests that are not integration tests.

 

When I run

$ mvn clean install

the unit tests run fine and all pass. I get a successful build and everyone is happy.

 

But when I try to create a JUnit Run Configuration in IntelliJ and then run it to run my unit tests, I get the following error:

!!! JUnit version 3.8 or later expected

From what I can figure out, the compiler tries to use the JUnit framework from the Android jars. This is of course wrong, so what I tried to do was to go into the module settings for the Android project and move the JUnit 4 dependency up above the Android dependency. But that doesn't make any difference. I suspect that this is because it is a Maven dependency, but I don't know... and I haven't been able to figure out how to get around this.

 

So I am hoping someone here can tell me what I need to do, to get this to work in IntelliJ...

 

Thanks,

Jay


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>