How to refresh eclipse projects via command line?
(an equivalent of right-click > refresh in package view)
I need to refresh eclipse from a batch after a maven nightly build.
When a new file is created in Eclipse you might need to refresh the Eclipse project to see the new file. This refresh process can take place automatically. To set auto-refresh, go to window → preferences → general → workspace and check the "Refresh using native hooks or polling" check-box.
Use : Window->Preferences-> General -> Workspace and check Refresh using native hooks and polling checkbox.
I know there are ant tasks to do this:
<eclipse.convertPath fileSystemPath="/workspace/org.example.project"
property="resourcePath"/>
<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
As for running this from the command line, as a worst case, you can stick this in an ant script invoke the eclipse antrunner application:
eclipse -nosplash -application org.eclipse.ant.core.antRunner -f refresh.xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With