Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refresh eclipse projects via command line

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.

like image 709
Philippe Blayo Avatar asked Apr 15 '12 11:04

Philippe Blayo


People also ask

How do I refresh a project in Eclipse?

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.

How do you refresh a Java project?

Use : Window->Preferences-> General -> Workspace and check Refresh using native hooks and polling checkbox.


1 Answers

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

like image 104
Andrew Niefer Avatar answered Oct 13 '22 01:10

Andrew Niefer