Refresh an Eclipse project with Ant

后端 未结 5 1891
一个人的身影
一个人的身影 2020-12-13 06:30

We have some Ant script fosr building the different jars we use, in several Eclipse projects. There is some interdependency

At the end of the build, we have to refr

相关标签:
5条回答
  • 2020-12-13 07:00

    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.

    0 讨论(0)
  • 2020-12-13 07:12

    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.

    0 讨论(0)
  • 2020-12-13 07:16

    You may want to turn on "Refresh Automatically".

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

    and it'll monitor filesystem changes for you.

    0 讨论(0)
  • 2020-12-13 07:20

    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.

    0 讨论(0)
  • 2020-12-13 07:21

    it can be done by following Ant tasks provided by the Eclipse platform.

    <eclipse.refreshLocal resource="MyProject/MyFolder" depth="infinite"/>
    

    Note: make sure to run Ant inside the same VM where Eclipse workspace is running, for details check following links

    • Problem: failed to create task or type eclipse.refreshLocal
    • Ant tasks provided by the Eclipse platform
    0 讨论(0)
提交回复
热议问题