microservices-patterns / ftgo-application

Example code for the book Microservice patterns
Other
3.35k stars 1.29k forks source link

Many compilation errors after importing into STS? Am I missing something? #86

Closed prakashid2 closed 4 years ago

prakashid2 commented 4 years ago

Hi.

Steps I followed

  1. File -> Import -> Projects from Git(with smart import)
  2. Given URI. Host. Repository Path. etc.
  3. Clone sub projects
  4. Finish
  5. Configure -> Add Gradle Nature The 5th step took some time say 5 mins
  6. Did a clean build for all projects in the Workspace. Build Automatically was selected.

After this I'm seeing around 24 errors (see screnshot) in Workspace. Just opened one error from the OrderServiceServer.java. It's saying OrderServiceGrpc cannot be resolved to a type(see screenshot). How to get rid of this error in STS? The README file says something about building Contracts. Is this error related to same? On Command line I'm able to run gradlew buildContract without any errors. Is there a way in STS also to get rid of this error? How you used to do it in the dev?

Thanks Prakash S. Mumbai, India

prakashid2 commented 4 years ago

CompilationErrorsAfterImportingFromGithub

ImportingFromGitRepository-2

cer commented 4 years ago

Quick answer:

  1. git clone to the filesystem
  2. Run ./gradlew buildContracts assemble
  3. File->Import->Existing Gradle Project into Eclipse (you might need to install the buildship plugin)
cer commented 4 years ago

This commit should fix the grpc-related compilation errors.