Eugene
Eugene

Reputation: 60184

Function of Project > Clean in Eclipse

What does Eclipse's Project → Clean... tool actually do?

Upvotes: 134

Views: 127635

Answers (4)

Randhir
Randhir

Reputation: 137

I also faced the same issue with Eclipse when I ran the clean build with Maven, but there is a simple solution for this issue. We just need to run Maven update and then build or direct run the application. I hope it will solve the problem.

Upvotes: -5

ChopperCharles
ChopperCharles

Reputation: 787

There's another problem at work here. The Clean functionality of Eclipse is broken. If you delete files outside of Eclipse it will not pick up on the fact that the files are now missing, and you'll get build errors until you delete the files manually. Even then, that will not necessarily work either, especially if there are a lot of files missing. This happens to me rather often when I check out a branch of code that has had a lot of changes since the last time I built it. In that case, the only recourse I've found is to start a brand new workspace and reload the project from scratch.

Upvotes: 12

Konstantin Komissarchik
Konstantin Komissarchik

Reputation: 29139

Its function depends on the builders that you have in your project (they can choose to interpret clean command however they like) and whether you have auto-build turned on. If auto-build is on, invoking clean is equivalent of a clean build. First artifacts are removed, then a full build is invoked. If auto-build is off, clean will remove the artifacts and stop. You can then invoke build manually later.

Upvotes: 86

BoltClock
BoltClock

Reputation: 723558

It removes whatever already-compiled files are in your project so that you can do a complete fresh rebuild.

Upvotes: 134

Related Questions