java - Trigger Eclipse clean via command line or automatically at a specified time -


is anyhow possible force running eclipse clean , rebuild command line in linux or time triggered?

i have workspace hundreds of maven projects have cleaned rebuild after file change automatically. file change happening every night triggered cronjob runs svn update followed mvn clean , mvn install @ end. eclipse sees source changes , rebuilds automatically (native hooks) keep being date. because of unknown reasons not rebuild completely. lot of errors , warnings remain. errors disappear if clean whole eclipse workspace results in automatic rebuild in eclipse. rebuild takes long time (> 1 hour). don't want spend time every day. i'm looking automatic way force complete clean , rebuild of workspace of running eclipse on night.

i can't restart eclipse on night.

one idea clean eclipse outside (but how?) let notice change itself. eclipse might rebuild automatically.

as far i'm aware, there's no predefined way trigger outside. i'm going propose strategy can achieve need. touches on lot of advanced topics i'm going provide pointers started, because bringing details format. make excellent blog article tho. here go:

  1. write plugin eclipse.
  2. this plugin hast expose mxbean clean-and-rebuild operation. use jdk tool jconsole check operation's accessibility.
  3. that operation in turn executes clean , full rebuild commands. can use eclipse plug-in spy find appropriate command contributions, and/or scour eclipse source code.
  4. then, need build custom jmx client invokes mxbean operation outside. stripped down version of jconsole's jmx capabilities , can simple java command line app cron job calls. needs connect local eclipse instance , invoke operation defined earlier. in order find correct instance connect to, eclipse plugin write port of instance's mxbean server file jmx client looks @ startup.

edit: in addition clean , rebuild commands, you'll want invoke full refresh of workspace beforehand.


Comments