0

I'm using Eclipse with Egit/Github and Maven on Windows. Often but not always, when checking out a branch an error message is thrown indicating the pom.xml file could not be renamed which causes the checkout to fail. The file is locked by Windows, preventing the rename. Using Handle as suggested below shows Eclipse has the lock. Colleagues don't see this problem. I've installed an entirely different instance of Eclipse and cloned the repository to a different location and have the same results.

This all causes a great mess in my repository because Git does not have a rollback function on the checkout failure. All of the files from the go-to branch were copied in but git keeps the come-from branch as checked out. All of the files that differ between the branches are shown as modified. Cleanup takes a bit of work.

TheMuse
  • 11
  • 5
  • There's a sys internals tool called Handle (now Microsoft owns it) which can you give the application who has the lock on the file: https://learn.microsoft.com/en-us/sysinternals/downloads/handle Go and check with that to see which app is locking the file then depending on that we might provide more answers. – regulus Nov 03 '17 at 22:50
  • Are you and your colleagues using the same version of Eclipse? – nitind Nov 04 '17 at 05:06
  • Do you have another project including your problematic project as sub-project? Also, why is your build *renaming* the pom? (we may find a workaround this way) – Pierre B. Nov 04 '17 at 09:30
  • We are all using Neon 3. For an experiment I installed Oxygen and got the same results. There is only a single project, not multiple projects and no sub-projects. Git is renaming ._pom.xmlxxxxxx...xx.tmp to pom.xml as a part of the branch checkout. – TheMuse Nov 04 '17 at 22:39

2 Answers2

2

I'm having the same issue.

Unfortunately, I'm unable to switch to Bluemix set of tools.

In the meantime, waiting for IBM to fix this issue, I was able to work around this issue by performing manually Garbage Collection in Eclipse.

This is easily done by enabling GC button in status bar as show here: Eclipse: Garbage Collector Button

Press it, and locks on pom.xml are released!

GrumpyCrouton
  • 8,486
  • 7
  • 32
  • 71
Sławek
  • 21
  • 2
1

In the fog of eclipse plug-ins I was not able to find the exact answer, but this was the solution.

The problem was in the IBM Websphere and Bluemix plugins. There are several options for installing those plugins which results in different content.

From the Eclipse Marketplace:

  • The bad set came from Eclipse Marketplace from "IBM Liberty Developer Tools for Oxygen"
  • The good set came from "IBM Eclipse Tools for Bluemix Oxygen"

The problem plug-ins are these:

IBM Bluemix Tools 1.0.2.v20171004_2101 com.ibm.wdt.bluemixtools.feature.feature.group IBM
OSGi Application Development Tools 17.0.3000.v20171004_2101 com.ibm.osgi.wdt.feature.feature.group IBM
Web Development Tools 17.0.3000.v20171004_2101 com.ibm.wdt.webtools.top.feature.feature.group IBM
Web Services Development Tools 17.0.3000.v20171004_2101 com.ibm.wdt.ast.ws.tools.feature.feature.group IBM

The ones that work are these:

IBM Bluemix Tools 17.0.3000.v20171004_2330 com.ibm.cftools.ext.feature.feature.group IBM
WebSphere® Application Server Liberty Tools 1.0.2.v20171004_2330 com.ibm.cftools.server.tools.feature.feature.group IBM

These two came with either package, but are required in a websphere/bluemix installation.

Cloud Foundry Tools Core 1.2.3.v201709130027 org.eclipse.cft.server.core.feature.feature.group Eclipse Tools for Cloud Foundry
Cloud Foundry Tools UI 1.0.10.v201709130027 org.eclipse.cft.server.ui.feature.feature.group Eclipse Tools for Cloud Foundry

As of this writing this link has the current information on installing Bluemix / Websphere: https://console.bluemix.net/docs/manageapps/eclipsetools/eclipsetools.html#eclipsetools

TheMuse
  • 11
  • 5