Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin AND more

The project has only one package containing all the .java files.

When I run it using maven, it complains:

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project Compilation failure: Compilation failure:

A dozen of errors look like these:

[ERROR] C:\Users\...\wx\center\[57,53] ERROR: needs';'
[ERROR] C:\Users\...\wx\center\[88,10] ERROR: there is 'catch', but no 'try'
[ERROR] C:\Users\...\wx\center\[88,26] ERROR: needs')'
[ERROR] C:\Users\...\wx\center\[90,10] ERROR: there is 'finally', but no 'try'

I have checked the eclipse settings,


As you can see, I have assigned the "installed JRE" and it matches the jre used by compiler.

And I have used vim to check the coding of file, it looks ok.

All "errors" are around file, so I commented the whole class leaving only

public class TokenJob {}

Then odd things happen, some other java files ask me to import java file that is already located in the same package, which should not.

I tried to copy TokenJob out and back, the same. I tried the above operation several times, and the "import java file in the same package" happens at random references/places.

This is my pom:

<project xmlns="" xmlns:xsi=""

All I want is getting the jar file using maven. Thanks!


I think the problem is with shade plugin so read this carefully The alternative solution may be

Try deleting everything in your Markers and Problems tab in eclipse and then try to build the project.

Need Your Help

How to load datatables correctly

javascript jquery jquery-datatables

I have an issue with datatables, I admit it's my first expirence with that plugin, so maybe something a bit silly.

Wolfram Alpha and Logic - NOR transformation

logic logical-operators wolframalpha

i have some difficulties interpret some WolframAlpha logic.