Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to provide custom settings.xml #720

Merged
merged 2 commits into from
Jun 5, 2019

Conversation

lburgazzoli
Copy link
Contributor

@lburgazzoli lburgazzoli commented Jun 3, 2019

Fixes #715
Fixes #706

Support custom settings.xml via configmap/secret as well as some shortcuts to ease the installation process.

apiVersion: camel.apache.org/v1alpha1
kind: IntegrationPlatform
metadata:
  labels:
    app: camel-k
  name: camel-k
spec:
  build:
    maven:
      settings:
        configMapKeyRef:
          key: s.xml
          name: maven-settings

To configure the maven settings at installation time, one can use the --maven-settings option:

    kamel install --maven-settings configmap|secret:name/key    

To quickly set up maven repositories at installation time:

    kamel install --maven-repository http://your/repo@id=something@snapshots@noreleases

NOTES:

  • the repository option has been renamed to maven-repository
  • the options maven-repository and maven-settings are mutually exclusive
  • the repository option is not more available when running an integration

if len(o.repositories) > 0 {
o.mavenSettings = fmt.Sprintf("configmap:%s-maven-settings/settings.xml", platform.Name)

settings := maven.NewSettings()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we generate the settings file, we may want to handle the local repository the same way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the problem is still the same, what if the user does not set it ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, it's still need a merge strategy, which can be addressed later.

README.adoc Outdated Show resolved Hide resolved
@lburgazzoli lburgazzoli marked this pull request as ready for review June 3, 2019 22:04
@lburgazzoli
Copy link
Contributor Author

@astefanutti @nicolaferraro it is now ready for review

pkg/cmd/install.go Outdated Show resolved Hide resolved
pkg/cmd/install.go Outdated Show resolved Hide resolved
@lburgazzoli lburgazzoli merged commit 6b09af9 into apache:master Jun 5, 2019
@lburgazzoli lburgazzoli deleted the github-715 branch June 5, 2019 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to provide custom settings.xml Setup the maven proxy inside of the builder
3 participants