If anyone has this issue when building a Maven project created in IntelliJ IDEA externally, I used the following dependency instead of the answer:
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>15.0</version>
</dependency>
Using this will allow the project to build on IntelliJ IDEA and by itself using Maven.
You can find it here.