Reputation: 4521
Is it anyhow possible to force a running Eclipse to clean and rebuild from command line in linux or time triggered?
I have a workspace with hundreds of Maven projects that have to be cleaned an rebuild after a file change automatically. The file change is happening every night triggered by a cronjob which runs svn update
followed by a mvn clean
and a mvn install
at the end. Eclipse itself sees those source changes and rebuilds automatically (native hooks) to keep being up to date. But because of unknown reasons it does not rebuild completely. A lot of errors and warnings remain. Those errors disappear only if I clean the whole Eclipse workspace which then results in an automatic rebuild in Eclipse. This rebuild takes a long time (> 1 hour). I don't want to spend this time every day. So I'm looking for a automatic way to force a complete clean and rebuild of my workspace of a running eclipse over night.
I can't restart eclipse over night.
One idea is to clean Eclipse from outside (but how?) to let it notice the change by itself. Eclipse might then rebuild automatically.
Upvotes: 3
Views: 975
Reputation: 2357
As far as I'm aware, there's no predefined way to trigger this from the outside. So I'm going to propose a strategy which can achieve what you need. This touches on a lot of advanced topics so I'm only going to provide some pointers to get you started, because bringing all the details will be too much for this format. It would probably make an excellent blog article tho. So here we go:
jconsole
to check the operation's accessibility.EDIT: In addition to the clean and rebuild commands, you'll want to invoke a full refresh of the workspace beforehand.
Upvotes: 3