squakez commented on code in PR #5126:
URL: https://github.com/apache/camel-k/pull/5126#discussion_r1476009977


##########
pkg/apis/camel/v1/maven_types_support.go:
##########
@@ -24,7 +24,11 @@ import (
 func (in *MavenArtifact) GetDependencyID() string {
        switch {
        case in.Version == "":
-               return "mvn:" + in.GroupID + ":" + in.ArtifactID
+               if in.Classifier == "" {
+                       return "mvn:" + in.GroupID + ":" + in.ArtifactID
+               } else {
+                       return "mvn:" + in.GroupID + ":" + in.ArtifactID + ":" 
+ in.Type + ":" + in.Classifier

Review Comment:
   Then we need to enforce a check to verify that both classifier and type are 
present. Something like: `if in.Classifier != "" && in.Type != ""` in order to 
avoid to have a possible runtime value such as "mvn:gid:art::classif". We may 
even see if an error return value makes sense.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to