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

feat(cli/run): Support dependencies defined using HTTP URLs #3644

Merged
merged 1 commit into from
Sep 15, 2022

Conversation

essobedo
Copy link
Contributor

fixes #240

Motivation

We allow mvn: dependencies with camel: and runtime: wrapper. We should allow users to specify HTTP dependencies on libs (to load custom JAR that are not present in Maven central).

Modifications:

  • Downloads dependencies with http and https prefixes to a temporary folder
  • Uploads the temporary file like local files

Release Note

feat(cli/run): Support dependencies defined using HTTP URLs

@essobedo essobedo force-pushed the 240/http-dependencies branch from d73d1fa to db5202d Compare September 14, 2022 08:17
Copy link
Member

@tadayosi tadayosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg/cmd/run.go Outdated Show resolved Hide resolved
pkg/cmd/run.go Show resolved Hide resolved
pkg/cmd/run.go Outdated Show resolved Hide resolved
pkg/cmd/run.go Outdated Show resolved Hide resolved
@squakez
Copy link
Contributor

squakez commented Sep 14, 2022

Looks good, but it'd be great if there is e2e for the feature. Maybe here or here? https://github.com/apache/camel-k/blob/main/e2e/namespace/install/cli/run_test.go https://github.com/apache/camel-k/blob/main/e2e/global/registry/registry_maven_wagon_test.go

We can use the same jar used in the JVM trait:

source, err := ioutil.ReadFile("./files/jvm/sample-1.0.jar")
- we may just reference the http location of that one.

@essobedo essobedo force-pushed the 240/http-dependencies branch from db5202d to 03b758b Compare September 14, 2022 10:28
@@ -129,5 +129,14 @@ func TestKamelCLIRun(t *testing.T) {
// Clean up
Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
})
t.Run("Run with http dependency", func(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elegant way to reuse the test we already have but with a different scope. Kudos!

@essobedo essobedo requested a review from tadayosi September 14, 2022 13:26
@essobedo essobedo force-pushed the 240/http-dependencies branch from 03b758b to 4bd853f Compare September 14, 2022 15:50
@essobedo essobedo force-pushed the 240/http-dependencies branch from 4bd853f to 6b448c0 Compare September 14, 2022 16:08
@tadayosi tadayosi merged commit 520a50a into main Sep 15, 2022
@essobedo essobedo deleted the 240/http-dependencies branch December 14, 2022 10:03
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.

Let dependencies be defined using HTTP URLs
3 participants