-
Notifications
You must be signed in to change notification settings - Fork 345
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
Add pojo-jar example #2731
Add pojo-jar example #2731
Conversation
// camel-k: name=pojo-jar | ||
// camel-k: dependency=camel-jackson | ||
// camel-k: dependency=camel-openapi-java | ||
// camel-k: dependency=mvn:org.projectlombok:lombok:1.18.22 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be possible to remove Lombok to keep the example un-opinionated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes sure. @davsclaus what do you think as you explicitly asked for it in the issue comment.
LGTM, but I think we should maintain examples in a separated repository like we have here: https://github.com/apache/camel-k-examples Or if we don't want to have it separated, we need to discontinue the repository. |
@oscerd @astefanutti @davsclaus do you need any assistance from my side? |
I think we have everything we need, eventually we'll move the example in the other repo, but for the moment it's all ok. Lets wait for @astefanutti and @davsclaus :-) |
// camel-k: dependency=camel-jackson | ||
// camel-k: dependency=camel-openapi-java | ||
// camel-k: dependency=mvn:org.projectlombok:lombok:1.18.22 | ||
// camel-k: resource=file:../../../../../../target/pojo-jar-1.0.0.jar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be // camel-k: resource=file:./target/pojo-jar-1.0.0.jar
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes can we avoid all these weird parent folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did run the command like this and it worked. I think as it's defined as modeline the cwd/pwd is the java file I define in the kamel command. README => kamel run ./src/main/org/apache/camel/OpenApiRoute.java
So kamel changes the execution location to ./src/main/org/apache/camel/OpenApiRoute.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right, the resources are resolved relative to the current file location.
Yes, I agree we can have it merged here and continue the discussion about examples location in a larger context. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only nitpick is those ../../../ folder names. If the JAR is in the target folder then grab it there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good to go. Thanks!
originally from https://github.com/dweber019/camel-k-jar.
See #1821 (comment)