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

Enhancement add classifier field to the MavenArtifact struct #5126

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

claudio4j
Copy link
Contributor

The classifier is relevant, since jolokia 2.0.0 jvm agent is resolved by using a GAV classifier.
The change in camel-k-catalog is in this PR #1161

Release Note

feature: add classifier field to the maven artifact structure

squakez
squakez previously requested changes Feb 1, 2024
Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

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

There are a few things to review. I'd avoid to change the jolokia until the new parameters are on the catalog (the final agent text will have more changes I think). However, the usage of classifier is something we should already provide.

pkg/apis/camel/v1/maven_types.go Outdated Show resolved Hide resolved
pkg/apis/camel/v1/maven_types_support.go Outdated Show resolved Hide resolved
pkg/util/camel/camel_dependencies.go Show resolved Hide resolved
pkg/util/maven/maven_project_test.go Outdated Show resolved Hide resolved
pkg/trait/jolokia.go Outdated Show resolved Hide resolved
@claudio4j claudio4j force-pushed the upstream/add_classifier branch 3 times, most recently from db5281b to 2abad36 Compare February 1, 2024 17:16
Classifier: "foo",
Version: "1.2",
}
assert.Equal(t, "mvn:org.mygroup:my-artifact::foo:1.2", a5.GetDependencyID())
Copy link
Contributor

Choose a reason for hiding this comment

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

the :: looks suspicious. Are they really expected that way?

Copy link
Contributor

github-actions bot commented Feb 7, 2024

✔️ Unit test coverage report - coverage increased from 35.6% to 35.7% (+0.1%)

Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

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

Okey, if I understand correctly, the regex still would expect in parameters such as type and classifier, and, is that case provides empty value ending up with a format like org.mygroup:my-artifact:::foo. Considering this is only used internally, I think it's good to go.

@squakez squakez merged commit 6e3080c into apache:main Feb 7, 2024
16 checks passed
@claudio4j
Copy link
Contributor Author

Originally the classifier was before the version but that was wrong, as the classifier must be after version.
Also, I reworked the ParseGAV function to accommodate the full GAV + classifier and it was a headache to change the regex, then I found it easier to use the split function and pick the elements from the array.
Thanks for reviewing.

@claudio4j claudio4j deleted the upstream/add_classifier branch February 8, 2024 10:25
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.

3 participants