Eclipse cannot automatically compile and generate class files

In a Maven project, the class files generated by eclipse are usually in the target/classes folder, but sometimes due to various reasons, no class files are generated under classes, resulting in a failure to start the project.
Most class files are not generated, just project->clean.
 
But some problems, not just clean can solve.
 
At this time, I thought that there might be a problem with the compiler, I found some solutions on the Internet, and made a record here:
 
There is no AspectJ plugin in eclipse, but the compiler chooses AspectJ, so the compilation fails
Modification method: Open the .project file in the project 
 
Modify org.eclipse.ajdt.core.ajbuilder to org.eclipse.jdt.core.javabuilder
After the modification, clean the project, and the class file compiled by the java file will be generated under target/classes 
To sum up: If it is a compiler problem, you can try to modify the .project file 
org.eclipse.ajdt.core.ajbuilder为org.eclipse.jdt.core.javabuilder

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325514982&siteId=291194637