'My Junit5 Test class not running, package XXX does not exist error

I have a maven project setup as normal: src/main/java/a/b/c/MyApp src/test/java/a/b/c/MyAppTest

I am having a weird problem in IntelliJ, where my junit5 test class cannot see the classes in src/main/java/a/b/c/

I get the following error when I run the test class:

java: package org.apache.solr.client.solrj does not exist

Some of the classes are dependencies. The mvn clean package works and the Vertx service builds ok and works as expected.

I dont think think its a Vertx issue, I suspect its some basic junit setup issue in Intellij.

Please, any ideas what the issue might be?



Solution 1:[1]

My local repo was pointing to the wrong path in IntelliJ Build, Execution, Deployment > Maven > Local repository.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1