mirror of
https://github.com/s4u/setup-maven-action.git
synced 2026-02-16 00:00:14 +08:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f53a7669c | |||
| 1bea7e41c5 | |||
| 816f5e6ba8 | |||
| 25553285e3 | |||
| 4894416432 | |||
| a9992a1ccd | |||
| 3b45b50cd5 | |||
| 5a52b9da46 | |||
| e2f38a4518 | |||
| 9d09e3987e | |||
| f480a422c2 |
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@ -19,13 +19,13 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [ 'ubuntu-latest', 'windows-latest', 'macOS-latest' ]
|
os: [ 'ubuntu-latest', 'windows-latest', 'macOS-latest' ]
|
||||||
java: [ '8', '11', '17', '21' ]
|
java: [ '8', '11', '17', '21' ]
|
||||||
maven: [ '3.8.8', '3.9.6' ]
|
maven: [ '3.8.8', '3.9.8' ]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
|
|
||||||
- uses: ./
|
- uses: ./
|
||||||
with:
|
with:
|
||||||
@ -41,11 +41,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
|
|
||||||
- uses: ./
|
- uses: ./
|
||||||
|
|
||||||
- run: mvn -V validate -Drequire.java=17 -Drequire.maven=3.9.6
|
- run: mvn -V validate -Drequire.java=17 -Drequire.maven=3.9.8
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
test-ok:
|
test-ok:
|
||||||
|
|||||||
@ -40,7 +40,7 @@ For default values you only need:
|
|||||||
| params | destination | default |
|
| params | destination | default |
|
||||||
|-------------------|--------------|---------|
|
|-------------------|--------------|---------|
|
||||||
| java-version | java-version | 17 |
|
| java-version | java-version | 17 |
|
||||||
| java-distribution | distribution | temurin |
|
| java-distribution | distribution | zulu |
|
||||||
|
|
||||||
## cache
|
## cache
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ So we can use for action:
|
|||||||
|
|
||||||
| params | destination | default |
|
| params | destination | default |
|
||||||
|---------------|---------------|---------|
|
|---------------|---------------|---------|
|
||||||
| maven-version | maven-version | 3.9.6 |
|
| maven-version | maven-version | 3.9.8 |
|
||||||
|
|
||||||
## maven-settings-action
|
## maven-settings-action
|
||||||
|
|
||||||
@ -80,6 +80,8 @@ So we can use for action:
|
|||||||
| settings-mirrors | mirrors |
|
| settings-mirrors | mirrors |
|
||||||
| settings-properties | properties |
|
| settings-properties | properties |
|
||||||
| settings-sonatypeSnapshots | sonatypeSnapshots |
|
| settings-sonatypeSnapshots | sonatypeSnapshots |
|
||||||
|
| settings-proxies | proxies |
|
||||||
|
| settings-repositories | repositories |
|
||||||
|
|
||||||
# Testing against different Maven versions
|
# Testing against different Maven versions
|
||||||
|
|
||||||
@ -91,7 +93,7 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
maven: [ '3.8.8', '3.9.6' ]
|
maven: [ '3.8.8', '3.9.8' ]
|
||||||
|
|
||||||
name: Maven ${{ matrix.maven }} sample
|
name: Maven ${{ matrix.maven }} sample
|
||||||
|
|
||||||
|
|||||||
36
action.yml
36
action.yml
@ -44,7 +44,7 @@ inputs:
|
|||||||
|
|
||||||
java-distribution:
|
java-distribution:
|
||||||
description: 'Java distribution'
|
description: 'Java distribution'
|
||||||
default: 'temurin'
|
default: 'zulu'
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
# cache
|
# cache
|
||||||
@ -69,32 +69,40 @@ inputs:
|
|||||||
# maven version
|
# maven version
|
||||||
maven-version:
|
maven-version:
|
||||||
description: 'The Maven version to set up'
|
description: 'The Maven version to set up'
|
||||||
default: '3.9.6'
|
default: '3.9.8'
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
# maven settings.xml
|
# maven settings.xml
|
||||||
settings-servers:
|
settings-servers:
|
||||||
description: 'servers definition in json array, eg: [{"id": "serverId", "username": "username", "password": "password"}]'
|
description: 'servers definition in json array, e.g.: [{"id": "serverId", "username": "username", "password": "password"}]'
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
settings-mirrors:
|
settings-mirrors:
|
||||||
description: 'mirrors definition in json array, eg: [{"id": "id", "name": "name", "mirrorOf": "mirrorOf", "url": "url"}]'
|
description: 'mirrors definition in json array, e.g.: [{"id": "id", "name": "name", "mirrorOf": "mirrorOf", "url": "url"}]'
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
settings-properties:
|
settings-properties:
|
||||||
description: 'json array with properties, eg [{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'
|
description: 'json array with properties, e.g.: [{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
settings-sonatypeSnapshots:
|
settings-sonatypeSnapshots:
|
||||||
description: 'add https://oss.sonatype.org/content/repositories/snapshots to repository list - true or false'
|
description: 'add https://oss.sonatype.org/content/repositories/snapshots to repository list - true or false'
|
||||||
required: 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
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
with:
|
with:
|
||||||
fetch-depth: '${{ inputs.checkout-fetch-depth }}'
|
fetch-depth: '${{ inputs.checkout-fetch-depth }}'
|
||||||
path: '${{ inputs.checkout-path }}'
|
path: '${{ inputs.checkout-path }}'
|
||||||
@ -109,7 +117,7 @@ runs:
|
|||||||
java-version: '${{ inputs.java-version }}'
|
java-version: '${{ inputs.java-version }}'
|
||||||
distribution: '${{ inputs.java-distribution }}'
|
distribution: '${{ inputs.java-distribution }}'
|
||||||
|
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||||
if: inputs.cache-enabled == 'true'
|
if: inputs.cache-enabled == 'true'
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
@ -123,14 +131,16 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
id: current-maven
|
id: current-maven
|
||||||
|
|
||||||
- uses: stCarolas/setup-maven@v5
|
- uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
|
||||||
if: inputs.maven-version != steps.current-maven.outputs.version
|
if: inputs.maven-version != steps.current-maven.outputs.version
|
||||||
with:
|
with:
|
||||||
maven-version: '${{ inputs.maven-version }}'
|
maven-version: '${{ inputs.maven-version }}'
|
||||||
|
|
||||||
- uses: s4u/maven-settings-action@v3.0.0
|
- uses: s4u/maven-settings-action@7802f6aec16c9098b4798ad1f1d8ac75198194bd # v3.0.0
|
||||||
with:
|
with:
|
||||||
servers: '${{ inputs.settings-servers}}'
|
servers: '${{ inputs.settings-servers }}'
|
||||||
mirrors: '${{ inputs.settings-mirrors}}'
|
mirrors: '${{ inputs.settings-mirrors }}'
|
||||||
properties: '${{ inputs.settings-properties}}'
|
properties: '${{ inputs.settings-properties }}'
|
||||||
sonatypeSnapshots: '${{ inputs.settings-sonatypeSnapshots}}'
|
sonatypeSnapshots: '${{ inputs.settings-sonatypeSnapshots }}'
|
||||||
|
proxies: '${{ inputs.settings-proxies }}'
|
||||||
|
repositories: '${{ inputs.settings-repositories }}'
|
||||||
|
|||||||
Reference in New Issue
Block a user