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 ability to pass maven coordinate in location #617

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

pranavgaikwad
Copy link
Contributor

Fixes #554

@@ -92,7 +92,7 @@ Here's an example config for `java` provider that is currently in-tree and does
}
```

The `location` can be a path to the application's source code or to a binary JAR, WAR, or EAR file.
The `location` can be a path to the application's source code or to a binary JAR, WAR, or EAR file. Optionally, coordinates to a maven artifact can be provided as input in the format `mvn://<group-id>.<artifact-id>:<version>:<classifier>:<path>`. The field `<path>` is optional, it specifies a local path where the artifact will be downloaded. If not specified, provider will use a temporary directory to download it.
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use something like @ or something that is not a part of a common URI for the path part?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a minor concern

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure can

Copy link
Contributor

@jmle jmle left a comment

Choose a reason for hiding this comment

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

Looks good, just one question

if strings.HasPrefix(config.Location, MvnURIPrefix) {
mvnUri := strings.Replace(config.Location, MvnURIPrefix, "", 1)
// URI format is <group>:<artifact>:<version>:<classifier>:<path>
// <path> is optional & points to a local path where it will be downloaded
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the classifier mandatory in the URL?

Copy link
Contributor Author

@pranavgaikwad pranavgaikwad Jun 12, 2024

Choose a reason for hiding this comment

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

@jmle yeah, in the hub UI, we have four fields including classifier (defaulted to JAR). I think I will default to JAR too if one isn't specified

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jmle done, defaulting to jar now

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.

Add support for taking maven artifact as input so addon doesnt have to deal with downloading artifacts
3 participants