Skip to content
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

Merged
merged 1 commit into from
Nov 19, 2021
Merged

Add pojo-jar example #2731

merged 1 commit into from
Nov 19, 2021

Conversation

dweber019
Copy link
Contributor

examples/pojo-jar/.gitignore Outdated Show resolved Hide resolved
examples/pojo-jar/README.md Outdated Show resolved Hide resolved
examples/pojo-jar/README.md Show resolved Hide resolved
examples/pojo-jar/README.md Outdated Show resolved Hide resolved
// 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
Copy link
Member

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?

Copy link
Contributor Author

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.

examples/pojo-jar/README.md Outdated Show resolved Hide resolved
@oscerd
Copy link
Contributor

oscerd commented Nov 9, 2021

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.

@dweber019
Copy link
Contributor Author

@oscerd @astefanutti @davsclaus do you need any assistance from my side?

@oscerd
Copy link
Contributor

oscerd commented Nov 12, 2021

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 :-)

examples/pojo-jar/README.md Show resolved Hide resolved
// 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
Copy link
Member

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?

Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Member

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.

@astefanutti
Copy link
Member

astefanutti commented Nov 12, 2021

Yes, I agree we can have it merged here and continue the discussion about examples location in a larger context.

Copy link
Contributor

@davsclaus davsclaus left a 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.

Copy link
Member

@astefanutti astefanutti left a 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!

@astefanutti astefanutti merged commit 119c1e0 into apache:main Nov 19, 2021
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

Successfully merging this pull request may close these issues.

None yet

4 participants