This is normal behavior that looks all the way to classes to compile the source files, if only an option is provided (and this will be the solution here). javac-sourcepath
, Jira -sourcepath javac Maven Compiler (. MCOMPILER-98). :
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArguments>
<sourcepath>${project.basedir}/src/main/java</sourcepath>
</compilerArguments>
</configuration>
</plugin>