Repository: apache/camel-k
Pull request #1903 (2021-01-13 10:09:01)

fix: Unique syntax for Maven artifact GAV string representation
This fixes duplication of dependencies caused by different GAV string representations. This PR drops the `mvn:group/artifact` representation in favour of the `mvn:group:artifact` one.

**Release Note**
```release-note
fix: Unique syntax for Maven artifact GAV string representation
```



Patch:
diff --git a/docs/modules/ROOT/pages/cli/modeline.adoc b/docs/modules/ROOT/pages/cli/modeline.adoc
index 7d77da3a4..bfc563b96 100644
--- a/docs/modules/ROOT/pages/cli/modeline.adoc
+++ b/docs/modules/ROOT/pages/cli/modeline.adoc
@@ -6,7 +6,7 @@ For example, take the following integration file:
 
 .Hello.java
 ----
-// camel-k: dependency=mvn:org.my/application:1.0 // <1>
+// camel-k: dependency=mvn:org.my:application:1.0 // <1>
 
 import org.apache.camel.builder.RouteBuilder;
 
@@ -32,7 +32,7 @@ The `kamel` CLI will alert you, printing the full command in the shell:
 ----
 $ kamel run Hello.java
 Modeline options have been loaded from source files
-Full command: kamel run Hello.java --dependency mvn:org.my/application:1.0
+Full command: kamel run Hello.java --dependency mvn:org.my:application:1.0
 ...
 ----
 
@@ -66,7 +66,7 @@ The following is a partial list of useful options:
 |Option | Description
 
 |dependency
-|An external library that should be included. E.g. for Maven dependencies "dependency=mvn:org.my/app:1.0"
+|An external library that should be included. E.g. for Maven dependencies "dependency=mvn:org.my:app:1.0"
 
 |env
 |Set an environment variable in the integration container. E.g "env=MY_VAR=my-value"
diff --git a/examples/SampleModeline.java b/examples/SampleModeline.java
index 2226d5099..31ff1b6a1 100644
--- a/examples/SampleModeline.java
+++ b/examples/SampleModeline.java
@@ -1,4 +1,4 @@
-// camel-k: dependency=mvn:com.google.guava/guava:28.0-jre
+// camel-k: dependency=mvn:com.google.guava:guava:28.0-jre
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
diff --git a/pkg/apis/camel/v1/camelcatalog_types_support.go b/pkg/apis/camel/v1/camelcatalog_types_support.go
index 85f6c9801..87fce768e 100644
--- a/pkg/apis/camel/v1/camelcatalog_types_support.go
+++ b/pkg/apis/camel/v1/camelcatalog_types_support.go
@@ -18,7 +18,6 @@ limitations under the License.
 package v1
 
 import (
-	"fmt"
 	"strings"
 
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -92,7 +91,7 @@ func (in *CamelArtifact) getDependencyIDs(schemeID string, scope func(CamelSchem
 	}
 	deps = make([]string, 0, len(ads))
 	for _, ad := range ads {
-		deps = append(deps, fmt.Sprintf("mvn:%s/%s", ad.GroupID, ad.ArtifactID))
+		deps = append(deps, ad.GetDependencyID())
 	}
 	return deps
 }
diff --git a/pkg/apis/camel/v1/common_types_support.go b/pkg/apis/camel/v1/common_types_support.go
index 396b52533..aec43a183 100644
--- a/pkg/apis/camel/v1/common_types_support.go
+++ b/pkg/apis/camel/v1/common_types_support.go
@@ -27,11 +27,19 @@ func (in *Artifact) String() string {
 	return in.ID
 }
 
+func (in *MavenArtifact) GetDependencyID() string {
+	switch {
+	case in.Version == "":
+		return "mvn:" + in.GroupID + ":" + in.ArtifactID
+	default:
+		return "mvn:" + in.GroupID + ":" + in.ArtifactID + ":" + in.Version
+	}
+}
+
 func (in *ConfigurationSpec) String() string {
 	return fmt.Sprintf("%s=%s", in.Type, in.Value)
 }
 
-// CapabilityDependencies ---
 func (in *RuntimeSpec) CapabilityDependencies(capability string) []MavenArtifact {
 	deps := make([]MavenArtifact, 0)
 
diff --git a/pkg/cmd/root.go b/pkg/cmd/root.go
index c56d3690e..183a7a8e5 100644
--- a/pkg/cmd/root.go
+++ b/pkg/cmd/root.go
@@ -160,6 +160,7 @@ func addHelpSubCommands(cmd *cobra.Command, options *RootCmdOptions) error {
 	if helpCmd == nil {
 		return errors.New("could not find any configured help command")
 	}
+	helpCmd.Annotations = map[string]string{offlineCommandLabel: "true"}
 
 	helpCmd.AddCommand(cmdOnly(newTraitHelpCmd(options)))
 
diff --git a/pkg/cmd/util_dependencies.go b/pkg/cmd/util_dependencies.go
index 2be4b02b2..94cc75702 100644
--- a/pkg/cmd/util_dependencies.go
+++ b/pkg/cmd/util_dependencies.go
@@ -42,32 +42,28 @@ var additionalDependencyUsageMessage = `Additional top-level dependencies are sp
 where <type> is one of {` + strings.Join(acceptedDependencyTypes, "|") + `}.`
 
 func getDependencies(args []string, additionalDependencies []string, repositories []string, allDependencies bool) ([]string, error) {
-	// Fetch existing catalog or create new one if one does not already exist.
+	// Fetch existing catalog or create new one if one does not already exist
 	catalog, err := createCamelCatalog()
 
-	// Get top-level dependencies.
+	// Get top-level dependencies
 	dependencies, err := getTopLevelDependencies(catalog, args)
 	if err != nil {
 		return nil, err
 	}
 
-	// Add additional user-provided dependencies.
+	// Add additional user-provided dependencies
 	if additionalDependencies != nil {
 		for _, additionalDependency := range additionalDependencies {
 			dependencies = append(dependencies, additionalDependency)
 		}
 	}
 
-	// Compute transitive dependencies.
+	// Compute transitive dependencies
 	if allDependencies {
 		// Add runtime dependency since this dependency is always required for running
 		// an integration. Only add this dependency if it has not been added already.
 		for _, runtimeDep := range catalog.Runtime.Dependencies {
-			dep := fmt.Sprintf("mvn:%s/%s", runtimeDep.GroupID, runtimeDep.ArtifactID)
-			if runtimeDep.Version != "" {
-				dep = dep + "/" + runtimeDep.Version
-			}
-			util.StringSliceUniqueAdd(&dependencies, dep)
+			util.StringSliceUniqueAdd(&dependencies, runtimeDep.GetDependencyID())
 		}
 
 		dependencies, err = getTransitiveDependencies(catalog, dependencies, repositories)
@@ -80,10 +76,10 @@ func getDependencies(args []string, additionalDependencies []string, repositorie
 }
 
 func getTopLevelDependencies(catalog *camel.RuntimeCatalog, args []string) ([]string, error) {
-	// List of top-level dependencies.
+	// List of top-level dependencies
 	dependencies := strset.New()
 
-	// Invoke the dependency inspector code for each source file.
+	// Invoke the dependency inspector code for each source file
 	for _, source := range args {
 		data, _, err := loadContent(source, false, false)
 		if err != nil {
@@ -98,7 +94,7 @@ func getTopLevelDependencies(catalog *camel.RuntimeCatalog, args []string) ([]st
 			},
 		}
 
-		// Extract list of top-level dependencies.
+		// Extract list of top-level dependencies
 		dependencies.Merge(trait.AddSourceDependencies(sourceSpec, catalog))
 	}
 
@@ -113,18 +109,18 @@ func getTransitiveDependencies(
 		LocalRepository: "",
 	}
 
-	// Create Maven project.
+	// Create Maven project
 	project := runtime.GenerateQuarkusProjectCommon(
 		catalog.CamelCatalogSpec.Runtime.Metadata["camel-quarkus.version"],
 		defaults.DefaultRuntimeVersion, catalog.CamelCatalogSpec.Runtime.Metadata["quarkus.version"])
 
-	// Inject dependencies into Maven project.
+	// Inject dependencies into Maven project
 	err := camel.ManageIntegrationDependencies(&project, dependencies, catalog)
 	if err != nil {
 		return nil, err
 	}
 
-	// Maven local context to be used for generating the transitive dependencies.
+	// Maven local context to be used for generating the transitive dependencies
 	mc := maven.NewContext(util.MavenWorkingDirectory, project)
 	mc.LocalRepository = mvn.LocalRepository
 	mc.Timeout = mvn.GetTimeout().Duration
@@ -147,7 +143,7 @@ func getTransitiveDependencies(
 		mc.SettingsContent = settingsData
 	}
 
-	// Make maven command less verbose.
+	// Make maven command less verbose
 	mc.AdditionalArguments = append(mc.AdditionalArguments, "-q")
 
 	err = runtime.BuildQuarkusRunnerCommon(mc)
@@ -155,20 +151,19 @@ func getTransitiveDependencies(
 		return nil, err
 	}
 
-	// Compute dependencies.
 	content, err := runtime.ComputeQuarkusDependenciesCommon(mc, catalog.Runtime.Version)
 	if err != nil {
 		return nil, err
 	}
 
-	// Compose artifacts list.
+	// Compose artifacts list
 	artifacts := []v1.Artifact{}
 	artifacts, err = runtime.ProcessQuarkusTransitiveDependencies(mc, content)
 	if err != nil {
 		return nil, err
 	}
 
-	// Dump dependencies in the dependencies directory and construct the list of dependencies.
+	// Dump dependencies in the dependencies directory and construct the list of dependencies
 	transitiveDependencies := []string{}
 	for _, entry := range artifacts {
 		transitiveDependencies = append(transitiveDependencies, entry.Location)
@@ -178,7 +173,7 @@ func getTransitiveDependencies(
 }
 
 func generateCatalog() (*camel.RuntimeCatalog, error) {
-	// A Camel catalog is requiref for this operatio.
+	// A Camel catalog is required for this operation
 	settings := ""
 	mvn := v1.MavenSpec{
 		LocalRepository: "",
@@ -197,13 +192,13 @@ func generateCatalog() (*camel.RuntimeCatalog, error) {
 }
 
 func createCamelCatalog() (*camel.RuntimeCatalog, error) {
-	// Attempt to reuse existing Camel catalog if one is present.
+	// Attempt to reuse existing Camel catalog if one is present
 	catalog, err := camel.DefaultCatalog()
 	if err != nil {
 		return nil, err
 	}
 
-	// Generate catalog if one was not found.
+	// Generate catalog if one was not found
 	if catalog == nil {
 		catalog, err = generateCatalog()
 		if err != nil {
@@ -221,7 +216,7 @@ func outputDependencies(dependencies []string, format string) error {
 			return err
 		}
 	} else {
-		// Print output in text form.
+		// Print output in text form
 		for _, dep := range dependencies {
 			fmt.Printf("%v\n", dep)
 		}
@@ -230,16 +225,16 @@ func outputDependencies(dependencies []string, format string) error {
 	return nil
 }
 
-func printDependencies(format string, dependecies []string) error {
+func printDependencies(format string, dependencies []string) error {
 	switch format {
 	case "yaml":
-		data, err := util.DependenciesToYAML(dependecies)
+		data, err := util.DependenciesToYAML(dependencies)
 		if err != nil {
 			return err
 		}
 		fmt.Print(string(data))
 	case "json":
-		data, err := util.DependenciesToJSON(dependecies)
+		data, err := util.DependenciesToJSON(dependencies)
 		if err != nil {
 			return err
 		}
@@ -253,12 +248,10 @@ func printDependencies(format string, dependecies []string) error {
 func validateFile(file string) error {
 	fileExists, err := util.FileExists(file)
 
-	// Report any error.
 	if err != nil {
 		return err
 	}
 
-	// Signal file not found.
 	if !fileExists {
 		return errors.New("File " + file + " file does not exist")
 	}
@@ -267,7 +260,7 @@ func validateFile(file string) error {
 }
 
 func validateFiles(args []string) error {
-	// Ensure source files exist.
+	// Ensure source files exist
 	for _, arg := range args {
 		err := validateFile(arg)
 		if err != nil {
@@ -279,8 +272,7 @@ func validateFiles(args []string) error {
 }
 
 func validateAdditionalDependencies(additionalDependencies []string) error {
-	// Validate list of additional dependencies i.e. make sure that each dependency has
-	// a valid type.
+	// Validate list of additional dependencies i.e. make sure that each dependency has a valid type
 	if additionalDependencies != nil {
 		for _, additionalDependency := range additionalDependencies {
 			isValid := validateDependency(additionalDependency)
@@ -338,8 +330,8 @@ func validatePropertyFiles(propertyFiles []string) error {
 }
 
 func updateIntegrationProperties(properties []string, propertyFiles []string) ([]string, error) {
-	// Create properties directory under Maven working directory. This ensures that
-	// property files of different integrations do not clash.
+	// Create properties directory under Maven working directory.
+	// This ensures that property files of different integrations do not clash.
 	err := util.CreateLocalPropertiesDirectory()
 	if err != nil {
 		return nil, err
@@ -363,59 +355,53 @@ func updateIntegrationProperties(properties []string, propertyFiles []string) ([
 		relocatedPropertyFiles = append(relocatedPropertyFiles, propertyFilePath)
 	}
 
-	// Return relocated PropertyFiles.
 	return relocatedPropertyFiles, nil
 }
 
 func updateIntegrationDependencies(dependencies []string) error {
-	// Create dependencies directory under Maven working directory. This ensures that
-	// dependencies will be removed after they are not needed.
+	// Create dependencies directory under Maven working directory.
+	// This ensures that dependencies will be removed after they are not needed.
 	err := util.CreateLocalDependenciesDirectory()
 	if err != nil {
 		return err
 	}
 
-	// Relocate dependencies files to this integration's dependencies directory.
+	// Relocate dependencies files to this integration's dependencies directory
 	for _, dependency := range dependencies {
 		util.CopyFile(dependency, path.Join(util.GetLocalDependenciesDir(), path.Base(dependency)))
 	}
 
-	// Return relocated PropertyFiles.
 	return nil
 }
 
 func updateIntegrationRoutes(routes []string) error {
-	// Create dependencies directory under Maven working directory. This ensures that
-	// dependencies will be removed after they are not needed.
 	err := util.CreateLocalRoutesDirectory()
 	if err != nil {
 		return err
 	}
 
-	// Relocate dependencies files to this integration's dependencies directory.
 	for _, route := range routes {
 		util.CopyFile(route, path.Join(util.GetLocalRoutesDir(), path.Base(route)))
 	}
 
-	// Return relocated PropertyFiles.
 	return nil
 }
 
 func createMavenWorkingDirectory() error {
-	// Create local Maven context.
+	// Create local Maven context
 	temporaryDirectory, err := ioutil.TempDir(os.TempDir(), "maven-")
 	if err != nil {
 		return err
 	}
 
-	// Set the Maven directory to the default value.
+	// Set the Maven directory to the default value
 	util.MavenWorkingDirectory = temporaryDirectory
 
 	return nil
 }
 
 func deleteMavenWorkingDirectory() error {
-	// Remove directory used for computing the dependencies.
+	// Remove directory used for computing the dependencies
 	defer os.RemoveAll(util.MavenWorkingDirectory)
 
 	return nil
diff --git a/pkg/trait/container.go b/pkg/trait/container.go
index 4d84f77a9..625503f53 100644
--- a/pkg/trait/container.go
+++ b/pkg/trait/container.go
@@ -19,16 +19,19 @@ package trait
 
 import (
 	"fmt"
-	v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
-	"github.com/apache/camel-k/pkg/util"
-	"github.com/apache/camel-k/pkg/util/envvar"
+	"sort"
+
 	appsv1 "k8s.io/api/apps/v1"
 	"k8s.io/api/batch/v1beta1"
 	corev1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/api/resource"
 	"k8s.io/apimachinery/pkg/util/intstr"
+
 	serving "knative.dev/serving/pkg/apis/serving/v1"
-	"sort"
+
+	v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
+	"github.com/apache/camel-k/pkg/util"
+	"github.com/apache/camel-k/pkg/util/envvar"
 )
 
 const (
@@ -160,7 +163,7 @@ func (t *containerTrait) configureDependencies(e *Environment) {
 	if e.IntegrationInPhase(v1.IntegrationPhaseInitialization) {
 		if capability, ok := e.CamelCatalog.Runtime.Capabilities[v1.CapabilityHealth]; ok {
 			for _, dependency := range capability.Dependencies {
-				util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, fmt.Sprintf("mvn:%s/%s", dependency.GroupID, dependency.ArtifactID))
+				util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, dependency.GetDependencyID())
 			}
 
 			// sort the dependencies to get always the same list if they don't change
@@ -398,9 +401,6 @@ func (t *containerTrait) configureHTTP(e *Environment) error {
 	default:
 		return fmt.Errorf("unsupported runtime: %s", e.CamelCatalog.Runtime.Provider)
 	}
-
-	return nil
-
 }
 
 func (t *containerTrait) configureCapabilities(e *Environment) error {
diff --git a/pkg/trait/dependencies.go b/pkg/trait/dependencies.go
index 3a5df8083..994d046b4 100644
--- a/pkg/trait/dependencies.go
+++ b/pkg/trait/dependencies.go
@@ -18,13 +18,12 @@ limitations under the License.
 package trait
 
 import (
-	"fmt"
+	"github.com/scylladb/go-set/strset"
 
 	v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/pkg/metadata"
 	"github.com/apache/camel-k/pkg/util"
 	"github.com/apache/camel-k/pkg/util/kubernetes"
-	"github.com/scylladb/go-set/strset"
 )
 
 // The Dependencies trait is internally used to automatically add runtime dependencies based on the
@@ -60,9 +59,9 @@ func (t *dependenciesTrait) Apply(e *Environment) error {
 		dependencies.Add(e.Integration.Spec.Dependencies...)
 	}
 
-	// add runtime specific dependencies
+	// Add runtime specific dependencies
 	for _, d := range e.CamelCatalog.Runtime.Dependencies {
-		dependencies.Add(fmt.Sprintf("mvn:%s/%s", d.GroupID, d.ArtifactID))
+		dependencies.Add(d.GetDependencyID())
 	}
 
 	sources, err := kubernetes.ResolveIntegrationSources(e.C, e.Client, e.Integration, e.Resources)
@@ -70,7 +69,7 @@ func (t *dependenciesTrait) Apply(e *Environment) error {
 		return err
 	}
 	for _, s := range sources {
-		// Add source-related dependencies.
+		// Add source-related dependencies
 		dependencies.Merge(AddSourceDependencies(s, e.CamelCatalog))
 
 		meta := metadata.Extract(e.CamelCatalog, s)
@@ -80,7 +79,7 @@ func (t *dependenciesTrait) Apply(e *Environment) error {
 		})
 	}
 
-	// add dependencies back to integration
+	// Add dependencies back to integration
 	dependencies.Each(func(item string) bool {
 		util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, item)
 		return true
diff --git a/pkg/trait/init.go b/pkg/trait/init.go
index 968583251..07b923dce 100644
--- a/pkg/trait/init.go
+++ b/pkg/trait/init.go
@@ -18,7 +18,6 @@ limitations under the License.
 package trait
 
 import (
-	"fmt"
 	"sort"
 
 	"github.com/pkg/errors"
@@ -81,7 +80,7 @@ func (t *initTrait) Apply(e *Environment) error {
 				// add runtime specific dependencies
 				for _, capability := range e.Integration.Status.Capabilities {
 					for _, dependency := range e.CamelCatalog.Runtime.CapabilityDependencies(capability) {
-						util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, fmt.Sprintf("mvn:%s/%s", dependency.GroupID, dependency.ArtifactID))
+						util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, dependency.GetDependencyID())
 					}
 				}
 			}
diff --git a/pkg/trait/jolokia.go b/pkg/trait/jolokia.go
index d303307f2..c9b0bbdf6 100644
--- a/pkg/trait/jolokia.go
+++ b/pkg/trait/jolokia.go
@@ -89,12 +89,12 @@ func (t *jolokiaTrait) Apply(e *Environment) (err error) {
 
 		switch e.CamelCatalog.Runtime.Provider {
 		case v1.RuntimeProviderQuarkus:
-			util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.apache.camel.quarkus/camel-quarkus-management")
+			util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.apache.camel.quarkus:camel-quarkus-management")
 			util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "camel-quarkus:jaxb")
 		}
 
 		// TODO: We may want to make the Jolokia version configurable
-		util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.jolokia/jolokia-jvm:jar:agent:1.6.2")
+		util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.jolokia:jolokia-jvm:jar:agent:1.6.2")
 
 		return nil
 	}
diff --git a/pkg/trait/knative.go b/pkg/trait/knative.go
index dbef97d44..f085f4722 100644
--- a/pkg/trait/knative.go
+++ b/pkg/trait/knative.go
@@ -24,6 +24,15 @@ import (
 	"strconv"
 	"strings"
 
+	"github.com/pkg/errors"
+
+	corev1 "k8s.io/api/core/v1"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
+	"k8s.io/apimachinery/pkg/runtime"
+
+	eventing "knative.dev/eventing/pkg/apis/eventing/v1beta1"
+	serving "knative.dev/serving/pkg/apis/serving/v1"
+
 	v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
 	knativeapi "github.com/apache/camel-k/pkg/apis/camel/v1/knative"
 	"github.com/apache/camel-k/pkg/metadata"
@@ -31,12 +40,6 @@ import (
 	"github.com/apache/camel-k/pkg/util/envvar"
 	knativeutil "github.com/apache/camel-k/pkg/util/knative"
 	"github.com/apache/camel-k/pkg/util/kubernetes"
-	"github.com/pkg/errors"
-	corev1 "k8s.io/api/core/v1"
-	k8serrors "k8s.io/apimachinery/pkg/api/errors"
-	"k8s.io/apimachinery/pkg/runtime"
-	eventing "knative.dev/eventing/pkg/apis/eventing/v1beta1"
-	serving "knative.dev/serving/pkg/apis/serving/v1"
 )
 
 // The Knative trait automatically discovers addresses of Knative resources and inject them into the
@@ -223,14 +226,14 @@ func (t *knativeTrait) Apply(e *Environment) error {
 		// Interceptor may have been set by a Knative CamelSource
 		if util.StringSliceExists(e.getAllInterceptors(), "knative-source") {
 			// Adding required libraries for Camel sources
-			util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.apache.camel.k/camel-knative")
-			util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.apache.camel.k/camel-k-knative")
-			util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.apache.camel.k/camel-k-knative-producer")
+			util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.apache.camel.k:camel-knative")
+			util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.apache.camel.k:camel-k-knative")
+			util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.apache.camel.k:camel-k-knative-producer")
 		}
 	}
 
 	if t.SinkBinding != nil && *t.SinkBinding {
-		util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.apache.camel.k/camel-k-knative")
+		util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.apache.camel.k:camel-k-knative")
 	}
 
 	if len(t.ChannelSources) > 0 || len(t.EndpointSources) > 0 || len(t.EventSources) > 0 {
diff --git a/pkg/trait/prometheus.go b/pkg/trait/prometheus.go
index aa762c436..1ce9505e9 100644
--- a/pkg/trait/prometheus.go
+++ b/pkg/trait/prometheus.go
@@ -85,7 +85,7 @@ func (t *prometheusTrait) Apply(e *Environment) (err error) {
 		switch e.CamelCatalog.Runtime.Provider {
 		case v1.RuntimeProviderQuarkus:
 			// Add the Camel Quarkus MP Metrics extension
-			util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.apache.camel.quarkus/camel-quarkus-microprofile-metrics")
+			util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.apache.camel.quarkus:camel-quarkus-microprofile-metrics")
 		}
 		return nil
 	}
diff --git a/pkg/trait/util.go b/pkg/trait/util.go
index d8381bb46..a0b7823f6 100644
--- a/pkg/trait/util.go
+++ b/pkg/trait/util.go
@@ -55,7 +55,6 @@ func GetIntegrationKit(ctx context.Context, c client.Client, integration *v1.Int
 	return &kit, err
 }
 
-// CollectConfigurationValues --
 func CollectConfigurationValues(configurationType string, configurable ...v1.Configurable) []string {
 	result := strset.New()
 
@@ -83,7 +82,6 @@ func CollectConfigurationValues(configurationType string, configurable ...v1.Con
 	return s
 }
 
-// CollectConfigurationPairs --
 func CollectConfigurationPairs(configurationType string, configurable ...v1.Configurable) map[string]string {
 	result := make(map[string]string)
 
@@ -159,31 +157,30 @@ func toHostDir(host string) string {
 	return toFileName.ReplaceAllString(h, "_")
 }
 
-// AddSourceDependencies --
 func AddSourceDependencies(source v1.SourceSpec, catalog *camel.RuntimeCatalog) *strset.Set {
 	dependencies := strset.New()
 
-	// Add auto-detected dependencies.
+	// Add auto-detected dependencies
 	meta := metadata.Extract(catalog, source)
 	dependencies.Merge(meta.Dependencies)
 
-	// Add loader dependencies.
+	// Add loader dependencies
 	lang := source.InferLanguage()
 	for loader, v := range catalog.Loaders {
 		// add loader specific dependencies
 		if source.Loader != "" && source.Loader == loader {
-			dependencies.Add(fmt.Sprintf("mvn:%s/%s", v.GroupID, v.ArtifactID))
+			dependencies.Add(v.GetDependencyID())
 
 			for _, d := range v.Dependencies {
-				dependencies.Add(fmt.Sprintf("mvn:%s/%s", d.GroupID, d.ArtifactID))
+				dependencies.Add(d.GetDependencyID())
 			}
 		} else if source.Loader == "" {
 			// add language specific dependencies
 			if util.StringSliceExists(v.Languages, string(lang)) {
-				dependencies.Add(fmt.Sprintf("mvn:%s/%s", v.GroupID, v.ArtifactID))
+				dependencies.Add(v.GetDependencyID())
 
 				for _, d := range v.Dependencies {
-					dependencies.Add(fmt.Sprintf("mvn:%s/%s", d.GroupID, d.ArtifactID))
+					dependencies.Add(d.GetDependencyID())
 				}
 			}
 		}
diff --git a/pkg/util/camel/camel_dependencies.go b/pkg/util/camel/camel_dependencies.go
index eb0dbf4aa..d7718ffe2 100644
--- a/pkg/util/camel/camel_dependencies.go
+++ b/pkg/util/camel/camel_dependencies.go
@@ -36,8 +36,7 @@ func ManageIntegrationDependencies(
 	for _, d := range dependencies {
 		switch {
 		case strings.HasPrefix(d, "bom:"):
-			mid := strings.TrimPrefix(d, "bom:")
-			gav := strings.Replace(mid, "/", ":", -1)
+			gav := strings.TrimPrefix(d, "bom:")
 
 			d, err := maven.ParseGAV(gav)
 			if err != nil {
@@ -76,8 +75,7 @@ func ManageIntegrationDependencies(
 
 			project.AddDependencyGAV("org.apache.camel.quarkus", artifactID, "")
 		case strings.HasPrefix(d, "mvn:"):
-			mid := strings.TrimPrefix(d, "mvn:")
-			gav := strings.Replace(mid, "/", ":", -1)
+			gav := strings.TrimPrefix(d, "mvn:")
 
 			project.AddEncodedDependencyGAV(gav)
 		default:
diff --git a/pkg/util/source/inspector.go b/pkg/util/source/inspector.go
index 6de2cb065..746a03af1 100644
--- a/pkg/util/source/inspector.go
+++ b/pkg/util/source/inspector.go
@@ -18,7 +18,6 @@ limitations under the License.
 package source
 
 import (
-	"fmt"
 	"regexp"
 	"strings"
 
@@ -30,7 +29,7 @@ import (
 type catalog2deps func(*camel.RuntimeCatalog) []string
 
 const (
-	defaultJsonDataformat = "json-jackson"
+	defaultJsonDataFormat = "json-jackson"
 )
 
 var (
@@ -65,14 +64,14 @@ var (
 	sourceDependencies = map[*regexp.Regexp]catalog2deps{
 		jsonLibraryRegexp: func(catalog *camel.RuntimeCatalog) []string {
 			res := make([]string, 0)
-			if jsonDF := catalog.GetArtifactByDataFormat(defaultJsonDataformat); jsonDF != nil {
+			if jsonDF := catalog.GetArtifactByDataFormat(defaultJsonDataFormat); jsonDF != nil {
 				res = append(res, jsonDF.GetDependencyID())
 			}
 			return res
 		},
 		jsonLanguageRegexp: func(catalog *camel.RuntimeCatalog) []string {
 			res := make([]string, 0)
-			if jsonDF := catalog.GetArtifactByDataFormat(defaultJsonDataformat); jsonDF != nil {
+			if jsonDF := catalog.GetArtifactByDataFormat(defaultJsonDataFormat); jsonDF != nil {
 				res = append(res, jsonDF.GetDependencyID())
 			}
 			return res
@@ -81,7 +80,7 @@ var (
 			deps := make([]string, 0)
 			if c, ok := catalog.CamelCatalogSpec.Runtime.Capabilities["rest"]; ok {
 				for _, d := range c.Dependencies {
-					deps = append(deps, fmt.Sprintf("mvn:%s/%s", d.GroupID, d.ArtifactID))
+					deps = append(deps, d.GetDependencyID())
 				}
 			}
 			return deps
@@ -90,7 +89,7 @@ var (
 			deps := make([]string, 0)
 			if c, ok := catalog.CamelCatalogSpec.Runtime.Capabilities["rest"]; ok {
 				for _, d := range c.Dependencies {
-					deps = append(deps, fmt.Sprintf("mvn:%s/%s", d.GroupID, d.ArtifactID))
+					deps = append(deps, d.GetDependencyID())
 				}
 			}
 			return deps
@@ -99,7 +98,7 @@ var (
 			deps := make([]string, 0)
 			if c, ok := catalog.CamelCatalogSpec.Runtime.Capabilities["rest"]; ok {
 				for _, d := range c.Dependencies {
-					deps = append(deps, fmt.Sprintf("mvn:%s/%s", d.GroupID, d.ArtifactID))
+					deps = append(deps, d.GetDependencyID())
 				}
 			}
 			return deps
diff --git a/pkg/util/source/inspector_yaml.go b/pkg/util/source/inspector_yaml.go
index bcfa6cf4a..213fbf80d 100644
--- a/pkg/util/source/inspector_yaml.go
+++ b/pkg/util/source/inspector_yaml.go
@@ -67,7 +67,7 @@ func (i YAMLInspector) parseStep(key string, content interface{}, meta *Metadata
 	case "marshal":
 		if cm, ok := content.(map[interface{}]interface{}); ok {
 			if js, jsOk := cm["json"]; jsOk {
-				dataFormatID := defaultJsonDataformat
+				dataFormatID := defaultJsonDataFormat
 				if jsContent, jsContentOk := js.(map[interface{}]interface{}); jsContentOk {
 					if lib, libOk := jsContent["library"]; libOk {
 						dataFormatID = strings.ToLower(fmt.Sprintf("json-%s", lib))


Test patch:
diff --git a/pkg/apis/camel/v1/integration_types_support_test.go b/pkg/apis/camel/v1/integration_types_support_test.go
index 82320a057..0f028172a 100644
--- a/pkg/apis/camel/v1/integration_types_support_test.go
+++ b/pkg/apis/camel/v1/integration_types_support_test.go
@@ -66,8 +66,8 @@ func TestAddDependency(t *testing.T) {
 	assert.Equal(t, integration.Dependencies, []string{"camel:file"})
 
 	integration = IntegrationSpec{}
-	integration.AddDependency("mvn:com.my/company")
-	assert.Equal(t, integration.Dependencies, []string{"mvn:com.my/company"})
+	integration.AddDependency("mvn:com.my:company")
+	assert.Equal(t, integration.Dependencies, []string{"mvn:com.my:company"})
 
 	integration = IntegrationSpec{}
 	integration.AddDependency("file:dep")
diff --git a/pkg/cmd/modeline_test.go b/pkg/cmd/modeline_test.go
index ca6037af4..9bc001b48 100644
--- a/pkg/cmd/modeline_test.go
+++ b/pkg/cmd/modeline_test.go
@@ -33,7 +33,7 @@ func TestModelineRunSimple(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	file := `
-		// camel-k: dependency=mvn:org.my/lib:1.0
+		// camel-k: dependency=mvn:org.my:lib:1.0
 	`
 	fileName := path.Join(dir, "simple.groovy")
 	err = ioutil.WriteFile(fileName, []byte(file), 0777)
@@ -42,7 +42,7 @@ func TestModelineRunSimple(t *testing.T) {
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName})
 	assert.NoError(t, err)
 	assert.NotNil(t, cmd)
-	assert.Equal(t, []string{"run", fileName, "--dependency=mvn:org.my/lib:1.0"}, flags)
+	assert.Equal(t, []string{"run", fileName, "--dependency=mvn:org.my:lib:1.0"}, flags)
 }
 
 func TestModelineRunHelp(t *testing.T) {
@@ -64,16 +64,16 @@ func TestModelineRunChain(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	file := `
-		// camel-k: dependency=mvn:org.my/lib:2.0
+		// camel-k: dependency=mvn:org.my:lib:2.0
 	`
 	fileName := path.Join(dir, "simple.groovy")
 	err = ioutil.WriteFile(fileName, []byte(file), 0777)
 	assert.NoError(t, err)
 
-	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", "-d", "mvn:org.my/lib2:1.0", fileName})
+	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", "-d", "mvn:org.my:lib2:1.0", fileName})
 	assert.NoError(t, err)
 	assert.NotNil(t, cmd)
-	assert.Equal(t, []string{"run", "-d", "mvn:org.my/lib2:1.0", fileName, "--dependency=mvn:org.my/lib:2.0"}, flags)
+	assert.Equal(t, []string{"run", "-d", "mvn:org.my:lib2:1.0", fileName, "--dependency=mvn:org.my:lib:2.0"}, flags)
 }
 
 func TestModelineRunMultipleFiles(t *testing.T) {
@@ -82,14 +82,14 @@ func TestModelineRunMultipleFiles(t *testing.T) {
 	defer os.RemoveAll(dir)
 
 	file := `
-		// camel-k: dependency=mvn:org.my/lib1:3.0
+		// camel-k: dependency=mvn:org.my:lib1:3.0
 	`
 	fileName := path.Join(dir, "simple.groovy")
 	err = ioutil.WriteFile(fileName, []byte(file), 0777)
 	assert.NoError(t, err)
 
 	file2 := `
-		// camel-k: dependency=mvn:org.my/lib2:3.0
+		// camel-k: dependency=mvn:org.my:lib2:3.0
 	`
 	fileName2 := path.Join(dir, "ext.groovy")
 	err = ioutil.WriteFile(fileName2, []byte(file2), 0777)
@@ -98,7 +98,7 @@ func TestModelineRunMultipleFiles(t *testing.T) {
 	cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName, fileName2})
 	assert.NoError(t, err)
 	assert.NotNil(t, cmd)
-	assert.Equal(t, []string{"run", fileName, fileName2, "--dependency=mvn:org.my/lib1:3.0", "--dependency=mvn:org.my/lib2:3.0"}, flags)
+	assert.Equal(t, []string{"run", fileName, fileName2, "--dependency=mvn:org.my:lib1:3.0", "--dependency=mvn:org.my:lib2:3.0"}, flags)
 }
 
 func TestModelineRunPropertyFiles(t *testing.T) {
diff --git a/pkg/metadata/metadata_dependencies_test.go b/pkg/metadata/metadata_dependencies_test.go
index bb1c4943f..03dfe65d4 100644
--- a/pkg/metadata/metadata_dependencies_test.go
+++ b/pkg/metadata/metadata_dependencies_test.go
@@ -373,8 +373,8 @@ func TestRestDependency(t *testing.T) {
 			"camel-quarkus:http",
 			"camel-quarkus:direct",
 			"camel-quarkus:log",
-			"mvn:org.apache.camel.quarkus/camel-quarkus-rest",
-			"mvn:org.apache.camel.quarkus/camel-quarkus-platform-http",
+			"mvn:org.apache.camel.quarkus:camel-quarkus-rest",
+			"mvn:org.apache.camel.quarkus:camel-quarkus-platform-http",
 		},
 		meta.Dependencies.List())
 }
@@ -404,8 +404,8 @@ func TestRestWithPathDependency(t *testing.T) {
 			"camel-quarkus:http",
 			"camel-quarkus:direct",
 			"camel-quarkus:log",
-			"mvn:org.apache.camel.quarkus/camel-quarkus-rest",
-			"mvn:org.apache.camel.quarkus/camel-quarkus-platform-http",
+			"mvn:org.apache.camel.quarkus:camel-quarkus-rest",
+			"mvn:org.apache.camel.quarkus:camel-quarkus-platform-http",
 		},
 		meta.Dependencies.List())
 }
@@ -433,8 +433,8 @@ func TestRestConfigurationDependency(t *testing.T) {
 		t, []string{
 			"camel-quarkus:http",
 			"camel-quarkus:log",
-			"mvn:org.apache.camel.quarkus/camel-quarkus-rest",
-			"mvn:org.apache.camel.quarkus/camel-quarkus-platform-http",
+			"mvn:org.apache.camel.quarkus:camel-quarkus-rest",
+			"mvn:org.apache.camel.quarkus:camel-quarkus-platform-http",
 		},
 		meta.Dependencies.List())
 }
@@ -463,8 +463,8 @@ func TestRestClosureDependencyGroovy(t *testing.T) {
 		[]string{
 			"camel-quarkus:http",
 			"camel-quarkus:log",
-			"mvn:org.apache.camel.quarkus/camel-quarkus-rest",
-			"mvn:org.apache.camel.quarkus/camel-quarkus-platform-http",
+			"mvn:org.apache.camel.quarkus:camel-quarkus-rest",
+			"mvn:org.apache.camel.quarkus:camel-quarkus-platform-http",
 		},
 		meta.Dependencies.List())
 }
@@ -493,8 +493,8 @@ func TestRestClosureDependencyKotlin(t *testing.T) {
 		[]string{
 			"camel-quarkus:http",
 			"camel-quarkus:log",
-			"mvn:org.apache.camel.quarkus/camel-quarkus-rest",
-			"mvn:org.apache.camel.quarkus/camel-quarkus-platform-http",
+			"mvn:org.apache.camel.quarkus:camel-quarkus-rest",
+			"mvn:org.apache.camel.quarkus:camel-quarkus-platform-http",
 		},
 		meta.Dependencies.List())
 }
diff --git a/pkg/trait/container_probes_test.go b/pkg/trait/container_probes_test.go
index c676a6c13..57fb6fb8f 100644
--- a/pkg/trait/container_probes_test.go
+++ b/pkg/trait/container_probes_test.go
@@ -75,7 +75,7 @@ func TestProbesDepsQuarkus(t *testing.T) {
 
 	err = ctr.Apply(&env)
 	assert.Nil(t, err)
-	assert.Contains(t, env.Integration.Status.Dependencies, "mvn:org.apache.camel.quarkus/camel-quarkus-microprofile-health")
+	assert.Contains(t, env.Integration.Status.Dependencies, "mvn:org.apache.camel.quarkus:camel-quarkus-microprofile-health")
 }
 
 func TestProbesOnDeployment(t *testing.T) {
diff --git a/pkg/trait/cron_test.go b/pkg/trait/cron_test.go
index 9848843c2..07f77faa4 100644
--- a/pkg/trait/cron_test.go
+++ b/pkg/trait/cron_test.go
@@ -287,7 +287,7 @@ func TestCronDeps(t *testing.T) {
 	assert.NotNil(t, ct)
 	assert.Nil(t, ct.Fallback)
 	assert.True(t, util.StringSliceExists(environment.Integration.Status.Capabilities, v1.CapabilityCron))
-	assert.Contains(t, environment.Integration.Status.Dependencies, "mvn:org.apache.camel.k/camel-k-cron")
+	assert.Contains(t, environment.Integration.Status.Dependencies, "mvn:org.apache.camel.k:camel-k-cron")
 }
 
 func TestCronDepsFallback(t *testing.T) {
@@ -362,7 +362,7 @@ func TestCronDepsFallback(t *testing.T) {
 	assert.NotNil(t, ct.Fallback)
 	assert.True(t, util.StringSliceExists(environment.Integration.Status.Capabilities, v1.CapabilityCron))
 	assert.Contains(t, environment.Integration.Status.Dependencies, "camel-quarkus:quartz")
-	assert.Contains(t, environment.Integration.Status.Dependencies, "mvn:org.apache.camel.k/camel-k-cron")
+	assert.Contains(t, environment.Integration.Status.Dependencies, "mvn:org.apache.camel.k:camel-k-cron")
 }
 
 func TestCronWithMain(t *testing.T) {
diff --git a/pkg/trait/dependencies_test.go b/pkg/trait/dependencies_test.go
index 75cd784a2..c627362f3 100644
--- a/pkg/trait/dependencies_test.go
+++ b/pkg/trait/dependencies_test.go
@@ -85,8 +85,8 @@ func TestIntegrationDefaultDeps(t *testing.T) {
 		[]string{
 			"camel-quarkus:direct",
 			"camel-quarkus:log",
-			"mvn:org.apache.camel.k/camel-k-loader-java",
-			"mvn:org.apache.camel.k/camel-k-runtime"},
+			"mvn:org.apache.camel.k:camel-k-loader-java",
+			"mvn:org.apache.camel.k:camel-k-runtime"},
 		e.Integration.Status.Dependencies,
 	)
 }
@@ -133,8 +133,8 @@ func TestIntegrationCustomDeps(t *testing.T) {
 			"camel-quarkus:log",
 			"camel:netty-http",
 			"org.foo:bar",
-			"mvn:org.apache.camel.k/camel-k-loader-java",
-			"mvn:org.apache.camel.k/camel-k-runtime"},
+			"mvn:org.apache.camel.k:camel-k-loader-java",
+			"mvn:org.apache.camel.k:camel-k-runtime"},
 		e.Integration.Status.Dependencies,
 	)
 }
@@ -189,11 +189,11 @@ func TestIntegrationAutoGeneratedDeps(t *testing.T) {
 		[]string{
 			"camel-quarkus:direct",
 			"camel-quarkus:log",
-			"mvn:org.apache.camel.quarkus/camel-quarkus-rest",
-			"mvn:org.apache.camel.k/camel-k-loader-java",
-			"mvn:org.apache.camel.k/camel-k-loader-xml",
-			"mvn:org.apache.camel.k/camel-k-runtime",
-			"mvn:org.apache.camel.quarkus/camel-quarkus-platform-http"},
+			"mvn:org.apache.camel.quarkus:camel-quarkus-rest",
+			"mvn:org.apache.camel.k:camel-k-loader-java",
+			"mvn:org.apache.camel.k:camel-k-loader-xml",
+			"mvn:org.apache.camel.k:camel-k-runtime",
+			"mvn:org.apache.camel.quarkus:camel-quarkus-platform-http"},
 		e.Integration.Status.Dependencies,
 	)
 }
@@ -238,8 +238,8 @@ func TestIntegrationCustomLoader(t *testing.T) {
 		[]string{
 			"camel-quarkus:direct",
 			"camel-quarkus:log",
-			"mvn:org.apache.camel.k/camel-k-loader-yaml",
-			"mvn:org.apache.camel.k/camel-k-runtime"},
+			"mvn:org.apache.camel.k:camel-k-loader-yaml",
+			"mvn:org.apache.camel.k:camel-k-runtime"},
 		e.Integration.Status.Dependencies,
 	)
 }
@@ -280,8 +280,8 @@ func TestRestDeps(t *testing.T) {
 		t,
 		e.Integration.Status.Dependencies,
 		[]string{
-			"mvn:org.apache.camel.quarkus/camel-quarkus-rest",
-			"mvn:org.apache.camel.quarkus/camel-quarkus-platform-http",
+			"mvn:org.apache.camel.quarkus:camel-quarkus-rest",
+			"mvn:org.apache.camel.quarkus:camel-quarkus-platform-http",
 		},
 	)
 }
@@ -322,8 +322,8 @@ func TestRestDepsQuarkus(t *testing.T) {
 		t,
 		e.Integration.Status.Dependencies,
 		[]string{
-			"mvn:org.apache.camel.quarkus/camel-quarkus-rest",
-			"mvn:org.apache.camel.quarkus/camel-quarkus-platform-http",
+			"mvn:org.apache.camel.quarkus:camel-quarkus-rest",
+			"mvn:org.apache.camel.quarkus:camel-quarkus-platform-http",
 		},
 	)
 }
diff --git a/pkg/trait/knative_test.go b/pkg/trait/knative_test.go
index 6bea95333..4b9f815bb 100644
--- a/pkg/trait/knative_test.go
+++ b/pkg/trait/knative_test.go
@@ -19,7 +19,6 @@ package trait
 
 import (
 	"context"
-	"knative.dev/eventing/pkg/apis/duck/v1beta1"
 	"testing"
 
 	"github.com/stretchr/testify/assert"
@@ -27,6 +26,7 @@ import (
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
+	"knative.dev/eventing/pkg/apis/duck/v1beta1"
 	eventing "knative.dev/eventing/pkg/apis/eventing/v1beta1"
 	messaging "knative.dev/eventing/pkg/apis/messaging/v1beta1"
 	"knative.dev/pkg/apis"
@@ -301,7 +301,7 @@ func TestKnativePlatformHttpConfig(t *testing.T) {
 	}
 }
 
-func TestKnativePlatformHttpDepdencies(t *testing.T) {
+func TestKnativePlatformHttpDependencies(t *testing.T) {
 	sources := []v1.SourceSpec{
 		{
 			DataSpec: v1.DataSpec{
@@ -344,7 +344,7 @@ func TestKnativePlatformHttpDepdencies(t *testing.T) {
 			assert.Nil(t, err)
 
 			assert.Contains(t, environment.Integration.Status.Capabilities, v1.CapabilityPlatformHTTP)
-			assert.Contains(t, environment.Integration.Status.Dependencies, "mvn:org.apache.camel.quarkus/camel-quarkus-platform-http")
+			assert.Contains(t, environment.Integration.Status.Dependencies, "mvn:org.apache.camel.quarkus:camel-quarkus-platform-http")
 		})
 	}
 }
diff --git a/pkg/util/maven/maven_project_test.go b/pkg/util/maven/maven_project_test.go
index 164734c8f..978039387 100644
--- a/pkg/util/maven/maven_project_test.go
+++ b/pkg/util/maven/maven_project_test.go
@@ -170,11 +170,11 @@ func TestParseGAVWithClassifierAndType(t *testing.T) {
 }
 
 func TestParseGAVMvnNoVersion(t *testing.T) {
-	dep, err := ParseGAV("mvn:org.apache.camel/camel-core")
+	dep, err := ParseGAV("org.apache.camel:camel-core")
 
 	assert.Nil(t, err)
-	assert.Equal(t, dep.GroupID, "mvn")
-	assert.Equal(t, dep.ArtifactID, "org.apache.camel/camel-core")
+	assert.Equal(t, dep.GroupID, "org.apache.camel")
+	assert.Equal(t, dep.ArtifactID, "camel-core")
 }
 
 func TestParseGAVErrorNoColumn(t *testing.T) {
diff --git a/pkg/util/source/inspector_yaml_test.go b/pkg/util/source/inspector_yaml_test.go
index 18960d0ef..aedb20d6d 100644
--- a/pkg/util/source/inspector_yaml_test.go
+++ b/pkg/util/source/inspector_yaml_test.go
@@ -21,9 +21,10 @@ import (
 	"fmt"
 	"testing"
 
+	"github.com/stretchr/testify/assert"
+
 	v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/pkg/util/camel"
-	"github.com/stretchr/testify/assert"
 )
 
 func NewtestYAMLInspector(t *testing.T) YAMLInspector {
@@ -71,19 +72,22 @@ func TestYAMLDependencies(t *testing.T) {
 		{
 			name:                "consumer",
 			source:              YAMLRouteConsumer,
-			dependencies:        []string{`mvn:org.apache.camel.k/camel-k-knative-consumer`},
-			missingDependencies: []string{`mvn:org.apache.camel.k/camel-k-knative-producer`},
+			dependencies:        []string{`mvn:org.apache.camel.k:camel-k-knative-consumer`},
+			missingDependencies: []string{`mvn:org.apache.camel.k:camel-k-knative-producer`},
 		},
 		{
 			name:                "producer",
 			source:              YAMLRouteProducer,
-			dependencies:        []string{`mvn:org.apache.camel.k/camel-k-knative-producer`},
-			missingDependencies: []string{`mvn:org.apache.camel.k/camel-k-knative-consumer`},
+			dependencies:        []string{`mvn:org.apache.camel.k:camel-k-knative-producer`},
+			missingDependencies: []string{`mvn:org.apache.camel.k:camel-k-knative-consumer`},
 		},
 		{
-			name:         "transformer",
-			source:       YAMLRouteTransformer,
-			dependencies: []string{`mvn:org.apache.camel.k/camel-k-knative-producer`, `mvn:org.apache.camel.k/camel-k-knative-consumer`},
+			name:   "transformer",
+			source: YAMLRouteTransformer,
+			dependencies: []string{
+				`mvn:org.apache.camel.k:camel-k-knative-producer`,
+				`mvn:org.apache.camel.k:camel-k-knative-consumer`,
+			},
 		},
 	}
 	for _, test := range tests {