I'm not very familiar with Maven so I'm sorry if I made an obvious mistake.
I wrote some JUnit tests and the all run fine in eclipse when I right click the files and select "Run as JUnit". But when I try to use mvn test
in the console it fails because it says package org.junit does not exist
This is how my pomfile looks:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Othello</groupId>
<artifactId>Othello</artifactId>
<version>0.0.1</version>
<name>Othello</name>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source/>
<target/>
</configuration>
</plugin>
</plugins>
<finalName>Othello</finalName>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Does anyone know what I did wrong?