Question

I am using Spring Source Tool Suite 2.8.1 to implement Spring applications.

I frequently get build errors because references are lost for no apparent reason. In Right-click project in Package Explorer->Properties->Java Build Path->Order and Export, I find projects sometimes are deselected. And often packages are gone in Right-click project in Package Explorer->Properties->Java Build Path->Deployment Assembly.

Having to reset these settings frequently is frustrating. Is there some way I can work around these problems?


I have tried to update STS to the latest version, but the upgrade process fails with incomprehensible error messages. I want to avoid a clean install because setting up the environment again would probably be a nightmare.

Was it helpful?

Solution

Now that I know this is a maven project and you are adding references yourself, this is making sense to me. STS 2.8.x was the last STS to ship with the legacy m2e (maven plugin for Eclipse). It did not recognize build path entries added manually (it likes to have complete control over the classpath). So, what is likely happening is that you are adding these classpath entries and then an update project operation gets kicked off automatically. This will have the effect of removing all of your extra classpath entries.

You are best off doing the following:

  1. Updgrading STS
  2. Or just upgrading your m2e component (you will have to first uninstall the old m2e, but this should be taken care of automatically from the discovery update page).
  3. Or, just accept the fact that you can't manually change your classpath with the legacy m2e.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top