title: Maven compiler plugin fails to find symbol for mixed (java-scala) codebase
body: <p>I have a codebase of java and scala files in the same folder in a project (total 5 files). Couple of java files refer to a class defined by one scala file. I use the scala-maven-plugin (v3.2.2) to compile the sources. When trying to use the latest mvn-compiler-plugin (v3.5.1), even though the scala compiler runs first and compiles all the files (both java and scala), maven-compiler-plugin kicks in later, tries to compile the java files only, and fails with a message: Symbol not found - for the object that is defined in the scala file.</p>
  
  <p>Here is some output.</p>
  
  <pre><code>[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ GraphDB ---
  [INFO] Deleting /home/xx/GraphDB
  [INFO] 
  [INFO] --- scala-maven-plugin:3.2.2:compile (default-cli) @ GraphDB ---
  [INFO] /media/xx/GraphDB/src/main/java:-1: info: compiling
  [INFO] Compiling 5 source files to /home/xx/GraphDB/classes at 1465363494733
  [INFO] prepare-compile in 0 s
  [INFO] compile in 4 s
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ GraphDB ---
  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
  [INFO] Copying 1 resource
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ GraphDB ---
  [INFO] Changes detected - recompiling the module!
  [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
  [INFO] Compiling 3 source files to /home/xx/GraphDB/classes
  [INFO] -------------------------------------------------------------
  [ERROR] COMPILATION ERROR : 
  [INFO] -------------------------------------------------------------
  [ERROR] /media/xx/GraphDB/src/GraphTest.java:[23,30] cannot find symbol
    symbol:   variable TitanGraphProvider
    location: class com.ilabs.dsi.titan.GraphTest
  [ERROR] /media/xx/GraphDB/src/AddStatic.java:[229,24] cannot find symbol
    symbol:   variable TitanGraphProvider
    location: class com.ilabs.dsi.titan.AddStatic
  </code></pre>
  
  <p>The symbol "TitanGraphProvider" is in a scala file.</p>
  
  <p>I am using the command "mvn clean scala:compile package" for doing this. I have noticed that if I break down the command into "mvn clean scala:compile" and "mvn package", then the first command goes through, but the second fails with the same errors at the same step. Seems like the later java compilation stage is kicked in by the package step.</p>
  
  <p>What is the correct way to achieve mvn package in this type of scenario?</p>
  
  <p><strong>Edit:</strong> Looks like I did not provide the complete scenario. I was trying to compile the codebase from a shared folder on a Virtualbox VM running Debian, and the underlying file system was Windows (10). When I moved the folder to a non-shared location on the VM, things went fine.</p>