0

I imported a project from github into Eclipse (project A), using these steps: Importing a GitHub project into Eclipse

I have another app engine project I am building in Eclipse (project B). I would like to import a class from the project A to project B. I was trying to follow these steps: How can I refer to a class from another project in the same Workspace in Eclipse/Java

But when I go to project B's Java build path --> Projects --> Add, the select project window does not show the imported github project.

If I create another local Java project (project C), I can see project C as an option to add to project B's build path.

Community
  • 1
  • 1
  • Is the project from GitHub a Maven Project?? Did you imported as a Maven Project?? – Carlitos Way May 05 '16 at 03:41
  • this is the github project: https://github.com/google/gdata-java-client. I am not sure if it's a Maven project. Perhaps I should try and use this instead of importing the github project? https://developers.google.com/gdata/articles/eclipse#introduction – Yarin Feigenbaum May 05 '16 at 17:02

2 Answers2

0

Make sure you are copied project A into your workspace while import into eclipse.

There is a check box option for copy project into workspace in eclipse import project.

gamo
  • 1,549
  • 7
  • 24
  • 36
  • the github project (A) is imported into the same workspace folder as my app engine project (B), but it's still not showing up as an option to add to project B' buildpath – Yarin Feigenbaum May 05 '16 at 16:58
  • I didn't see a checkbox though, I just selected the workspace folder as the directory to import to – Yarin Feigenbaum May 05 '16 at 16:59
0

First, You will have to fix the project A at eclipse before importing into the project B... By fixing, I mean setup the source paths of the project A (example, the folder src/com/google, should be a source folder at the project A configuration)... The Project A must compile (if the project A cannot be compiled by eclipse, I doubt that you will have success at importing it into project B)

Another strategy would be use the ant script of the project A and import, as java library, the artecfacts generated by those ANT files into the project B.

Carlitos Way
  • 3,279
  • 20
  • 30