google-cloud-eclipse icon indicating copy to clipboard operation
google-cloud-eclipse copied to clipboard

Setting up EGit local repo results in error for App Engine project

Open chanseokoh opened this issue 6 years ago • 3 comments

This is not possible to test in the hosted dev Eclipse, since EGit is not available on the dev target platform. Maybe it's a good idea to include it.

Steps to reproduce:

  1. Install CT4E on some actual Eclipse instance.
  2. Create an App Engine standard env project.
  3. Team > Share Project...
  4. Create.... A dialog pops up. The default location would work. Finish.
  5. Finish.

The error is

Archive for required library: '.../workspace/my-project/src/main/webapp/WEB-INF/lib/jstl-1.2.jar' in project 'my-project' cannot be read or is not a valid ZIP file

This could be a general problem of EGit when a project contains a library inside it. I tried the same steps on a plain Java project that embeds some JAR, and I got the same error.

chanseokoh avatar Jun 19 '18 15:06 chanseokoh

Works for me. Something's wrong with your zip file.

briandealwis avatar Jun 19 '18 16:06 briandealwis

The root cause:

All files in the project move to a new location. In my case, the project was originally under <my eclipse workspace>/my-project/, but after sharing the project, the directory moves to $HOME/git. Then the "Web App Libraries" container (of WTP) shows the error that <my eclipse workspace>/my-project/src/main/webapp/WEB-INF/lib/jstl-1.2.jar is missing, which is true as the files were physically moved.

So we are not at fault, and I'd say this is rather the limitation or bug of EGit that breaks library containers.

chanseokoh avatar Jun 19 '18 16:06 chanseokoh

That's odd as the Web App Libraries container just reflects the contents of the WEB-INF/lib folder. If those items were properly moved, then all should be well. Does a Project → Clean fix things?

briandealwis avatar Jun 23 '18 03:06 briandealwis