Note that there are some explanatory texts on larger screens.

plurals
  1. POmaven "cannot find symbol" message unhelpful
    primarykey
    data
    text
    <p>This is a really simple question, and it's probably a setting somewhere I don't know about, but Google is being particularly unhelpful for this question, giving results about compilation errors, not how to change compilation error messages.</p> <p>When I build my project with maven, it will give me error messages formatted roughly as follows:</p> <p>[ERROR] /path/to/source/Main.java:[13,8] error: cannot find symbol</p> <p>When I build with ant or javac, it will actually tell me the symbol that it can't find in the error message. maven gives me a line number and character position, but displaying the actual symbol would be more helpful. The line above is the only line given for each of the "cannot find symbol" errors. There is no line above or below that gives the symbol. I imagine there has to be some way to get maven to tell me that information, but I don't know what it is. I tried the -e option, as mvn told me to try using it, but it gave a maven traceback for the error, not the actual symbol.</p> <p>Any help?</p> <p>Here's the output of mvn --version</p> <pre><code>Apache Maven 3.0.4 (rNON-CANONICAL_2012-10-24_11-25_mockbuild; 2012-10-24 07:25:04-0400) Maven home: /usr/share/maven Java version: 1.7.0_09-icedtea, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.6.6-1.fc17.x86_64", arch: "amd64", family: "unix" </code></pre> <p>And here's an example (unhelpful) error message, exactly as output by maven (just with directories shortened):</p> <pre><code>[INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /path/to/source/SoundEngineFilePanel.java:[33,8] error: cannot find symbol [ERROR] class SoundEngineFilePanel /path/to/source/SoundEngineFilePanel.java:[36,8] error: cannot find symbol [INFO] 2 errors [INFO] ------------------------------------------------------------- </code></pre> <p>The symbols it can't find are "fakeThing" and "fakeThing2", not SoundEngineFilePanel.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload