Skip to content

Missing files in kafka microservice streaming example #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
satyaelite opened this issue Aug 21, 2018 · 6 comments
Closed

Missing files in kafka microservice streaming example #144

satyaelite opened this issue Aug 21, 2018 · 6 comments

Comments

@satyaelite
Copy link

I have been trying to run the micro service example locally and I noticed that files like Orderstate , product are missing from the repo. Is it a mistake in packaging the code or I am missing something

@satyaelite satyaelite changed the title Missing files innkafka microservice streaming example Missing files in kafka microservice streaming example Aug 21, 2018
@Miro-Marinov
Copy link

Miro-Marinov commented Aug 25, 2018

@ksbalan2018 I think this is because on the master branch the parent pom's version atm is set to 5.1.0-SNAPSHOT which cannot be resolved as it isn't available in the confluent's maven repo. I'd suggest trying the following:

  1. Make sure you are on branch 5.0.0-post (or whatever the current latest -post version is)
  2. Run mvn clean install -Dmaven.test.skip=true

@yonigibbs
Copy link

I executed mvn clean install -Dmaven.test.skip=true but still no luck I'm afraid. Looks like the io.confluent.examples.streams.avro package is missing from the project, even when on the 5.0.0-post branch. I'm using IntelliJ, in case that makes a difference.

Where exactly should this package be? Is part of the build process meant to create it? If so, is it meant to generate a JAR, or some actual source files? Just so I know where to look to see if I can find the generated artefacts in case I need to manually add them to my project or something.

Thanks.

@guozhangwang
Copy link
Contributor

@yonigibbs ' issue has been resolved in #160 and I believe @Miro-Marinov 's response resolves @ksbalan2018 's issue, I'm closing this ticket for now.

@guozhangwang
Copy link
Contributor

@yonigibbs just to confirm I did the same command as above and did not encounter the reported issue.

@ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

@ scala -version
Scala code runner version 2.11.7 -- Copyright 2002-2013, LAMP/EPFL

@yonigibbs
Copy link

Cool, thanks very much for looking into this. I did a bit more investigation, and now think I've got to the bottom of this issue, so I'll explain in case anyone else comes across the problem.

Firstly, to answer my question above, the generated source files go here:

/target/generated-sources/io/confluent/examples/streams/avro

If you do encounter the problem, the solution is to find this folder in your IDE (I'm using IntelliJ in this case): /target/generated-sources, and mark it as a "generated sources root". That sorted out my project in IntelliJ.

Now as to why you couldn't replicate it, @guozhangwang: I believe it's to do with the order you do things in. If you do it in this order, the problem will not occur:

  1. Clone the repo
  2. Run mvn clean install -Dmaven.test.skip=true
  3. Open the project in IntelliJ
  4. Build the project in IntelliJ

However if you swap do steps 3 and 4 before 2, the problem will occur (at least it did in my case: IntelliJ on Ubuntu). For some reason IntelliJ doesn't recognise that generated-sources folder as one that contains generated sources. So the solution is simply to mark it as such (right-click on the folder -> Mark Directory as -> Generated Sources Root).

@guozhangwang
Copy link
Contributor

Thanks for letting me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants