I am beginning to learn Maven and ran into a problem when I am trying to compile the test source code in a maven project.
My main java source code is dependent on a jar file so I have a dependency declared in my pom file as following:
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>myMavenApp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.mycompany.maven.testapp</groupId>
<artifactId>domain</artifactId>
<version>1.0</version>
</dependency>
Compile error when compiling the test code:
[ERROR] \projects\news\publishing\src\test\java\com\mycompany\transformers\monitoring\JournalMonitorTest.java:[40,30] cannot find symbol [ERROR] symbol : class JournalMonitor [ERROR] location: class com.mycompany.transformers.monitoring.JournalMonitorTest