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

fix: guide example docker Readme kafka-oauth-strimzi #237

Open
flo-kn opened this issue Apr 22, 2024 · 3 comments
Open

fix: guide example docker Readme kafka-oauth-strimzi #237

flo-kn opened this issue Apr 22, 2024 · 3 comments

Comments

@flo-kn
Copy link

flo-kn commented Apr 22, 2024

Blindly following the guide would produce this error when trying to mvn clean package:

User
how to fix? [INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.563 s
[INFO] Finished at: 2024-04-21T22:26:48+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.1:copy (copy) on project kafka-oauth-docker-strimzi-kafka: Unable to find/resolve artifact.: The following artifacts could not be resolved: io.strimzi:kafka-oauth-client:jar:1.0.0-SNAPSHOT (absent): Could not find artifact io.strimzi:kafka-oauth-client:jar:1.0.0-SNAPSHOT -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :kafka-oauth-docker-strimzi-kafka

Maven will complain about missing artifacts.

@flo-kn
Copy link
Author

flo-kn commented Apr 22, 2024

Made a PR#236 to fix this but rather would get some guidance on proper usage

@mstruk
Copy link
Contributor

mstruk commented Apr 22, 2024

The issue here is that the examples/docker/strimzi-kafka-image/README.md leads you to believe that you should run mvn clean package in examples/docker/strimzi-kafka-image directory. In fact you should run that command in the project root directory first, followed by running the same in examples/docker directory.

Then you should always run the docker-compose commands from examples/docker directory.
There is a docker examples README.md in examples/docker which is probably the only one we should keep and merge the information of all the other READMEs into that one, removing the others.

@flo-kn
Copy link
Author

flo-kn commented Apr 23, 2024

Thanks for the feedback in here and the help on the PR #236. Was able to make it work in my environment without the need to adjust the pom.xml files following these steps:

gh repo clone strimzi/strimzi-kafka-oauth
git fetch --tags
git checkout 0.15.0 # pick the latest release instead of latest development version (main)
cd examples/docker 
mvn clean install # install relying on parent POM referencing public maven artifacts from latest release, in this case version 0.15.0
docker rm -f kafka zookeeper keycloak spring
docker-compose -f compose.yml -f kafka-oauth-strimzi/compose.yml -f keycloak/compose.yml up --build

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 a pull request may close this issue.

2 participants