This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/master by this push:
     new e415310  chore(maven): simplify maven model
e415310 is described below

commit e4153106bb59cb5e2d9f8e3ed0eeee2b27d14b2c
Author: lburgazzoli <[email protected]>
AuthorDate: Wed Jan 30 18:01:15 2019 +0100

    chore(maven): simplify maven model
---
 pkg/builder/builder_steps.go                       |  17 +--
 pkg/builder/builder_steps_test.go                  |  28 ++--
 pkg/builder/builder_utils.go                       |  20 ++-
 pkg/builder/springboot/generator.go                |  23 ++-
 pkg/util/maven/maven_project.go                    | 158 ++-------------------
 .../{maven_project.go => maven_project_types.go}   | 138 +++---------------
 pkg/util/maven/maven_test.go                       |  72 +++++-----
 7 files changed, 95 insertions(+), 361 deletions(-)

diff --git a/pkg/builder/builder_steps.go b/pkg/builder/builder_steps.go
index 555befc..fe90b78 100644
--- a/pkg/builder/builder_steps.go
+++ b/pkg/builder/builder_steps.go
@@ -47,9 +47,7 @@ func GenerateProject(ctx *Context) error {
        // Repositories
        //
 
-       ctx.Project.Repositories = maven.Repositories{
-               Repositories: make([]maven.Repository, 0, 
len(ctx.Request.Repositories)),
-       }
+       ctx.Project.Repositories = make([]maven.Repository, 0, 
len(ctx.Request.Repositories))
 
        for i, r := range ctx.Request.Repositories {
                repo := maven.NewRepository(r)
@@ -57,15 +55,14 @@ func GenerateProject(ctx *Context) error {
                        repo.ID = fmt.Sprintf("repo-%03d", i)
                }
 
-               ctx.Project.Repositories.Repositories = 
append(ctx.Project.Repositories.Repositories, repo)
+               ctx.Project.Repositories = append(ctx.Project.Repositories, 
repo)
        }
 
        //
        // set-up dependencies
        //
 
-       deps := &ctx.Project.Dependencies
-       deps.AddGAV("org.apache.camel.k", "camel-k-runtime-jvm", 
version.Version)
+       ctx.Project.AddDependencyGAV("org.apache.camel.k", 
"camel-k-runtime-jvm", version.Version)
 
        for _, d := range ctx.Request.Dependencies {
                switch {
@@ -76,7 +73,7 @@ func GenerateProject(ctx *Context) error {
                                artifactID = "camel-" + artifactID
                        }
 
-                       deps.AddGAV("org.apache.camel", artifactID, "")
+                       ctx.Project.AddDependencyGAV("org.apache.camel", 
artifactID, "")
                case strings.HasPrefix(d, "camel-k:"):
                        artifactID := strings.TrimPrefix(d, "camel-k:")
 
@@ -84,16 +81,16 @@ func GenerateProject(ctx *Context) error {
                                artifactID = "camel-" + artifactID
                        }
 
-                       deps.AddGAV("org.apache.camel.k", artifactID, 
version.Version)
+                       ctx.Project.AddDependencyGAV("org.apache.camel.k", 
artifactID, version.Version)
                case strings.HasPrefix(d, "mvn:"):
                        mid := strings.TrimPrefix(d, "mvn:")
                        gav := strings.Replace(mid, "/", ":", -1)
 
-                       deps.AddEncodedGAV(gav)
+                       ctx.Project.AddEncodedDependencyGAV(gav)
                case strings.HasPrefix(d, "runtime:"):
                        artifactID := strings.Replace(d, "runtime:", 
"camel-k-runtime-", 1)
 
-                       deps.AddGAV("org.apache.camel.k", artifactID, 
version.Version)
+                       ctx.Project.AddDependencyGAV("org.apache.camel.k", 
artifactID, version.Version)
                default:
                        return fmt.Errorf("unknown dependency type: %s", d)
                }
diff --git a/pkg/builder/builder_steps_test.go 
b/pkg/builder/builder_steps_test.go
index ad31eb9..eebf28c 100644
--- a/pkg/builder/builder_steps_test.go
+++ b/pkg/builder/builder_steps_test.go
@@ -44,18 +44,18 @@ func TestGenerateProject(t *testing.T) {
 
        assert.Nil(t, err)
 
-       assert.Equal(t, 1, 
len(ctx.Project.DependencyManagement.Dependencies.Dependencies))
-       assert.Equal(t, "org.apache.camel", 
ctx.Project.DependencyManagement.Dependencies.Dependencies[0].GroupID)
-       assert.Equal(t, "camel-bom", 
ctx.Project.DependencyManagement.Dependencies.Dependencies[0].ArtifactID)
-       assert.Equal(t, "2.22.1", 
ctx.Project.DependencyManagement.Dependencies.Dependencies[0].Version)
-       assert.Equal(t, "pom", 
ctx.Project.DependencyManagement.Dependencies.Dependencies[0].Type)
-       assert.Equal(t, "import", 
ctx.Project.DependencyManagement.Dependencies.Dependencies[0].Scope)
-
-       assert.Equal(t, 2, len(ctx.Project.Repositories.Repositories))
-       assert.Equal(t, "apache-snapshots", 
ctx.Project.Repositories.Repositories[0].ID)
-       assert.False(t, 
ctx.Project.Repositories.Repositories[0].Releases.Enabled)
-       assert.True(t, 
ctx.Project.Repositories.Repositories[0].Snapshots.Enabled)
-       assert.Equal(t, "ops4j-snapshots", 
ctx.Project.Repositories.Repositories[1].ID)
-       assert.False(t, 
ctx.Project.Repositories.Repositories[1].Releases.Enabled)
-       assert.True(t, 
ctx.Project.Repositories.Repositories[1].Snapshots.Enabled)
+       assert.Equal(t, 1, len(ctx.Project.DependencyManagement.Dependencies))
+       assert.Equal(t, "org.apache.camel", 
ctx.Project.DependencyManagement.Dependencies[0].GroupID)
+       assert.Equal(t, "camel-bom", 
ctx.Project.DependencyManagement.Dependencies[0].ArtifactID)
+       assert.Equal(t, "2.22.1", 
ctx.Project.DependencyManagement.Dependencies[0].Version)
+       assert.Equal(t, "pom", 
ctx.Project.DependencyManagement.Dependencies[0].Type)
+       assert.Equal(t, "import", 
ctx.Project.DependencyManagement.Dependencies[0].Scope)
+
+       assert.Equal(t, 2, len(ctx.Project.Repositories))
+       assert.Equal(t, "apache-snapshots", ctx.Project.Repositories[0].ID)
+       assert.False(t, ctx.Project.Repositories[0].Releases.Enabled)
+       assert.True(t, ctx.Project.Repositories[0].Snapshots.Enabled)
+       assert.Equal(t, "ops4j-snapshots", ctx.Project.Repositories[1].ID)
+       assert.False(t, ctx.Project.Repositories[1].Releases.Enabled)
+       assert.True(t, ctx.Project.Repositories[1].Snapshots.Enabled)
 }
diff --git a/pkg/builder/builder_utils.go b/pkg/builder/builder_utils.go
index 1c5153d..493728b 100644
--- a/pkg/builder/builder_utils.go
+++ b/pkg/builder/builder_utils.go
@@ -50,20 +50,16 @@ func NewProject(ctx *Context) maven.Project {
                Version:           version.Version,
                Properties:        ctx.Request.Platform.Build.Properties,
                DependencyManagement: maven.DependencyManagement{
-                       Dependencies: maven.Dependencies{
-                               Dependencies: []maven.Dependency{
-                                       {
-                                               GroupID:    "org.apache.camel",
-                                               ArtifactID: "camel-bom",
-                                               Version:    
ctx.Request.Platform.Build.CamelVersion,
-                                               Type:       "pom",
-                                               Scope:      "import",
-                                       },
+                       Dependencies: []maven.Dependency{
+                               {
+                                       GroupID:    "org.apache.camel",
+                                       ArtifactID: "camel-bom",
+                                       Version:    
ctx.Request.Platform.Build.CamelVersion,
+                                       Type:       "pom",
+                                       Scope:      "import",
                                },
                        },
                },
-               Dependencies: maven.Dependencies{
-                       Dependencies: make([]maven.Dependency, 0),
-               },
+               Dependencies: make([]maven.Dependency, 0),
        }
 }
diff --git a/pkg/builder/springboot/generator.go 
b/pkg/builder/springboot/generator.go
index e107a51..670c213 100644
--- a/pkg/builder/springboot/generator.go
+++ b/pkg/builder/springboot/generator.go
@@ -34,9 +34,7 @@ func GenerateProject(ctx *builder.Context) error {
        // Repositories
        //
 
-       ctx.Project.Repositories = maven.Repositories{
-               Repositories: make([]maven.Repository, 0, 
len(ctx.Request.Repositories)),
-       }
+       ctx.Project.Repositories = make([]maven.Repository, 0, 
len(ctx.Request.Repositories))
 
        for i, r := range ctx.Request.Repositories {
                repo := maven.NewRepository(r)
@@ -44,20 +42,14 @@ func GenerateProject(ctx *builder.Context) error {
                        repo.ID = fmt.Sprintf("repo-%03d", i)
                }
 
-               ctx.Project.Repositories.Repositories = 
append(ctx.Project.Repositories.Repositories, repo)
+               ctx.Project.Repositories = append(ctx.Project.Repositories, 
repo)
        }
 
        //
        // set-up dependencies
        //
 
-       deps := &ctx.Project.Dependencies
-
-       //
-       // common
-       //
-
-       deps.Add(maven.Dependency{
+       ctx.Project.AddDependency(maven.Dependency{
                GroupID:    "org.apache.camel.k",
                ArtifactID: "camel-k-runtime-spring-boot",
                Version:    version.Version,
@@ -96,7 +88,7 @@ func GenerateProject(ctx *builder.Context) error {
                                artifactID = "camel-" + artifactID
                        }
 
-                       deps.Add(maven.Dependency{
+                       ctx.Project.AddDependency(maven.Dependency{
                                GroupID:    "org.apache.camel",
                                ArtifactID: artifactID + "-starter",
                                Version:    
ctx.Request.Platform.Build.CamelVersion,
@@ -132,12 +124,12 @@ func GenerateProject(ctx *builder.Context) error {
                                artifactID = "camel-" + artifactID
                        }
 
-                       deps.AddGAV("org.apache.camel.k", artifactID, 
version.Version)
+                       ctx.Project.AddDependencyGAV("org.apache.camel.k", 
artifactID, version.Version)
                case strings.HasPrefix(d, "mvn:"):
                        mid := strings.TrimPrefix(d, "mvn:")
                        gav := strings.Replace(mid, "/", ":", -1)
 
-                       deps.AddEncodedGAV(gav)
+                       ctx.Project.AddEncodedDependencyGAV(gav)
                case strings.HasPrefix(d, "runtime:"):
                        if d == "runtime:jvm" {
                                // common
@@ -149,8 +141,9 @@ func GenerateProject(ctx *builder.Context) error {
                        }
 
                        artifactID := strings.Replace(d, "runtime:", 
"camel-k-runtime-", 1)
+                       dependency := maven.NewDependency("org.apache.camel.k", 
artifactID, version.Version)
 
-                       deps.AddGAV("org.apache.camel.k", artifactID, 
version.Version)
+                       ctx.Project.AddDependency(dependency)
                default:
                        return fmt.Errorf("unknown dependency type: %s", d)
                }
diff --git a/pkg/util/maven/maven_project.go b/pkg/util/maven/maven_project.go
index e965677..3c5aa4d 100644
--- a/pkg/util/maven/maven_project.go
+++ b/pkg/util/maven/maven_project.go
@@ -18,84 +18,34 @@ limitations under the License.
 package maven
 
 import (
-       "encoding/xml"
        "strings"
 )
 
-// Project represent a maven project
-type Project struct {
-       XMLName              xml.Name
-       XMLNs                string               `xml:"xmlns,attr"`
-       XMLNsXsi             string               `xml:"xmlns:xsi,attr"`
-       XsiSchemaLocation    string               
`xml:"xsi:schemaLocation,attr"`
-       ModelVersion         string               `xml:"modelVersion"`
-       GroupID              string               `xml:"groupId"`
-       ArtifactID           string               `xml:"artifactId"`
-       Version              string               `xml:"version"`
-       Properties           Properties           `xml:"properties,omitempty"`
-       DependencyManagement DependencyManagement `xml:"dependencyManagement"`
-       Dependencies         Dependencies         `xml:"dependencies"`
-       Repositories         Repositories         `xml:"repositories"`
-       PluginRepositories   PluginRepositories   `xml:"pluginRepositories"`
-}
-
-// DependencyManagement represent maven's dependency management block
-type DependencyManagement struct {
-       Dependencies Dependencies `xml:"dependencies"`
-}
-
-// Dependencies --
-type Dependencies struct {
-       Dependencies []Dependency `xml:"dependency"`
-}
-
-// Add a dependency to maven's dependencies
-func (deps *Dependencies) Add(dep Dependency) {
-       for _, d := range deps.Dependencies {
+// AddDependency a dependency to maven's dependencies
+func (p *Project) AddDependency(dep Dependency) {
+       for _, d := range p.Dependencies {
                // Check if the given dependency is already included in the 
dependency list
                if d == dep {
                        return
                }
        }
 
-       deps.Dependencies = append(deps.Dependencies, dep)
+       p.Dependencies = append(p.Dependencies, dep)
 }
 
-// AddGAV a dependency to maven's dependencies
-func (deps *Dependencies) AddGAV(groupID string, artifactID string, version 
string) {
-       deps.Add(NewDependency(groupID, artifactID, version))
+// AddDependencyGAV a dependency to maven's dependencies
+func (p *Project) AddDependencyGAV(groupID string, artifactID string, version 
string) {
+       p.AddDependency(NewDependency(groupID, artifactID, version))
 }
 
-// AddEncodedGAV a dependency to maven's dependencies
-func (deps *Dependencies) AddEncodedGAV(gav string) {
+// AddEncodedDependencyGAV a dependency to maven's dependencies
+func (p *Project) AddEncodedDependencyGAV(gav string) {
        if d, err := ParseGAV(gav); err == nil {
                // TODO: error handling
-               deps.Add(d)
+               p.AddDependency(d)
        }
 }
 
-// Exclusion represent a maven's dependency exlucsion
-type Exclusion struct {
-       GroupID    string `xml:"groupId"`
-       ArtifactID string `xml:"artifactId"`
-}
-
-// Exclusions --
-type Exclusions struct {
-       Exclusions []Exclusion `xml:"exclusion"`
-}
-
-// Dependency represent a maven's dependency
-type Dependency struct {
-       GroupID    string      `xml:"groupId"`
-       ArtifactID string      `xml:"artifactId"`
-       Version    string      `xml:"version,omitempty"`
-       Type       string      `xml:"type,omitempty"`
-       Classifier string      `xml:"classifier,omitempty"`
-       Scope      string      `xml:"scope,omitempty"`
-       Exclusions *Exclusions `xml:"exclusions,omitempty"`
-}
-
 // NewDependency create an new dependency from the given gav info
 func NewDependency(groupID string, artifactID string, version string) 
Dependency {
        return Dependency{
@@ -107,25 +57,6 @@ func NewDependency(groupID string, artifactID string, 
version string) Dependency
        }
 }
 
-// Repositories --
-type Repositories struct {
-       Repositories []Repository `xml:"repository"`
-}
-
-// PluginRepositories --
-type PluginRepositories struct {
-       Repositories []Repository `xml:"pluginRepository"`
-}
-
-// Repository --
-type Repository struct {
-       ID        string           `xml:"id"`
-       Name      string           `xml:"name,omitempty"`
-       URL       string           `xml:"url"`
-       Snapshots RepositoryPolicy `xml:"snapshots,omitempty"`
-       Releases  RepositoryPolicy `xml:"releases,omitempty"`
-}
-
 //
 // NewRepository parse the given repo url ang generated the related struct.
 //
@@ -164,72 +95,3 @@ func NewRepository(repo string) Repository {
 
        return r
 }
-
-// RepositoryPolicy --
-type RepositoryPolicy struct {
-       Enabled      bool   `xml:"enabled"`
-       UpdatePolicy string `xml:"updatePolicy,omitempty"`
-}
-
-// Build --
-type Build struct {
-       Plugins Plugins `xml:"plugins,omitempty"`
-}
-
-// Plugin --
-type Plugin struct {
-       GroupID    string     `xml:"groupId"`
-       ArtifactID string     `xml:"artifactId"`
-       Version    string     `xml:"version,omitempty"`
-       Executions Executions `xml:"executions"`
-}
-
-// Plugins --
-type Plugins struct {
-       Plugins []Plugin `xml:"plugin"`
-}
-
-// Execution --
-type Execution struct {
-       ID    string `xml:"id"`
-       Phase string `xml:"phase"`
-       Goals Goals  `xml:"goals,omitempty"`
-}
-
-// Executions --
-type Executions struct {
-       Executions []Execution `xml:"execution"`
-}
-
-// Goals --
-type Goals struct {
-       Goals []string `xml:"goal"`
-}
-
-// Properties --
-type Properties map[string]string
-
-type propertiesEntry struct {
-       XMLName xml.Name
-       Value   string `xml:",chardata"`
-}
-
-// MarshalXML --
-func (m Properties) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
-       if len(m) == 0 {
-               return nil
-       }
-
-       err := e.EncodeToken(start)
-       if err != nil {
-               return err
-       }
-
-       for k, v := range m {
-               if err := e.Encode(propertiesEntry{XMLName: xml.Name{Local: k}, 
Value: v}); err != nil {
-                       return err
-               }
-       }
-
-       return e.EncodeToken(start.End())
-}
diff --git a/pkg/util/maven/maven_project.go 
b/pkg/util/maven/maven_project_types.go
similarity index 52%
copy from pkg/util/maven/maven_project.go
copy to pkg/util/maven/maven_project_types.go
index e965677..999b91e 100644
--- a/pkg/util/maven/maven_project.go
+++ b/pkg/util/maven/maven_project_types.go
@@ -19,7 +19,6 @@ package maven
 
 import (
        "encoding/xml"
-       "strings"
 )
 
 // Project represent a maven project
@@ -34,44 +33,9 @@ type Project struct {
        Version              string               `xml:"version"`
        Properties           Properties           `xml:"properties,omitempty"`
        DependencyManagement DependencyManagement `xml:"dependencyManagement"`
-       Dependencies         Dependencies         `xml:"dependencies"`
-       Repositories         Repositories         `xml:"repositories"`
-       PluginRepositories   PluginRepositories   `xml:"pluginRepositories"`
-}
-
-// DependencyManagement represent maven's dependency management block
-type DependencyManagement struct {
-       Dependencies Dependencies `xml:"dependencies"`
-}
-
-// Dependencies --
-type Dependencies struct {
-       Dependencies []Dependency `xml:"dependency"`
-}
-
-// Add a dependency to maven's dependencies
-func (deps *Dependencies) Add(dep Dependency) {
-       for _, d := range deps.Dependencies {
-               // Check if the given dependency is already included in the 
dependency list
-               if d == dep {
-                       return
-               }
-       }
-
-       deps.Dependencies = append(deps.Dependencies, dep)
-}
-
-// AddGAV a dependency to maven's dependencies
-func (deps *Dependencies) AddGAV(groupID string, artifactID string, version 
string) {
-       deps.Add(NewDependency(groupID, artifactID, version))
-}
-
-// AddEncodedGAV a dependency to maven's dependencies
-func (deps *Dependencies) AddEncodedGAV(gav string) {
-       if d, err := ParseGAV(gav); err == nil {
-               // TODO: error handling
-               deps.Add(d)
-       }
+       Dependencies         []Dependency         
`xml:"dependencies>dependency,omitempty"`
+       Repositories         []Repository         
`xml:"repositories>repository,omitempty"`
+       PluginRepositories   []Repository         
`xml:"pluginRepositories>pluginRepository,omitempty"`
 }
 
 // Exclusion represent a maven's dependency exlucsion
@@ -85,6 +49,11 @@ type Exclusions struct {
        Exclusions []Exclusion `xml:"exclusion"`
 }
 
+// DependencyManagement represent maven's dependency management block
+type DependencyManagement struct {
+       Dependencies []Dependency `xml:"dependencies>dependency,omitempty"`
+}
+
 // Dependency represent a maven's dependency
 type Dependency struct {
        GroupID    string      `xml:"groupId"`
@@ -96,27 +65,6 @@ type Dependency struct {
        Exclusions *Exclusions `xml:"exclusions,omitempty"`
 }
 
-// NewDependency create an new dependency from the given gav info
-func NewDependency(groupID string, artifactID string, version string) 
Dependency {
-       return Dependency{
-               GroupID:    groupID,
-               ArtifactID: artifactID,
-               Version:    version,
-               Type:       "jar",
-               Classifier: "",
-       }
-}
-
-// Repositories --
-type Repositories struct {
-       Repositories []Repository `xml:"repository"`
-}
-
-// PluginRepositories --
-type PluginRepositories struct {
-       Repositories []Repository `xml:"pluginRepository"`
-}
-
 // Repository --
 type Repository struct {
        ID        string           `xml:"id"`
@@ -126,45 +74,6 @@ type Repository struct {
        Releases  RepositoryPolicy `xml:"releases,omitempty"`
 }
 
-//
-// NewRepository parse the given repo url ang generated the related struct.
-//
-// The repository can be customized by appending @instruction to the repository
-// uri, as example:
-//
-//     http://my-nexus:8081/repository/publicc@id=my-repo@snapshots
-//
-// Will enable snapshots and sets the repo it to my-repo
-//
-func NewRepository(repo string) Repository {
-       r := Repository{
-               URL: repo,
-               Releases: RepositoryPolicy{
-                       Enabled: true,
-               },
-               Snapshots: RepositoryPolicy{
-                       Enabled: false,
-               },
-       }
-
-       if idx := strings.Index(repo, "@"); idx != -1 {
-               r.URL = repo[:idx]
-
-               for _, attribute := range strings.Split(repo[idx+1:], "@") {
-                       switch {
-                       case attribute == "snapshots":
-                               r.Snapshots.Enabled = true
-                       case attribute == "noreleases":
-                               r.Releases.Enabled = false
-                       case strings.HasPrefix(attribute, "id="):
-                               r.ID = attribute[3:]
-                       }
-               }
-       }
-
-       return r
-}
-
 // RepositoryPolicy --
 type RepositoryPolicy struct {
        Enabled      bool   `xml:"enabled"`
@@ -173,37 +82,22 @@ type RepositoryPolicy struct {
 
 // Build --
 type Build struct {
-       Plugins Plugins `xml:"plugins,omitempty"`
+       Plugins []Plugin `xml:"plugins>plugin,omitempty"`
 }
 
 // Plugin --
 type Plugin struct {
-       GroupID    string     `xml:"groupId"`
-       ArtifactID string     `xml:"artifactId"`
-       Version    string     `xml:"version,omitempty"`
-       Executions Executions `xml:"executions"`
-}
-
-// Plugins --
-type Plugins struct {
-       Plugins []Plugin `xml:"plugin"`
+       GroupID    string      `xml:"groupId"`
+       ArtifactID string      `xml:"artifactId"`
+       Version    string      `xml:"version,omitempty"`
+       Executions []Execution `xml:"executions>execution,omitempty"`
 }
 
 // Execution --
 type Execution struct {
-       ID    string `xml:"id"`
-       Phase string `xml:"phase"`
-       Goals Goals  `xml:"goals,omitempty"`
-}
-
-// Executions --
-type Executions struct {
-       Executions []Execution `xml:"execution"`
-}
-
-// Goals --
-type Goals struct {
-       Goals []string `xml:"goal"`
+       ID    string   `xml:"id"`
+       Phase string   `xml:"phase"`
+       Goals []string `xml:"goals>goal,omitempty"`
 }
 
 // Properties --
diff --git a/pkg/util/maven/maven_test.go b/pkg/util/maven/maven_test.go
index c09485c..ff2ce0d 100644
--- a/pkg/util/maven/maven_test.go
+++ b/pkg/util/maven/maven_test.go
@@ -88,54 +88,46 @@ func TestPomGeneration(t *testing.T) {
                ArtifactID:        "camel-k-integration",
                Version:           "1.0.0",
                DependencyManagement: DependencyManagement{
-                       Dependencies: Dependencies{
-                               Dependencies: []Dependency{
-                                       {
-                                               GroupID:    "org.apache.camel",
-                                               ArtifactID: "camel-bom",
-                                               Version:    "2.22.1",
-                                               Type:       "pom",
-                                               Scope:      "import",
-                                       },
-                               },
-                       },
-               },
-               Dependencies: Dependencies{
                        Dependencies: []Dependency{
                                {
-                                       GroupID:    "org.apache.camel.k",
-                                       ArtifactID: "camel-k-runtime-jvm",
-                                       Version:    "1.0.0",
+                                       GroupID:    "org.apache.camel",
+                                       ArtifactID: "camel-bom",
+                                       Version:    "2.22.1",
+                                       Type:       "pom",
+                                       Scope:      "import",
                                },
                        },
                },
-               Repositories: Repositories{
-                       Repositories: []Repository{
-                               {
-                                       ID:  "central",
-                                       URL: 
"https://repo.maven.apache.org/maven2";,
-                                       Snapshots: RepositoryPolicy{
-                                               Enabled: false,
-                                       },
-                                       Releases: RepositoryPolicy{
-                                               Enabled:      true,
-                                               UpdatePolicy: "never",
-                                       },
+               Dependencies: []Dependency{
+                       {
+                               GroupID:    "org.apache.camel.k",
+                               ArtifactID: "camel-k-runtime-jvm",
+                               Version:    "1.0.0",
+                       },
+               },
+               Repositories: []Repository{
+                       {
+                               ID:  "central",
+                               URL: "https://repo.maven.apache.org/maven2";,
+                               Snapshots: RepositoryPolicy{
+                                       Enabled: false,
+                               },
+                               Releases: RepositoryPolicy{
+                                       Enabled:      true,
+                                       UpdatePolicy: "never",
                                },
                        },
                },
-               PluginRepositories: PluginRepositories{
-                       Repositories: []Repository{
-                               {
-                                       ID:  "central",
-                                       URL: 
"https://repo.maven.apache.org/maven2";,
-                                       Snapshots: RepositoryPolicy{
-                                               Enabled: false,
-                                       },
-                                       Releases: RepositoryPolicy{
-                                               Enabled:      true,
-                                               UpdatePolicy: "never",
-                                       },
+               PluginRepositories: []Repository{
+                       {
+                               ID:  "central",
+                               URL: "https://repo.maven.apache.org/maven2";,
+                               Snapshots: RepositoryPolicy{
+                                       Enabled: false,
+                               },
+                               Releases: RepositoryPolicy{
+                                       Enabled:      true,
+                                       UpdatePolicy: "never",
                                },
                        },
                },

Reply via email to