Mvn <goal> compile errors. Not able to open error location.

10 views
Skip to first unread message

Ronak Gandhi

unread,
May 18, 2018, 8:06:54 PM5/18/18
to eclim-user
Hi,

I'm using Mvn clean install -Dmaven.test.skip=true to build the project. When there are compile errors, I can't go to error location from the quickfix window. The file path, row and column number are correct. So looks like the errorformat is not getting set properly.

This is what it is set to in the quickfix window -

errorformat=%A%.%#[javac] %f:%l: %m,%C%.%#[javac] symbol%.%#: %m,%C%.%#[javac] location%.%#: %m,%-Z%.%#[javac] %p^,%W%.%#[javadoc] %f:%l: warning - %m,%E%.%#[javadoc] %f:%l: error - %m,%A%.%#[javadoc] %f:%l: %m,%-C%.%#[javadoc] location: %.%#,%-Z%.%#[javadoc] %p^,%-G%.%
#[javadoc] Note:%.%#,%-G%.%#[javadoc] javadoc:%.%#,%+A%.%#[junit] %.%#Failures: %[%^0]%.%# Time elapsed: %.%#,%-Z%.%#[junit]%.%# Test %f FAILED,%+A%.%#[junit]%.%# %.%#Errors: %[%^0]%.%# Time elapsed: %.%#,%-Z%.%#[junit] Test %f FAILED,%A%f:%l: %m,%Csymbol%.%#: %m,%Clocati
on%.%#: %m,%-Z %p^,%-G%.%#

Is this correct?

Eric Van Dewoestine

unread,
May 21, 2018, 11:36:15 AM5/21/18
to eclim...@googlegroups.com
hmm, your errorformat looks like what eclim uses for 'Maven' (maven
1.x), not 'Mvn'

Could be a typo in eclim/compiler/eclim_mvn.vim. Can you open that
file, and replace:

let current_compiler = "eclim_maven"

with

let current_compiler = "eclim_mvn"

reload vim and see if that solves the issue? If so Ill commit the
change.
> --
> You received this message because you are subscribed to the Google Groups "eclim-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to eclim-user+...@googlegroups.com.
> To post to this group, send email to eclim...@googlegroups.com.
> Visit this group at https://groups.google.com/group/eclim-user.
> For more options, visit https://groups.google.com/d/optout.


--
eric

Ronak Gandhi

unread,
May 21, 2018, 12:33:14 PM5/21/18
to eclim...@googlegroups.com
Yes, the current_compiler was set to "eclim_maven" inside eclim_mvn.vim. I corrected it like you mentioned, but that didn't fix the issue.

errorformat=%A%f:[%l\,%c] %m,%Csymbol%.%#: %m,%Zlocation%.%#: %m,%AEmbedded error:%.%# - %f:%l: %m,%-Z %p^,%A%f:%l: %m,%-Z %p^,%ARunning %f,%+ZTests run%.%#FAILURE!%.%#,%ARunning %f,%C%.%#,%+ZTests run
%.%#FAILURE!%.%#,%-G%.%#

When I try to open the compilation error, it still opens a blank file with no content. The file path in the build failure is correct.

-Ronak

Ronak Gandhi

unread,
May 21, 2018, 12:37:44 PM5/21/18
to eclim-user
The compilation error looks like this -

[ERROR] /work/path/to/java/module.java|131 col 8| error: cannot find symbol



-Ronak
> To unsubscribe from this group and stop receiving emails from it, send an email to eclim-user+unsubscribe@googlegroups.com.

> To post to this group, send email to eclim...@googlegroups.com.
> Visit this group at https://groups.google.com/group/eclim-user.
> For more options, visit https://groups.google.com/d/optout.


--
eric

--
You received this message because you are subscribed to the Google Groups "eclim-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eclim-user+unsubscribe@googlegroups.com.

Ronak Gandhi

unread,
May 21, 2018, 2:05:56 PM5/21/18
to eclim-user
So looks like the output in the quickfix window is not same as the actual error. This is how it looks like in the actual mvn output:

[ERROR] /work/path/to/java/module.java[131,8] error: cannot find symbol



Not sure what's modifying the quickfix window output. Any idea how to debug this?


-Ronak

Eric Van Dewoestine

unread,
May 21, 2018, 5:06:20 PM5/21/18
to eclim...@googlegroups.com
Can you post a full example of the output by running mvn in a shell?
> >>> an email to eclim-user+...@googlegroups.com.
> >>> > To post to this group, send email to eclim...@googlegroups.com.
> >>> > Visit this group at https://groups.google.com/group/eclim-user.
> >>> > For more options, visit https://groups.google.com/d/optout.
> >>>
> >>>
> >>> --
> >>> eric
> >>>
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "eclim-user" group.
> >>> To unsubscribe from this group and stop receiving emails from it, send
> >>> an email to eclim-user+...@googlegroups.com.
> >>> To post to this group, send email to eclim...@googlegroups.com.
> >>> Visit this group at https://groups.google.com/group/eclim-user.
> >>> For more options, visit https://groups.google.com/d/optout.
> >>>
> >>
>
> --
> You received this message because you are subscribed to the Google Groups "eclim-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to eclim-user+...@googlegroups.com.

Ronak Gandhi

unread,
May 21, 2018, 5:13:42 PM5/21/18
to eclim-user
Sure. Here's an excerpt that matters.

[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ api ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 263 source files to /work/some/path/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /work/some/path/module.java:[131,8] error: cannot find symbol
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.547s
[INFO] Finished at: Mon May 21 14:10:53 PDT 2018
[INFO] Final Memory: 51M/512M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project api: Compilation failure
[ERROR] /work/some/path/module.java:[131,8] error: cannot find symbol
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Eric Van Dewoestine

unread,
May 22, 2018, 1:12:14 PM5/22/18
to eclim...@googlegroups.com
What is "[Help 1]"? is that the symbol that wasn't found?

Eric Van Dewoestine

unread,
May 22, 2018, 1:27:03 PM5/22/18
to eclim...@googlegroups.com
Nevermind, I created a maven project to test with. Kind of frustrating
they repeat the compile error twice in the output.
--
eric

Ronak Gandhi

unread,
May 22, 2018, 1:36:06 PM5/22/18
to eclim-user
Yeah, looks that way.

The help 1 line doesn't matter. It's the line above, which has all the information.

-Ronak

Eric Van Dewoestine

unread,
May 22, 2018, 2:31:28 PM5/22/18
to eclim...@googlegroups.com
here is an updated eclim_mvn file:
https://raw.githubusercontent.com/ervandew/eclim/40aa7c85fc64da6beecc45691091b9c6f2c9e852/org.eclim.jdt/vim/eclim/compiler/eclim_mvn.vim

there will unfortunately be duplicate entries for compiler errors
> > an email to eclim-user+...@googlegroups.com <javascript:>.
> > > > To post to this group, send email to eclim...@googlegroups.com
> > <javascript:>.

Ronak Gandhi

unread,
May 22, 2018, 2:56:19 PM5/22/18
to eclim...@googlegroups.com
This works.

Thanks,
Ronak
Reply all
Reply to author
Forward
0 new messages