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 f5b207314 chore(trait): drop maven profile
f5b207314 is described below

commit f5b207314185791dc606d54e6ba35a1ba508cee0
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Thu Aug 27 08:28:52 2026 +0200

    chore(trait): drop maven profile
    
    It was already deprecated
---
 docs/modules/ROOT/partials/apis/camel-k-crds.adoc  | 10 +--
 docs/modules/traits/pages/builder.adoc             |  7 +-
 helm/camel-k/crds/camel-k-crds.yaml                | 96 ++++------------------
 pkg/apis/camel/v1/maven_types.go                   |  5 +-
 pkg/apis/camel/v1/trait/builder.go                 |  9 +-
 pkg/apis/camel/v1/trait/zz_generated.deepcopy.go   |  4 +-
 pkg/apis/camel/v1/zz_generated.deepcopy.go         |  4 +-
 pkg/builder/project.go                             | 25 ------
 .../applyconfiguration/camel/v1/mavenbuildspec.go  | 10 +--
 .../camel/applyconfiguration/camel/v1/mavenspec.go | 15 ++--
 .../config/crd/bases/camel.apache.org_builds.yaml  |  8 +-
 .../bases/camel.apache.org_integrationkits.yaml    |  8 +-
 .../camel.apache.org_integrationplatforms.yaml     | 24 +-----
 .../camel.apache.org_integrationprofiles.yaml      | 24 +-----
 .../crd/bases/camel.apache.org_integrations.yaml   | 16 +---
 .../config/crd/bases/camel.apache.org_pipes.yaml   | 16 +---
 pkg/trait/builder.go                               | 16 ----
 pkg/trait/builder_test.go                          | 41 ---------
 18 files changed, 53 insertions(+), 285 deletions(-)

diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc 
b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
index e7c6dc643..aeb1eb4f6 100644
--- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
+++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
@@ -4630,8 +4630,7 @@ The Maven properties.
 |
 
 
-A reference to the ConfigMap or Secret key that contains
-the Maven profile.
+Deprecated: no longer in use.
 
 |`settings` +
 *xref:#_camel_apache_org_v1_ValueSource[ValueSource]*
@@ -6642,12 +6641,7 @@ Deprecated: use TasksRequestCPU instead with task name 
`builder`.
 |
 
 
-A list of references pointing to configmaps/secrets that contains a maven 
profile.
-This configmap/secret is a resource of the IntegrationKit created, therefore 
it needs to be present in the namespace where the operator is going to create 
the IntegrationKit.
-The content of the maven profile is expected to be a text containing a valid 
maven profile starting with `<profile>` and ending with `</profile>` that will 
be integrated as an inline profile in the POM.
-Syntax: [configmap{vbar}secret]:name[/key], where name represents the resource 
name, key optionally represents the resource key to be filtered (default key 
value = profile.xml).
-
-Deprecated: will be removed in future versions.
+Deprecated: no longer in use.
 
 |`tasks` +
 []string
diff --git a/docs/modules/traits/pages/builder.adoc 
b/docs/modules/traits/pages/builder.adoc
index b2afa49ad..8982cd80f 100755
--- a/docs/modules/traits/pages/builder.adoc
+++ b/docs/modules/traits/pages/builder.adoc
@@ -83,12 +83,7 @@ Deprecated: use TasksRequestCPU instead with task name 
`builder`.
 
 | builder.mavenProfiles
 | []string
-| A list of references pointing to configmaps/secrets that contains a maven 
profile.
-This configmap/secret is a resource of the IntegrationKit created, therefore 
it needs to be present in the namespace where the operator is going to create 
the IntegrationKit.
-The content of the maven profile is expected to be a text containing a valid 
maven profile starting with `<profile>` and ending with `</profile>` that will 
be integrated as an inline profile in the POM.
-Syntax: [configmap\|secret]:name[/key], where name represents the resource 
name, key optionally represents the resource key to be filtered (default key 
value = profile.xml).
-
-Deprecated: will be removed in future versions.
+| Deprecated: no longer in use.
 
 | builder.tasks
 | []string
diff --git a/helm/camel-k/crds/camel-k-crds.yaml 
b/helm/camel-k/crds/camel-k-crds.yaml
index 3289b00a8..1d65f87c2 100644
--- a/helm/camel-k/crds/camel-k-crds.yaml
+++ b/helm/camel-k/crds/camel-k-crds.yaml
@@ -454,9 +454,7 @@ spec:
                               description: The path of the local Maven 
repository.
                               type: string
                             profiles:
-                              description: |-
-                                A reference to the ConfigMap or Secret key 
that contains
-                                the Maven profile.
+                              description: 'Deprecated: no longer in use.'
                               items:
                                 description: ValueSource --.
                                 properties:
@@ -1389,9 +1387,7 @@ spec:
                               description: The path of the local Maven 
repository.
                               type: string
                             profiles:
-                              description: |-
-                                A reference to the ConfigMap or Secret key 
that contains
-                                the Maven profile.
+                              description: 'Deprecated: no longer in use.'
                               items:
                                 description: ValueSource --.
                                 properties:
@@ -2965,13 +2961,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
@@ -3553,9 +3543,7 @@ spec:
                         description: The path of the local Maven repository.
                         type: string
                       profiles:
-                        description: |-
-                          A reference to the ConfigMap or Secret key that 
contains
-                          the Maven profile.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           description: ValueSource --.
                           properties:
@@ -3926,13 +3914,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
@@ -6052,9 +6034,7 @@ spec:
                         description: The path of the local Maven repository.
                         type: string
                       profiles:
-                        description: |-
-                          A reference to the ConfigMap or Secret key that 
contains
-                          the Maven profile.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           description: ValueSource --.
                           properties:
@@ -6473,13 +6453,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
@@ -8583,9 +8557,7 @@ spec:
                         description: The path of the local Maven repository.
                         type: string
                       profiles:
-                        description: |-
-                          A reference to the ConfigMap or Secret key that 
contains
-                          the Maven profile.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           description: ValueSource --.
                           properties:
@@ -8914,13 +8886,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
@@ -10968,9 +10934,7 @@ spec:
                         description: The path of the local Maven repository.
                         type: string
                       profiles:
-                        description: |-
-                          A reference to the ConfigMap or Secret key that 
contains
-                          the Maven profile.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           description: ValueSource --.
                           properties:
@@ -11341,13 +11305,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
@@ -20627,13 +20585,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
@@ -23015,13 +22967,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
@@ -33661,13 +33607,7 @@ spec:
                               Deprecated: use TasksRequestCPU instead with 
task name `builder`.
                             type: string
                           mavenProfiles:
-                            description: |-
-                              A list of references pointing to 
configmaps/secrets that contains a maven profile.
-                              This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                              The content of the maven profile is expected to 
be a text containing a valid maven profile starting with `<profile>` and ending 
with `</profile>` that will be integrated as an inline profile in the POM.
-                              Syntax: [configmap|secret]:name[/key], where 
name represents the resource name, key optionally represents the resource key 
to be filtered (default key value = profile.xml).
-
-                              Deprecated: will be removed in future versions.
+                            description: 'Deprecated: no longer in use.'
                             items:
                               type: string
                             type: array
@@ -35974,13 +35914,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
diff --git a/pkg/apis/camel/v1/maven_types.go b/pkg/apis/camel/v1/maven_types.go
index 79c8231eb..33de6757a 100644
--- a/pkg/apis/camel/v1/maven_types.go
+++ b/pkg/apis/camel/v1/maven_types.go
@@ -29,9 +29,8 @@ type MavenSpec struct {
        LocalRepository string `json:"localRepository,omitempty"`
        // The Maven properties.
        Properties map[string]string `json:"properties,omitempty"`
-       // A reference to the ConfigMap or Secret key that contains
-       // the Maven profile.
-       Profiles []ValueSource `json:"profiles,omitempty"`
+       // Deprecated: no longer in use.
+       DeprecatedProfiles []ValueSource `json:"profiles,omitempty"`
        // A reference to the ConfigMap or Secret key that contains
        // the Maven settings.
        Settings ValueSource `json:"settings,omitempty"`
diff --git a/pkg/apis/camel/v1/trait/builder.go 
b/pkg/apis/camel/v1/trait/builder.go
index 1847e1718..4ba41a70d 100644
--- a/pkg/apis/camel/v1/trait/builder.go
+++ b/pkg/apis/camel/v1/trait/builder.go
@@ -59,13 +59,8 @@ type BuilderTrait struct {
        //
        // Deprecated: use TasksRequestCPU instead with task name `builder`.
        LimitMemory string `json:"limitMemory,omitempty" 
property:"limit-memory"`
-       // A list of references pointing to configmaps/secrets that contains a 
maven profile.
-       // This configmap/secret is a resource of the IntegrationKit created, 
therefore it needs to be present in the namespace where the operator is going 
to create the IntegrationKit.
-       // The content of the maven profile is expected to be a text containing 
a valid maven profile starting with `<profile>` and ending with `</profile>` 
that will be integrated as an inline profile in the POM.
-       // Syntax: [configmap|secret]:name[/key], where name represents the 
resource name, key optionally represents the resource key to be filtered 
(default key value = profile.xml).
-       //
-       // Deprecated: will be removed in future versions.
-       MavenProfiles []string `json:"mavenProfiles,omitempty" 
property:"maven-profiles"`
+       // Deprecated: no longer in use.
+       DeprecatedMavenProfiles []string `json:"mavenProfiles,omitempty" 
property:"maven-profiles"`
        // A list of tasks to be executed (available only when using `pod` 
strategy) with format `<name>;<container-image>;<container-command>`.
        //
        // Deprecated: may be removed in future versions.
diff --git a/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go 
b/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go
index 4850dffe4..03e7c8716 100644
--- a/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go
+++ b/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go
@@ -85,8 +85,8 @@ func (in *BuilderTrait) DeepCopyInto(out *BuilderTrait) {
                *out = new(bool)
                **out = **in
        }
-       if in.MavenProfiles != nil {
-               in, out := &in.MavenProfiles, &out.MavenProfiles
+       if in.DeprecatedMavenProfiles != nil {
+               in, out := &in.DeprecatedMavenProfiles, 
&out.DeprecatedMavenProfiles
                *out = make([]string, len(*in))
                copy(*out, *in)
        }
diff --git a/pkg/apis/camel/v1/zz_generated.deepcopy.go 
b/pkg/apis/camel/v1/zz_generated.deepcopy.go
index f3c29f20b..da6c9f1e1 100644
--- a/pkg/apis/camel/v1/zz_generated.deepcopy.go
+++ b/pkg/apis/camel/v1/zz_generated.deepcopy.go
@@ -2395,8 +2395,8 @@ func (in *MavenSpec) DeepCopyInto(out *MavenSpec) {
                        (*out)[key] = val
                }
        }
-       if in.Profiles != nil {
-               in, out := &in.Profiles, &out.Profiles
+       if in.DeprecatedProfiles != nil {
+               in, out := &in.DeprecatedProfiles, &out.DeprecatedProfiles
                *out = make([]ValueSource, len(*in))
                for i := range *in {
                        (*in)[i].DeepCopyInto(&(*out)[i])
diff --git a/pkg/builder/project.go b/pkg/builder/project.go
index 3fd124cc5..b2b687283 100644
--- a/pkg/builder/project.go
+++ b/pkg/builder/project.go
@@ -18,8 +18,6 @@ limitations under the License.
 package builder
 
 import (
-       "encoding/xml"
-       "fmt"
        "os"
 
        "github.com/apache/camel-k/v2/pkg/util/io"
@@ -39,7 +37,6 @@ func init() {
                Project.GenerateProjectSettings,
                Project.InjectDependencies,
                Project.SanitizeDependencies,
-               Project.InjectProfiles,
        }
 }
 
@@ -49,7 +46,6 @@ type projectSteps struct {
        GenerateProjectSettings Step
        InjectDependencies      Step
        SanitizeDependencies    Step
-       InjectProfiles          Step
 
        CommonSteps []Step
 }
@@ -61,7 +57,6 @@ var Project = projectSteps{
        GenerateProjectSettings: NewStep(ProjectGenerationPhase+1, 
generateProjectSettings),
        InjectDependencies:      NewStep(ProjectGenerationPhase+2, 
injectDependencies),
        SanitizeDependencies:    NewStep(ProjectGenerationPhase+3, 
sanitizeDependencies),
-       InjectProfiles:          NewStep(ProjectGenerationPhase+4, 
injectProfiles),
 }
 
 func cleanUpBuildDir(ctx *builderContext) error {
@@ -131,23 +126,3 @@ func injectDependencies(ctx *builderContext) error {
 func sanitizeDependencies(ctx *builderContext) error {
        return 
camel.SanitizeIntegrationDependencies(ctx.Maven.Project.Dependencies)
 }
-
-func injectProfiles(ctx *builderContext) error {
-       if ctx.Build.Maven.Profiles != nil {
-               for _, p := range ctx.Build.Maven.Profiles {
-                       val, err := kubernetes.ResolveValueSource(ctx.C, 
ctx.Client, ctx.Namespace, &p)
-                       if err != nil {
-                               return fmt.Errorf("could not load profile : %s: 
%w. ", p.String(), err)
-                       }
-                       if val != "" {
-                               profile := maven.Profile{}
-                               if err := xml.Unmarshal([]byte(val), &profile); 
err != nil {
-                                       return err
-                               }
-                               ctx.Maven.Project.AddProfile(profile)
-                       }
-               }
-       }
-
-       return nil
-}
diff --git a/pkg/client/camel/applyconfiguration/camel/v1/mavenbuildspec.go 
b/pkg/client/camel/applyconfiguration/camel/v1/mavenbuildspec.go
index 7970988f1..178317685 100644
--- a/pkg/client/camel/applyconfiguration/camel/v1/mavenbuildspec.go
+++ b/pkg/client/camel/applyconfiguration/camel/v1/mavenbuildspec.go
@@ -66,15 +66,15 @@ func (b *MavenBuildSpecApplyConfiguration) 
WithProperties(entries map[string]str
        return b
 }
 
-// WithProfiles adds the given value to the Profiles field in the declarative 
configuration
+// WithDeprecatedProfiles adds the given value to the DeprecatedProfiles 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 Profiles field.
-func (b *MavenBuildSpecApplyConfiguration) WithProfiles(values 
...*ValueSourceApplyConfiguration) *MavenBuildSpecApplyConfiguration {
+// If called multiple times, values provided by each call will be appended to 
the DeprecatedProfiles field.
+func (b *MavenBuildSpecApplyConfiguration) WithDeprecatedProfiles(values 
...*ValueSourceApplyConfiguration) *MavenBuildSpecApplyConfiguration {
        for i := range values {
                if values[i] == nil {
-                       panic("nil value passed to WithProfiles")
+                       panic("nil value passed to WithDeprecatedProfiles")
                }
-               b.MavenSpecApplyConfiguration.Profiles = 
append(b.MavenSpecApplyConfiguration.Profiles, *values[i])
+               b.MavenSpecApplyConfiguration.DeprecatedProfiles = 
append(b.MavenSpecApplyConfiguration.DeprecatedProfiles, *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 8703f5410..4e8011cc4 100644
--- a/pkg/client/camel/applyconfiguration/camel/v1/mavenspec.go
+++ b/pkg/client/camel/applyconfiguration/camel/v1/mavenspec.go
@@ -32,9 +32,8 @@ type MavenSpecApplyConfiguration struct {
        LocalRepository *string `json:"localRepository,omitempty"`
        // The Maven properties.
        Properties map[string]string `json:"properties,omitempty"`
-       // A reference to the ConfigMap or Secret key that contains
-       // the Maven profile.
-       Profiles []ValueSourceApplyConfiguration `json:"profiles,omitempty"`
+       // Deprecated: no longer in use.
+       DeprecatedProfiles []ValueSourceApplyConfiguration 
`json:"profiles,omitempty"`
        // A reference to the ConfigMap or Secret key that contains
        // the Maven settings.
        Settings *ValueSourceApplyConfiguration `json:"settings,omitempty"`
@@ -84,15 +83,15 @@ func (b *MavenSpecApplyConfiguration) 
WithProperties(entries map[string]string)
        return b
 }
 
-// WithProfiles adds the given value to the Profiles field in the declarative 
configuration
+// WithDeprecatedProfiles adds the given value to the DeprecatedProfiles 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 Profiles field.
-func (b *MavenSpecApplyConfiguration) WithProfiles(values 
...*ValueSourceApplyConfiguration) *MavenSpecApplyConfiguration {
+// If called multiple times, values provided by each call will be appended to 
the DeprecatedProfiles field.
+func (b *MavenSpecApplyConfiguration) WithDeprecatedProfiles(values 
...*ValueSourceApplyConfiguration) *MavenSpecApplyConfiguration {
        for i := range values {
                if values[i] == nil {
-                       panic("nil value passed to WithProfiles")
+                       panic("nil value passed to WithDeprecatedProfiles")
                }
-               b.Profiles = append(b.Profiles, *values[i])
+               b.DeprecatedProfiles = append(b.DeprecatedProfiles, *values[i])
        }
        return b
 }
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 108670a86..b39efba7f 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_builds.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_builds.yaml
@@ -454,9 +454,7 @@ spec:
                               description: The path of the local Maven 
repository.
                               type: string
                             profiles:
-                              description: |-
-                                A reference to the ConfigMap or Secret key 
that contains
-                                the Maven profile.
+                              description: 'Deprecated: no longer in use.'
                               items:
                                 description: ValueSource --.
                                 properties:
@@ -1389,9 +1387,7 @@ spec:
                               description: The path of the local Maven 
repository.
                               type: string
                             profiles:
-                              description: |-
-                                A reference to the ConfigMap or Secret key 
that contains
-                                the Maven profile.
+                              description: 'Deprecated: no longer in use.'
                               items:
                                 description: ValueSource --.
                                 properties:
diff --git 
a/pkg/resources/config/crd/bases/camel.apache.org_integrationkits.yaml 
b/pkg/resources/config/crd/bases/camel.apache.org_integrationkits.yaml
index c61ad17fb..4ea0a0ee3 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_integrationkits.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_integrationkits.yaml
@@ -257,13 +257,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
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 b5b0f2066..79fd1c7c1 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml
@@ -247,9 +247,7 @@ spec:
                         description: The path of the local Maven repository.
                         type: string
                       profiles:
-                        description: |-
-                          A reference to the ConfigMap or Secret key that 
contains
-                          the Maven profile.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           description: ValueSource --.
                           properties:
@@ -620,13 +618,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
@@ -2746,9 +2738,7 @@ spec:
                         description: The path of the local Maven repository.
                         type: string
                       profiles:
-                        description: |-
-                          A reference to the ConfigMap or Secret key that 
contains
-                          the Maven profile.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           description: ValueSource --.
                           properties:
@@ -3167,13 +3157,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
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 9d371fd7d..46a3dd31c 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml
@@ -147,9 +147,7 @@ spec:
                         description: The path of the local Maven repository.
                         type: string
                       profiles:
-                        description: |-
-                          A reference to the ConfigMap or Secret key that 
contains
-                          the Maven profile.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           description: ValueSource --.
                           properties:
@@ -478,13 +476,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
@@ -2532,9 +2524,7 @@ spec:
                         description: The path of the local Maven repository.
                         type: string
                       profiles:
-                        description: |-
-                          A reference to the ConfigMap or Secret key that 
contains
-                          the Maven profile.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           description: ValueSource --.
                           properties:
@@ -2905,13 +2895,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
diff --git a/pkg/resources/config/crd/bases/camel.apache.org_integrations.yaml 
b/pkg/resources/config/crd/bases/camel.apache.org_integrations.yaml
index b773361e3..ff26a0d6d 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_integrations.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_integrations.yaml
@@ -7326,13 +7326,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
@@ -9714,13 +9708,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
diff --git a/pkg/resources/config/crd/bases/camel.apache.org_pipes.yaml 
b/pkg/resources/config/crd/bases/camel.apache.org_pipes.yaml
index b28c84c22..e3758a674 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_pipes.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_pipes.yaml
@@ -7378,13 +7378,7 @@ spec:
                               Deprecated: use TasksRequestCPU instead with 
task name `builder`.
                             type: string
                           mavenProfiles:
-                            description: |-
-                              A list of references pointing to 
configmaps/secrets that contains a maven profile.
-                              This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                              The content of the maven profile is expected to 
be a text containing a valid maven profile starting with `<profile>` and ending 
with `</profile>` that will be integrated as an inline profile in the POM.
-                              Syntax: [configmap|secret]:name[/key], where 
name represents the resource name, key optionally represents the resource key 
to be filtered (default key value = profile.xml).
-
-                              Deprecated: will be removed in future versions.
+                            description: 'Deprecated: no longer in use.'
                             items:
                               type: string
                             type: array
@@ -9691,13 +9685,7 @@ spec:
                           Deprecated: use TasksRequestCPU instead with task 
name `builder`.
                         type: string
                       mavenProfiles:
-                        description: |-
-                          A list of references pointing to configmaps/secrets 
that contains a maven profile.
-                          This configmap/secret is a resource of the 
IntegrationKit created, therefore it needs to be present in the namespace where 
the operator is going to create the IntegrationKit.
-                          The content of the maven profile is expected to be a 
text containing a valid maven profile starting with `<profile>` and ending with 
`</profile>` that will be integrated as an inline profile in the POM.
-                          Syntax: [configmap|secret]:name[/key], where name 
represents the resource name, key optionally represents the resource key to be 
filtered (default key value = profile.xml).
-
-                          Deprecated: will be removed in future versions.
+                        description: 'Deprecated: no longer in use.'
                         items:
                           type: string
                         type: array
diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go
index 4f4f43df1..c999c5ab4 100644
--- a/pkg/trait/builder.go
+++ b/pkg/trait/builder.go
@@ -466,22 +466,6 @@ func (t *builderTrait) builderTask(e *Environment, 
taskConf *v1.BuildConfigurati
                }
        }
 
-       // User provides a maven profile
-       //nolint:staticcheck
-       if t.MavenProfiles != nil {
-               mavenProfiles := make([]v1.ValueSource, 0)
-               for _, v := range t.MavenProfiles {
-                       if v != "" {
-                               mavenProfile, err := v1.DecodeValueSource(v, 
"profile.xml")
-                               if err != nil {
-                                       return nil, fmt.Errorf("invalid maven 
profile: %s: %w. ", v, err)
-                               }
-                               mavenProfiles = append(mavenProfiles, 
mavenProfile)
-                       }
-               }
-               task.Maven.Profiles = mavenProfiles
-       }
-
        steps := make([]builder.Step, 0, len(builder.Project.CommonSteps))
        steps = append(steps, builder.Project.CommonSteps...)
 
diff --git a/pkg/trait/builder_test.go b/pkg/trait/builder_test.go
index 84689058f..71c02cd77 100644
--- a/pkg/trait/builder_test.go
+++ b/pkg/trait/builder_test.go
@@ -223,47 +223,6 @@ func TestCustomTaskBuilderTraitInvalidStrategyOverride(t 
*testing.T) {
        assert.Equal(t, "Pipeline tasks unavailable when using `routine` 
platform build strategy: use `pod` instead.", 
env.IntegrationKit.Status.Failure.Reason)
 }
 
-func TestMavenProfilesBuilderTrait(t *testing.T) {
-       env := createBuilderTestEnv(platform.DefaultBuildStrategy)
-       builderTrait := createNominalBuilderTraitTest()
-       builderTrait.MavenProfiles = 
[]string{"configmap:maven-profile/owasp-profile.xml", 
"secret:maven-profile-secret"}
-
-       err := builderTrait.Apply(env)
-
-       require.NoError(t, err)
-
-       assert.Equal(t, v1.ValueSource{
-               ConfigMapKeyRef: &corev1.ConfigMapKeySelector{
-                       LocalObjectReference: corev1.LocalObjectReference{
-                               Name: "maven-profile",
-                       },
-                       Key: "owasp-profile.xml",
-               },
-       }, env.Pipeline[0].Builder.Maven.MavenSpec.Profiles[0])
-       assert.Equal(t, v1.ValueSource{
-               SecretKeyRef: &corev1.SecretKeySelector{
-                       LocalObjectReference: corev1.LocalObjectReference{
-                               Name: "maven-profile-secret",
-                       },
-                       Key: "profile.xml",
-               },
-       }, env.Pipeline[0].Builder.Maven.MavenSpec.Profiles[1])
-}
-
-func TestInvalidMavenProfilesBuilderTrait(t *testing.T) {
-       env := createBuilderTestEnv(platform.DefaultBuildStrategy)
-       builderTrait := createNominalBuilderTraitTest()
-       builderTrait.MavenProfiles = []string{"fakeprofile"}
-
-       err := builderTrait.Apply(env)
-
-       // The error will be reported to IntegrationKits
-       require.NoError(t, err)
-       assert.Equal(t, v1.IntegrationKitPhaseError, 
env.IntegrationKit.Status.Phase)
-       assert.Equal(t, corev1.ConditionFalse, 
env.IntegrationKit.Status.Conditions[0].Status)
-       assert.Contains(t, env.IntegrationKit.Status.Conditions[0].Message, 
"fakeprofile")
-}
-
 func TestBuilderCustomTasks(t *testing.T) {
        builderTrait := createNominalBuilderTraitTest()
        builderTrait.Tasks = append(builderTrait.Tasks, "test;alpine;ls")

Reply via email to