{"id":23756787,"url":"https://github.com/s4u/setup-maven-action","last_synced_at":"2025-04-05T06:07:04.270Z","repository":{"id":40298959,"uuid":"400786610","full_name":"s4u/setup-maven-action","owner":"s4u","description":"Complete environment configuration for Maven builds","archived":false,"fork":false,"pushed_at":"2025-03-24T14:05:53.000Z","size":122,"stargazers_count":67,"open_issues_count":3,"forks_count":26,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T05:06:54.554Z","etag":null,"topics":["actions","github-actions","hacktoberfest","java","maven"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s4u.png","metadata":{"funding":{"github":"slawekjaranowski"},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-28T12:25:47.000Z","updated_at":"2025-03-24T14:05:56.000Z","dependencies_parsed_at":"2024-02-11T12:29:22.871Z","dependency_job_id":"bde09c56-cd62-4130-9df8-01f907dcae83","html_url":"https://github.com/s4u/setup-maven-action","commit_stats":{"total_commits":73,"total_committers":3,"mean_commits":"24.333333333333332","dds":0.4794520547945206,"last_synced_commit":"94605e0cdfe442da48d603db22bbf4c7d203c076"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s4u%2Fsetup-maven-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s4u%2Fsetup-maven-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s4u%2Fsetup-maven-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s4u%2Fsetup-maven-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s4u","download_url":"https://codeload.github.com/s4u/setup-maven-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294536,"owners_count":20915340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","github-actions","hacktoberfest","java","maven"],"created_at":"2024-12-31T19:19:03.176Z","updated_at":"2025-04-05T06:07:04.240Z","avatar_url":"https://github.com/s4u.png","language":null,"funding_links":["https://github.com/sponsors/slawekjaranowski"],"categories":[],"sub_categories":[],"readme":"# Setup Maven Action\n[![Test](https://github.com/s4u/setup-maven-action/actions/workflows/test.yml/badge.svg)](https://github.com/s4u/setup-maven-action/actions/workflows/test.yml)\n\nThis is composite action which help to prepare GitHub Actions environment for Maven build by calling:\n\n- [actions/checkout](https://github.com/marketplace/actions/checkout)\n- [actions/setup-java](https://github.com/marketplace/actions/setup-java-jdk)\n- [actions/cache](https://github.com/marketplace/actions/cache)\n- [stCarolas/setup-maven](https://github.com/marketplace/actions/setup-maven)\n- [s4u/maven-settings-action](https://github.com/marketplace/actions/maven-settings-action)\n\n:exclamation: You **should not** include above actions in your configuration - in other case  those will be **called twice**. :exclamation:\n\nFor default values you only need:\n\n```yml\n    steps:\n\n      - name: Setup Maven Action\n        uses: s4u/setup-maven-action@\u003c version \u003e\n\n      - run: mvn -V ...\n```\n\n# Params mapping for sub actions\n\n## checkout\n\n| params                       | destination         | default                  |\n|------------------------------|---------------------|--------------------------|\n| checkout-enabled             | enabled             |  true                    |\n| checkout-fetch-depth         | fetch-depth         |                          |\n| checkout-submodules          | submodules          |                          |\n| checkout-path                | path                |                          |\n| checkout-ref                 | ref                 |                          |\n| checkout-repository          | repository          | ${{ github.repository }} |\n| checkout-token               | token               | ${{ github.token }}      |\n| checkout-ssh-key             | ssh-key             |                          |\n| checkout-persist-credentials | persist-credentials | false                    |\n\n## setup-java\n\n| params            | destination  | default |\n|-------------------|--------------|---------|\n| java-version      | java-version | 17      |\n| java-distribution | distribution | zulu    |\n| java-jdkFile      | jdkFile      |         |\n\n## cache\n\nA cache action is configured as:\n\n```yaml\n    - uses: actions/cache\n      with:\n        path: |\n          ${{ inputs.cache-path }}\n          ${{ inputs.cache-path-add }}\n        key: ${{ inputs.cache-prefix }}${{ runner.os }}-jdk${{ inputs.java-version }}-${{ inputs.java-distribution }}-maven${{ inputs.maven-version }}-${{ hashFiles('**/pom.xml') }}\n        restore-keys: ${{ inputs.cache-prefix }}${{ runner.os }}-jdk${{ inputs.java-version }}-${{ inputs.java-distribution }}-maven${{ inputs.maven-version }}-\n```\n\nSo we can use for action:\n\n| params         | description                                              |\n|----------------|----------------------------------------------------------|\n| cache-enabled  | enable cache. Default true                               |\n| cache-path     | default cache path for Maven with value ~/.m2/repository |\n| cache-path-add | additional value for cache path                          |\n| cache-prefix   | prefix value for `key` and `restore-keys` cache params   |\n\n\n## setup-maven\n\n| params        | destination   | default |\n|---------------|---------------|---------|\n| maven-version | maven-version | 3.9.9   |\n\n## maven-settings-action\n\n| params                      | destination        |\n|-----------------------------|--------------------|\n| settings-servers            | servers            |\n| settings-mirrors            | mirrors            |\n| settings-properties         | properties         |\n| settings-sonatypeSnapshots  | sonatypeSnapshots  |\n| settings-proxies            | proxies            |\n| settings-repositories       | repositories       |\n| settings-pluginRepositories | pluginRepositories |\n| settings-githubServer       | githubServer       |\n| settings-path               | path               |\n\n# Testing against different Maven versions\n\n```yaml\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    strategy:\n      matrix:\n        maven: [ '3.8.8', '3.9.8' ]\n\n    name: Maven ${{ matrix.maven }} sample\n\n    steps:\n\n      - name: Setup Maven Action\n        uses: s4u/setup-maven-action@\u003c version \u003e\n        with:\n          java-version: 8\n          maven-version: ${{ matrix.maven }}\n\n      - run: mvn -V ...\n```\n\n# Contributions\n\n- Contributions are welcome!\n- Give :star: - if you want to encourage me to work on a project\n- Don't hesitate to create issues for new features you dream of or if you suspect some bug\n\n# Project versioning\n\nThis project uses [Semantic Versioning](https://semver.org/).\nWe recommended using the latest and specific release version.\n\nIn order to keep your project dependencies up to date you can watch this repository *(Releases only)*\nor use automatic tools like [Dependabot](https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates).\n\n# License\n\nThe scripts and documentation in this project are released under the [MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs4u%2Fsetup-maven-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs4u%2Fsetup-maven-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs4u%2Fsetup-maven-action/lists"}