This is an automated email from the ASF dual-hosted git repository.
squakez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push:
new 202764e2f chore(api): remove maven extensions
202764e2f is described below
commit 202764e2fc406f36c4251a29d2a02bb083f78159
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Fri May 1 09:03:56 2026 +0200
chore(api): remove maven extensions
Closes #6580
---
docs/modules/ROOT/partials/apis/camel-k-crds.adoc | 3 +--
helm/camel-k/crds/camel-k-crds.yaml | 24 ++++++----------------
pkg/apis/camel/v1/maven_types.go | 5 ++---
pkg/apis/camel/v1/zz_generated.deepcopy.go | 4 ++--
pkg/builder/quarkus.go | 2 --
.../applyconfiguration/camel/v1/mavenbuildspec.go | 10 ++++-----
.../camel/applyconfiguration/camel/v1/mavenspec.go | 15 +++++++-------
pkg/platform/defaults.go | 6 ------
.../config/crd/bases/camel.apache.org_builds.yaml | 8 ++------
.../camel.apache.org_integrationplatforms.yaml | 8 ++------
.../camel.apache.org_integrationprofiles.yaml | 8 ++------
11 files changed, 29 insertions(+), 64 deletions(-)
diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
index 6c6579fb4..a7e5ee009 100644
--- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
+++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
@@ -4656,8 +4656,7 @@ Note that the root CA certificates are also imported into
the created keystore.
|
-The Maven build extensions.
-See https://maven.apache.org/guides/mini/guide-using-extensions.html.
+Deprecated: no longer in use.
|`cliOptions` +
[]string
diff --git a/helm/camel-k/crds/camel-k-crds.yaml
b/helm/camel-k/crds/camel-k-crds.yaml
index 0b3b1d051..a1651e9a7 100644
--- a/helm/camel-k/crds/camel-k-crds.yaml
+++ b/helm/camel-k/crds/camel-k-crds.yaml
@@ -421,9 +421,7 @@ spec:
type: string
type: array
extension:
- description: |-
- The Maven build extensions.
- See
https://maven.apache.org/guides/mini/guide-using-extensions.html.
+ description: 'Deprecated: no longer in use.'
items:
description: MavenArtifact defines a GAV
(Group:Artifact:Type:Version:Classifier)
Maven artifact.
@@ -1354,9 +1352,7 @@ spec:
type: string
type: array
extension:
- description: |-
- The Maven build extensions.
- See
https://maven.apache.org/guides/mini/guide-using-extensions.html.
+ description: 'Deprecated: no longer in use.'
items:
description: MavenArtifact defines a GAV
(Group:Artifact:Type:Version:Classifier)
Maven artifact.
@@ -3506,9 +3502,7 @@ spec:
type: string
type: array
extension:
- description: |-
- The Maven build extensions.
- See
https://maven.apache.org/guides/mini/guide-using-extensions.html.
+ description: 'Deprecated: no longer in use.'
items:
description: MavenArtifact defines a GAV
(Group:Artifact:Type:Version:Classifier)
Maven artifact.
@@ -5983,9 +5977,7 @@ spec:
type: string
type: array
extension:
- description: |-
- The Maven build extensions.
- See
https://maven.apache.org/guides/mini/guide-using-extensions.html.
+ description: 'Deprecated: no longer in use.'
items:
description: MavenArtifact defines a GAV
(Group:Artifact:Type:Version:Classifier)
Maven artifact.
@@ -8494,9 +8486,7 @@ spec:
type: string
type: array
extension:
- description: |-
- The Maven build extensions.
- See
https://maven.apache.org/guides/mini/guide-using-extensions.html.
+ description: 'Deprecated: no longer in use.'
items:
description: MavenArtifact defines a GAV
(Group:Artifact:Type:Version:Classifier)
Maven artifact.
@@ -10861,9 +10851,7 @@ spec:
type: string
type: array
extension:
- description: |-
- The Maven build extensions.
- See
https://maven.apache.org/guides/mini/guide-using-extensions.html.
+ description: 'Deprecated: no longer in use.'
items:
description: MavenArtifact defines a GAV
(Group:Artifact:Type:Version:Classifier)
Maven artifact.
diff --git a/pkg/apis/camel/v1/maven_types.go b/pkg/apis/camel/v1/maven_types.go
index 5cd269a7e..79c8231eb 100644
--- a/pkg/apis/camel/v1/maven_types.go
+++ b/pkg/apis/camel/v1/maven_types.go
@@ -45,9 +45,8 @@ type MavenSpec struct {
// and configured to be used as a trusted certificate(s) by the Maven
commands.
// Note that the root CA certificates are also imported into the
created keystore.
CASecrets []corev1.SecretKeySelector `json:"caSecrets,omitempty"`
- // The Maven build extensions.
- // See https://maven.apache.org/guides/mini/guide-using-extensions.html.
- Extension []MavenArtifact `json:"extension,omitempty"`
+ // Deprecated: no longer in use.
+ DeprecatedExtension []MavenArtifact `json:"extension,omitempty"`
// The CLI options that are appended to the list of arguments for Maven
commands,
// e.g., `-V,--no-transfer-progress,-Dstyle.color=never`.
// See https://maven.apache.org/ref/3.9.14/maven-embedder/cli.html.
diff --git a/pkg/apis/camel/v1/zz_generated.deepcopy.go
b/pkg/apis/camel/v1/zz_generated.deepcopy.go
index 75c4ba0e0..b4b405bf0 100644
--- a/pkg/apis/camel/v1/zz_generated.deepcopy.go
+++ b/pkg/apis/camel/v1/zz_generated.deepcopy.go
@@ -2411,8 +2411,8 @@ func (in *MavenSpec) DeepCopyInto(out *MavenSpec) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
- if in.Extension != nil {
- in, out := &in.Extension, &out.Extension
+ if in.DeprecatedExtension != nil {
+ in, out := &in.DeprecatedExtension, &out.DeprecatedExtension
*out = make([]MavenArtifact, len(*in))
copy(*out, *in)
}
diff --git a/pkg/builder/quarkus.go b/pkg/builder/quarkus.go
index 00fa75752..9aafa5e63 100644
--- a/pkg/builder/quarkus.go
+++ b/pkg/builder/quarkus.go
@@ -136,8 +136,6 @@ func generateQuarkusProject(ctx *builderContext) error {
ctx.Build.Runtime.Version,
ctx.Build.Runtime.Metadata["quarkus.version"],
)
- // Add Maven build extensions
- p.Build.Extensions = &ctx.Build.Maven.Extension
// Add Maven repositories
p.Repositories = append(p.Repositories, ctx.Build.Maven.Repositories...)
p.PluginRepositories = append(p.PluginRepositories,
ctx.Build.Maven.Repositories...)
diff --git a/pkg/client/camel/applyconfiguration/camel/v1/mavenbuildspec.go
b/pkg/client/camel/applyconfiguration/camel/v1/mavenbuildspec.go
index 335e92cd0..7970988f1 100644
--- a/pkg/client/camel/applyconfiguration/camel/v1/mavenbuildspec.go
+++ b/pkg/client/camel/applyconfiguration/camel/v1/mavenbuildspec.go
@@ -105,15 +105,15 @@ func (b *MavenBuildSpecApplyConfiguration)
WithCASecrets(values ...corev1.Secret
return b
}
-// WithExtension adds the given value to the Extension field in the
declarative configuration
+// WithDeprecatedExtension adds the given value to the DeprecatedExtension
field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With"
function invocations.
-// If called multiple times, values provided by each call will be appended to
the Extension field.
-func (b *MavenBuildSpecApplyConfiguration) WithExtension(values
...*MavenArtifactApplyConfiguration) *MavenBuildSpecApplyConfiguration {
+// If called multiple times, values provided by each call will be appended to
the DeprecatedExtension field.
+func (b *MavenBuildSpecApplyConfiguration) WithDeprecatedExtension(values
...*MavenArtifactApplyConfiguration) *MavenBuildSpecApplyConfiguration {
for i := range values {
if values[i] == nil {
- panic("nil value passed to WithExtension")
+ panic("nil value passed to WithDeprecatedExtension")
}
- b.MavenSpecApplyConfiguration.Extension =
append(b.MavenSpecApplyConfiguration.Extension, *values[i])
+ b.MavenSpecApplyConfiguration.DeprecatedExtension =
append(b.MavenSpecApplyConfiguration.DeprecatedExtension, *values[i])
}
return b
}
diff --git a/pkg/client/camel/applyconfiguration/camel/v1/mavenspec.go
b/pkg/client/camel/applyconfiguration/camel/v1/mavenspec.go
index 3a9e987ce..8703f5410 100644
--- a/pkg/client/camel/applyconfiguration/camel/v1/mavenspec.go
+++ b/pkg/client/camel/applyconfiguration/camel/v1/mavenspec.go
@@ -48,9 +48,8 @@ type MavenSpecApplyConfiguration struct {
// and configured to be used as a trusted certificate(s) by the Maven
commands.
// Note that the root CA certificates are also imported into the
created keystore.
CASecrets []corev1.SecretKeySelector `json:"caSecrets,omitempty"`
- // The Maven build extensions.
- // See https://maven.apache.org/guides/mini/guide-using-extensions.html.
- Extension []MavenArtifactApplyConfiguration `json:"extension,omitempty"`
+ // Deprecated: no longer in use.
+ DeprecatedExtension []MavenArtifactApplyConfiguration
`json:"extension,omitempty"`
// The CLI options that are appended to the list of arguments for Maven
commands,
// e.g., `-V,--no-transfer-progress,-Dstyle.color=never`.
// See https://maven.apache.org/ref/3.9.14/maven-embedder/cli.html.
@@ -124,15 +123,15 @@ func (b *MavenSpecApplyConfiguration)
WithCASecrets(values ...corev1.SecretKeySe
return b
}
-// WithExtension adds the given value to the Extension field in the
declarative configuration
+// WithDeprecatedExtension adds the given value to the DeprecatedExtension
field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With"
function invocations.
-// If called multiple times, values provided by each call will be appended to
the Extension field.
-func (b *MavenSpecApplyConfiguration) WithExtension(values
...*MavenArtifactApplyConfiguration) *MavenSpecApplyConfiguration {
+// If called multiple times, values provided by each call will be appended to
the DeprecatedExtension field.
+func (b *MavenSpecApplyConfiguration) WithDeprecatedExtension(values
...*MavenArtifactApplyConfiguration) *MavenSpecApplyConfiguration {
for i := range values {
if values[i] == nil {
- panic("nil value passed to WithExtension")
+ panic("nil value passed to WithDeprecatedExtension")
}
- b.Extension = append(b.Extension, *values[i])
+ b.DeprecatedExtension = append(b.DeprecatedExtension,
*values[i])
}
return b
}
diff --git a/pkg/platform/defaults.go b/pkg/platform/defaults.go
index e1315bcdd..9977ec371 100644
--- a/pkg/platform/defaults.go
+++ b/pkg/platform/defaults.go
@@ -258,12 +258,6 @@ func applyPlatformSpec(source *v1.IntegrationPlatform,
target *v1.IntegrationPla
}
}
- if len(source.Status.Build.Maven.Extension) > 0 &&
len(target.Status.Build.Maven.Extension) == 0 {
- log.Debugf("Integration Platform %s [%s]: setting Maven
extensions", target.Name, target.Namespace)
- target.Status.Build.Maven.Extension = make([]v1.MavenArtifact,
len(source.Status.Build.Maven.Extension))
- copy(target.Status.Build.Maven.Extension,
source.Status.Build.Maven.Extension)
- }
-
if target.Status.Build.Registry.Address == "" &&
source.Status.Build.Registry.Address != "" {
log.Debugf("Integration Platform %s [%s]: setting registry",
target.Name, target.Namespace)
source.Status.Build.Registry.DeepCopyInto(&target.Status.Build.Registry)
diff --git a/pkg/resources/config/crd/bases/camel.apache.org_builds.yaml
b/pkg/resources/config/crd/bases/camel.apache.org_builds.yaml
index 8ce7eb075..34429bcfe 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_builds.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_builds.yaml
@@ -421,9 +421,7 @@ spec:
type: string
type: array
extension:
- description: |-
- The Maven build extensions.
- See
https://maven.apache.org/guides/mini/guide-using-extensions.html.
+ description: 'Deprecated: no longer in use.'
items:
description: MavenArtifact defines a GAV
(Group:Artifact:Type:Version:Classifier)
Maven artifact.
@@ -1354,9 +1352,7 @@ spec:
type: string
type: array
extension:
- description: |-
- The Maven build extensions.
- See
https://maven.apache.org/guides/mini/guide-using-extensions.html.
+ description: 'Deprecated: no longer in use.'
items:
description: MavenArtifact defines a GAV
(Group:Artifact:Type:Version:Classifier)
Maven artifact.
diff --git
a/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml
b/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml
index 15d182c09..1320ba8c8 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml
@@ -216,9 +216,7 @@ spec:
type: string
type: array
extension:
- description: |-
- The Maven build extensions.
- See
https://maven.apache.org/guides/mini/guide-using-extensions.html.
+ description: 'Deprecated: no longer in use.'
items:
description: MavenArtifact defines a GAV
(Group:Artifact:Type:Version:Classifier)
Maven artifact.
@@ -2693,9 +2691,7 @@ spec:
type: string
type: array
extension:
- description: |-
- The Maven build extensions.
- See
https://maven.apache.org/guides/mini/guide-using-extensions.html.
+ description: 'Deprecated: no longer in use.'
items:
description: MavenArtifact defines a GAV
(Group:Artifact:Type:Version:Classifier)
Maven artifact.
diff --git
a/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml
b/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml
index 2cac857c9..1bcb94da8 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml
@@ -118,9 +118,7 @@ spec:
type: string
type: array
extension:
- description: |-
- The Maven build extensions.
- See
https://maven.apache.org/guides/mini/guide-using-extensions.html.
+ description: 'Deprecated: no longer in use.'
items:
description: MavenArtifact defines a GAV
(Group:Artifact:Type:Version:Classifier)
Maven artifact.
@@ -2485,9 +2483,7 @@ spec:
type: string
type: array
extension:
- description: |-
- The Maven build extensions.
- See
https://maven.apache.org/guides/mini/guide-using-extensions.html.
+ description: 'Deprecated: no longer in use.'
items:
description: MavenArtifact defines a GAV
(Group:Artifact:Type:Version:Classifier)
Maven artifact.