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

support adding settings-path for settings.xml #88

Closed
khatib-moh opened this issue Sep 15, 2024 · 2 comments · Fixed by #95
Closed

support adding settings-path for settings.xml #88

khatib-moh opened this issue Sep 15, 2024 · 2 comments · Fixed by #95

Comments

@khatib-moh
Copy link
Contributor

khatib-moh commented Sep 15, 2024

Hello ,
as we know that the setup-maven-action uses the settings-maven-action https://github.com/marketplace/actions/maven-settings-action , I have checked the settings-action and inside the action.yaml file there is an attribute for path to override the settings.xml file, I would like to request a support for adding the path attribute , I guess the changes would be simple as below:

name: 'Setup Maven Action'
description: 'Complete environment configuration for Maven builds'

branding:
  icon: 'settings'
  color: 'green'

inputs:
  # maven settings.xml
  settings-servers:
    description: 'servers definition in json array, e.g.: [{"id": "serverId", "username": "username", "password": "password"}]'
    required: false

  settings-mirrors:
    description: 'mirrors definition in json array, e.g.: [{"id": "id", "name": "name", "mirrorOf": "mirrorOf", "url": "url"}]'
    required: false

  settings-properties:
    description: 'json array with properties, e.g.: [{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'
    required: false

  settings-sonatypeSnapshots:
    description: 'add https://oss.sonatype.org/content/repositories/snapshots to repository list - true or false'
    required: false

  settings-proxies:
    description: 'proxies definition in json array, e.g.: [{"id": "http-proxy", "active": "true", "protocol": "http", "host": "host", "port": "port", "nonProxyHosts": "host1|host2"}]'
    required: false

  settings-repositories:
    description: 'repository settings definition in json array, e.g.: [ { "id": "repoId","name": "repoName","url": "url","snapshots": { "enabled": true } } ]'
    required: false
  settings-path: #### adding the settings-path for inputs 
    description: 'override default path to settings.xml which is $HOME/.m2/settings.xml'
    required: false         

runs:
  using: 'composite'

  steps:
    - uses: s4u/maven-settings-action@7802f6aec16c9098b4798ad1f1d8ac75198194bd # v3.0.0
      with:
        servers: '${{ inputs.settings-servers }}'
        mirrors: '${{ inputs.settings-mirrors }}'
        properties: '${{ inputs.settings-properties }}'
        sonatypeSnapshots: '${{ inputs.settings-sonatypeSnapshots }}'
        proxies: '${{ inputs.settings-proxies }}'
        repositories: '${{ inputs.settings-repositories }}'
        path: '${{ inputs.settings-path }}'  ## adding the path for the action 
@slawekjaranowski
Copy link
Member

PR are welcome

@khatib-moh
Copy link
Contributor Author

@slawekjaranowski sure here is a PR #95.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants