jbangdev / jbang

Unleash the power of Java - JBang Lets Students, Educators and Professional Developers create, edit and run self-contained source-only Java programs with unprecedented ease.
https://jbang.dev
MIT License
1.38k stars 156 forks source link

Camel using Jbang | AWS Code Artifactory #1782

Open yuvanmytri opened 5 months ago

yuvanmytri commented 5 months ago

Is it possible to work with AWS Code Artifactory with Camel JBang?

I am trying to execute below.

camel run --name example timer2.camel.yaml Test.java --deps=io.confluent:kafka-protobuf-serializer:7.4.0,com.google.protobuf:protobuf-java:3.25.1,com.google.protobuf:protobuf-java-util:3.25.1,com.googlecode.protobuf-java-format:protobuf-java-format:1.4,com.test.camelk.utils:kafka-utils:0.0.5 --properties=application.properties --maven-settings=./settings.xml --repos=https://packages.confluent.io/maven/,https://test-gi-962144292115.d.codeartifact.us-east-1.amazonaws.com/maven/test-gi-artifacts/

https://github.com/ciseldevops/codeartifact-demo/blob/master/.m2/settings.xml

It keeps failing with 401 error.

Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: com.awmay.camelk.utils:kafka-utils:pom:0.0.5 (absent): Could not transfer artifact com.test.camelk.utils:kafka-utils:pom:0.0.5 from/to custom2 (https://test-gi-962144292115.d.codeartifact.us-east-1.amazonaws.com/maven/test-gi-artifacts/): status code: 401, reason phrase: Unauthorized (401)

maxandersen commented 5 months ago

I don't know aws artifactory but jbang will/should honor credentials configured in maven ~/.m2/settings.xml if it's present.

davsclaus commented 1 month ago

Try with latest camel-jbang release as we are using a newer maven downloader