I cannot understand why in Eclipse after these two steps
Run as->Maven cleanProject->clean...
I can still run my program using green icon with white arrow?
I thought there are no .class files after cleaning. I was expecting exception like ClassNotFound, but nothing like this happened.
Do you know how to properly clean project in Eclipse?
I just checked this phenomenon out with one of my
Mavenprojects inEclipseand this is what I observed. By the way, don’t trust what you see in thePackage View, use your file system explorer.Run as -> Maven clean : deletes the target folder
Project -> clean… : creates
targetfolder with empty subfolders “classes” and “test-classes“. InEclipse'sPackage Explorerview, I see an empty target folder.At this point I would say the proper way to clean a
Mavenproject inEclipseis simply to do Run as ->Mavenclean.Now to address why your program runs after cleaning. As soon as I ran a program in the project,
Eclipsecompiled and populated the “target/classes” and “target/test-classes” folders with *.class files and resources. InEclipse'sPackage Explorerview, I still see an empty target folder.The trick to figuring this out was to look at the project directory and sub directories with the system file explorer and not just with
Eclipse'sPackage VieworProject View.