score:16
Sometimes I get these types of issues as well.
Generally, what worked best for me with Eclipse & Maven:
- Use the latest m2e Eclipse plugin
- Use Maven 3
- Make sure m2e uses the same Maven version as the one you're using on the command line (not the internal one)
- Import projects as Maven projects to generate the Eclipse project files
score:0
You've a library (quartz-1.5.2.jar) that's reference to your m2 local repository which doesn't exist if you just remove the quartz from your build path and update your dependencies internally(in eclipse) that would solve the problem
score:0
Try to use different/older version of JRE. In my case switching back to JRE7 from JRE8 eliminated the problem.
score:0
Delete and Re-Import the project in eclipse (without deleting files of course). Unlike other answers I have not looked into why this happens but it works. poof - compilations errors be-gone
score:0
It may help: After upgrading eclipse or changing it or something like, old eclipse specific files (.classpath, .project, and .settings) may not be compatible to the new version of eclipse. So you may have to re generate this eclipse specific files using Maven. So try this in your eclipse project root
mvn eclipse:eclipse
score:0
In my case, eclipse starts to show all errors after I changed some versions of dependencies in pom.xml, however the command line mvn clean install build successfully
- I deleted folders of the dependencies I changed manually from the .m2 repositories (in my case everything under org.apache.beam), because I also has corrupted dependency issues.
- mvn clean build the project, this downloaded the dependencies again
- right click project: maven -> update project
- delete the project from eclipse (but not from disk) and reimport (this actually left me with 1 error still, then i delete and reimported again)
score:0
Go to Eclipse> Project (Menu) > Clean... > Select project to clean
This also removes invalid errors from Eclipse.
score:0
For me Right click on the project --> Maven --> Update project with the "Force Update of Snapshots/Releases" checkmarked worked.
score:0
Some times, eclipse's validation causing these errors. You can disable them by going to Menu>window>preferences>validation and uncheck suspend all validators or disable them one by one for builds. E.G, every time You build the project eclipse does not validate your files and does not show up those errors.
score:0
This worked for me
- Delete the Eclipse project from Eclipse interface (do not delete project contents on disk)
- Go to the project's root directory in a file explorer or terminal
- Delete these files: .classpath, .project, and .settings directory
- Back to Eclipse, File -> Import... -> Maven -> Existing Maven projects
score:0
Got the same problem, I deleted the project from my workspace (not on disk), opened the project folder and deleted the files .project
, .classpath
and the folder named .settings
.
Now goto eclipse again, import the same project again and viola my error is gone!
score:1
I found that my project was using a project specific Java Compiler setting set to Java 1.5. Furthermore, the project facets were still referencing Java 1.5 when Maven, m2e, Eclipse general Java Compiler settings were all set to Java 1.8.
score:1
In my case there were also problems with Java build path like the following: "Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment." Fixing this resolved compilation errors.
score:2
In my case,
I just deleted project from Eclipse (not ticked checkbox to delete from project location).
Opened project as "Existing Maven Project" again.
and it solved my issue.
score:3
That often happens when the m2eclipse hasn't updated the build path to correspond to what a modified POM file says. There's an entry in the Maven context menu to update the Configuration.
score:4
Sometimes the m2e "maintained" eclipse project is out-of-sync with the actual project in POM (There are lots of reason for that). Assume you have using m2e 0.8 or later, right click on the project, under Maven, there are two entries that are usually useful. They are Update Dependencies and Update Project Configuration
Have a try on them, wait a while after u clicked that for eclipse to update the project and build. Normally it solves similar problems.
score:5
You should try mvn eclipse:eclipse
And then make sure the M2_REPO
variable is point to your local repository.
score:5
sometimes maven update nor all above works. so check which import statement gives you error, then go particular lib file which is usually in c:user/ur-PC-NAME/.m2 get into package delete that .jar file.
then in eclipse, right click on project > maven > update maven.
score:8
If you don't see any error in Eclipse project but it keeps showing the red icon on your project name. Try mvn eclipse:eclipse
.
Then select all projects in Eclipse, Right click > Maven > Update projects
Hope it helps.
score:9
The other upvoted answers did not work for me using these versions:
- Eclipse Neon
- Maven 3
- m2e 1.7
This is what I had to do:
- Delete the Eclipse project from Eclipse interface (do not delete project contents on disk)
- Go to the project's root directory in a file explorer or terminal
- Delete these files:
.classpath
,.project
, and.settings
directory - Back to Eclipse, File -> Import... -> Maven -> Existing Maven projects
score:65
Updating maven project after importing it has fixed this issue for me:
Right click on the project --> Maven --> Update project.
Source: stackoverflow.com
Related Query
- Successful build in Maven still showing errors in Eclipse
- Eclipse Maven build succeeds, but project still reports compilation errors
- Maven clean + build causes project in Eclipse to show errors until clean in Eclipse
- Eclipse shows errors even though maven build succeeds
- Java Eclipse Build Path Errors Maven
- Eclipse Neon build errors despite successful build
- maven java build errors outside the eclipse
- Build failing after adding a test, eventhough there are no errors in the script.Using selenium,testng with maven in eclipse
- Maven Build successful but my test case didnt run in eclipse
- Maven build errors after upgrading from Eclipse Luna to Mars
- Java project compiles with Maven but Eclipse still shows errors
- Eclipse Build Path Nesting Errors
- How to configure Eclipse build path to use Maven dependencies?
- Eclipse Problems View not showing Errors anymore
- Maven build debug in Eclipse
- How to build and run Maven projects after importing into Eclipse IDE
- Eclipse compiles successfully but still gives semantic errors
- Eclipse is not showing compilation errors in project explorer
- Eclipse c++ Type could not be resolved error even though build is successful
- How to remove native support from an Android Project in eclipse because eclipse is showing errors in jni?
- Eclipse issue with Maven build and JDK when generating Qclasses in Querydsl
- Difference between Eclipse Build Project and Maven Compile command
- Eclipse build loop caused by protobuf generated code (related to Maven Project Builder)
- Is it currently possible to build Eclipse Plugins by Maven AND have nice IDE Integration?
- Maven project in eclipse - deployment assembly fails build
- Import Maven Project to Eclipse and Fix the errors
- Eclipse Maven showing multiple paths for the same file
- Single command to build all Eclipse maven projects in current workspace?
- Include maven dependencies in eclipse "Run As -> Android Application" build
- How can I run a Maven webapp in Eclipse when I use profiles to populate properties files at build time?
More Query from same tag
- Android: Asynch Thread for Method
- BouncyCastle Provider JCE Authentication Security Exception
- Eclipse - unable to install breakpoint - Don't tell me again setting
- Using SVN Revision no in the source code
- After using eclipse from adt, error creating pure java project, on mac
- Eclipse modify default Main method in New Class Dialog
- Getting "new" dependency from org.eclipse.xtext.common.types
- How to get the "title" instead of the "value" of a preference with getString()
- Yotaphone 2 is not visible in Eclipse
- Can I hot-deploy to a remote install of Tomcat?
- NoClassDefFoundError on Maven dependency present locally
- Eclipse crashes when it tries to auto-fill option for populating the methods
- An internal error occurred during "Initializing Java Tooling." in Eclipse on startup
- Themeing Eclipse Indigo
- Android SDK ADT mismatch but cannot find update
- Maven Shade Plugin - NoClassDefFound
- Debug Google AppEngine localhost from different Machine
- How do I set the Java Doc for google drive api for android in Eclipse
- how to import a class in python Pydev console?
- Scala IDE (Eclipse) Run as Scala Application
- Eclipse shortcut to always run the same project
- Exporting Java without JRE
- latest version of mapreduce libs on maven
- No output in Eclipse
- Eclipse -> Maven -> Update Project Configuration and Maven Standard Directory Layout
- Upgrade Gradle to a new version for all projects in my IDE?
- Android Wear project - with an existing Android project
- make Intellij to use a line break after annotation
- Using second menu?
- P2 headless update not working