tags:

views:

1145

answers:

4

Hello,

we have some ant script for building the different jar we use, in several eclipse projects. ( there is some interdependancie )

At the and of the build, we have to refesh some of the eclipse project in order to make the build path ok. ( without this, he dont see one of the just-builded jar and eclipse throws a build path error )

There is a way to avoid the refreshing step ?

+4  A: 

Try this:

<eclipse.refreshLocal resource="project_name/folder_name" depth="infinite" />

There are option details at the Eclipse help system.

Important: you have to choose "Run in the same JRE as workspace" at the Ant run configuration.

Roman Porotnikov
+1  A: 

You may want to turn on "Refresh Automatically".

See Window->Preferences->General->Workspace->Refresh Automatically

and it'll monitor filesystem changes for you.

Scott Stanchfield
+2  A: 

If you're running the ant script from within eclipse you can right-click on it and select "Run As >" then "Ant Build...". There's a 'Refresh' panel in the options to run the script which you can choose to refresh various things after the script completes.

Shadwell
A: 

Hi,

This might not be answering your question exactly but I don't quite understand what is causing the problem.

As I understand it you have a project A that creates a jar file and that jar file is referenced by project B. When you re-build project A, you need to refresh so that project B can see the new jar file. Is that correct?

I do something similar but I don't get any build path errors because the name of the project A jar file hasn't changed.

Another option is for Project B to reference Project A directly instead of referencing its jar file.

I think I may have misunderstood the problem you are having but I hope this helps anyway.

Kevin Stembridge