Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to clear Target Definition cache?
How to clear Target Definition cache? [message #1810924] Thu, 22 August 2019 07:11 Go to next message
Fernando Paz is currently offline Fernando PazFriend
Messages: 22
Registered: May 2014
Junior Member
Every once in a while I need to reload the Target Definition on the RCP project I'm working on.

I just need to open a ".target" file and press "Reload". However Eclipse is taking about 20 minutes to sort out all dependencies and I can't code while it does that (the compiler complains about unresolved dependencies).

By looking at the logs, I can see that it's still trying to access some old URLs that are no longer working.

I believe it's some sort of cache, but I couldn't find any occurrence of these URLs on my files. Any ideas how I can make Eclipse skip them?

https://i.redd.it/sajflvna9yh31.png
Re: How to clear Target Definition cache? [message #1810930 is a reply to message #1810924] Thu, 22 August 2019 08:57 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33252
Registered: July 2009
Senior Member
Although this may be an unhelpful answer to your question, this is one of the many reason why I don't use *.target files to define the target platform and have implemented targlets instead:

https://wiki.eclipse.org/Oomph_Targlets

This will use only the URLs you've actually listed. It will work in the background while you continue to work (using more threads to make it faster). If you have a resolution failure, it will not destroy your target platform but rather roll back. It uses a global cache so that you don't end up downloading yet another huge copy in each and every workspace. It will automatically resolve your workspace dependencies.

Likely even better would be to define a setup for your project to automate everything (as over 60 Eclipse projects have done and as I do with each of my customers):

https://wiki.eclipse.org/Eclipse_Oomph_Authoring

That you can just do the same as this:

https://wiki.eclipse.org/Eclipse_Platform_SDK_Provisioning

In any case, to try to be more helpful, it may be the case that the URLs in Window -> Preferences -> Install/Update -> Available Software Sites are being used. Otherwise you could look through what's in <workspace>/.metadata/.plugins/org.eclipse.pde.core to see if those URLs are there somewhere...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to clear Target Definition cache? [message #1810976 is a reply to message #1810930] Thu, 22 August 2019 21:30 Go to previous message
Fernando Paz is currently offline Fernando PazFriend
Messages: 22
Registered: May 2014
Junior Member
Although that alone didn't solve the problem, it did point me to the right direction.

While I was recreating the target definition file, I couldn't load one of the target locations, and Eclipse showed me a list of P2 repositories including the ones that are invalid.

I then realised they were stored somewhere, which was not in Preferences > Install/Update Available Software Sites.

I finally found the invalid URLs by editing one of the Target locations and clicking on Work with the list of software sites. There I could delete the invalid locations and now it's taking only few seconds to update my Target Definition. Thanks :)
Previous Topic:Trouble with the Eclipse IDE for Scientific Computing
Next Topic:Refactor -> Rename programmatically
Goto Forum:
  


Current Time: Thu Nov 07 15:22:37 GMT 2024

Powered by FUDForum. Page generated in 0.06973 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top