mirror of
https://github.com/s4u/maven-settings-action.git
synced 2026-02-15 00:00:30 +08:00
Compare commits
46 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d06ffc01c1 | |||
| 85a676bfd7 | |||
| 7c3a8b283a | |||
| db48270276 | |||
| 0120fc220b | |||
| 86e28b1256 | |||
| f7c867403d | |||
| 65009cbda6 | |||
| 4304bcedb3 | |||
| a1400c985d | |||
| 625171aa24 | |||
| 04f57f5f0e | |||
| dd913c92b1 | |||
| 8063cbe254 | |||
| ed58d20239 | |||
| c99cacf8e5 | |||
| 1bd3a222e0 | |||
| 2c724b5972 | |||
| a8a76a7b1e | |||
| 41cc972a6e | |||
| c253de7654 | |||
| e2a43d69f6 | |||
| d20dda0d1e | |||
| 9c3f6ce289 | |||
| fe82f409d0 | |||
| eb293947b5 | |||
| b703e0a7d7 | |||
| 1cf39ceb1b | |||
| 134cffbe71 | |||
| 38474872a0 | |||
| 49cd6b8c78 | |||
| 2e21981438 | |||
| afc0d7896a | |||
| 2e58029a96 | |||
| 80a4416636 | |||
| 3ef9aea393 | |||
| bf2f085f63 | |||
| f7a604dc6b | |||
| c1153c4b91 | |||
| 64d0152d7a | |||
| 5ac0323dc5 | |||
| ee25a92a84 | |||
| fb4ef3151e | |||
| f972cb7ea0 | |||
| eff73b239d | |||
| 8a5150d3c2 |
6
.github/workflows/audit.yml
vendored
6
.github/workflows/audit.yml
vendored
@ -17,11 +17,11 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: '20.x'
|
node-version: '24.x'
|
||||||
|
|
||||||
- run: npm version
|
- run: npm version
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
|
|||||||
1
.github/workflows/release-drafter.yml
vendored
1
.github/workflows/release-drafter.yml
vendored
@ -5,6 +5,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
- 'main'
|
- 'main'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update_release_draft:
|
update_release_draft:
|
||||||
|
|||||||
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@ -17,13 +17,13 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: '20.x'
|
node-version: '24.x'
|
||||||
|
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
|
|||||||
34
README.md
34
README.md
@ -31,14 +31,14 @@ See [action.yml](action.yml)
|
|||||||
## default ```settings.xml```
|
## default ```settings.xml```
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
## ```settings.xml``` with servers section
|
## ```settings.xml``` with servers section
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
servers: '[{"id": "serverId", "username": "username", "password": "password"}]'
|
servers: '[{"id": "serverId", "username": "username", "password": "password"}]'
|
||||||
```
|
```
|
||||||
@ -62,7 +62,7 @@ Please refer to the [servers](http://maven.apache.org/settings.html#Servers) doc
|
|||||||
|
|
||||||
``` yml
|
``` yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
servers: |
|
servers: |
|
||||||
[{
|
[{
|
||||||
@ -96,7 +96,7 @@ result will be:
|
|||||||
## ```settings.xml``` with mirrors section
|
## ```settings.xml``` with mirrors section
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
mirrors: '[{"id": "mirrorId", "name": "mirrorName", "mirrorOf": "mirrorOf", "url": "mirrorUrl"}]'
|
mirrors: '[{"id": "mirrorId", "name": "mirrorName", "mirrorOf": "mirrorOf", "url": "mirrorUrl"}]'
|
||||||
```
|
```
|
||||||
@ -104,7 +104,7 @@ steps:
|
|||||||
## ```settings.xml``` with proxies section
|
## ```settings.xml``` with proxies section
|
||||||
```yml
|
```yml
|
||||||
step:
|
step:
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
proxies: '[{"id": "proxyId", "active": "isActive", "protocol": "proxyProtocol", "host": "proxyHost", "port": "proxyPort", "nonProxyHosts": "nonProxyHost", "user": "proxUser", "password": "proxPassword"}]'
|
proxies: '[{"id": "proxyId", "active": "isActive", "protocol": "proxyProtocol", "host": "proxyHost", "port": "proxyPort", "nonProxyHosts": "nonProxyHost", "user": "proxUser", "password": "proxPassword"}]'
|
||||||
```
|
```
|
||||||
@ -113,16 +113,16 @@ Note: Authentication details are optional.
|
|||||||
## ```settings.xml``` with properties
|
## ```settings.xml``` with properties
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
properties: '[{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'
|
properties: '[{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'
|
||||||
```
|
```
|
||||||
|
|
||||||
## ```settings.xml``` with https://oss.sonatype.org/content/repositories/snapshots in repository list
|
## ```settings.xml``` with https://central.sonatype.com/repository/maven-snapshots in repository list
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
sonatypeSnapshots: true
|
sonatypeSnapshots: true
|
||||||
```
|
```
|
||||||
@ -131,7 +131,7 @@ steps:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
apacheSnapshots: true
|
apacheSnapshots: true
|
||||||
```
|
```
|
||||||
@ -139,7 +139,7 @@ steps:
|
|||||||
## Do not override existing ```settings.xml```, from version **2.0** file is override by default :
|
## Do not override existing ```settings.xml```, from version **2.0** file is override by default :
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
override: false
|
override: false
|
||||||
```
|
```
|
||||||
@ -147,7 +147,7 @@ steps:
|
|||||||
## Do not add github to server in ```settings.xml```, by default is added:
|
## Do not add github to server in ```settings.xml```, by default is added:
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
githubServer: false
|
githubServer: false
|
||||||
```
|
```
|
||||||
@ -156,7 +156,7 @@ steps:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
oracleServers: '[{"id": "serverId", "username": "username", "password": "password"}]'
|
oracleServers: '[{"id": "serverId", "username": "username", "password": "password"}]'
|
||||||
```
|
```
|
||||||
@ -164,7 +164,7 @@ steps:
|
|||||||
## ```settings.xml``` with [Oracle Maven Repository](https://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9017)
|
## ```settings.xml``` with [Oracle Maven Repository](https://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9017)
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
oracleRepo: true
|
oracleRepo: true
|
||||||
```
|
```
|
||||||
@ -172,7 +172,7 @@ steps:
|
|||||||
## ```settings.xml``` with custom repositories
|
## ```settings.xml``` with custom repositories
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
repositories: '[{"id":"repoId","name":"repoName","url":"url","snapshots":{"enabled":true}}]'
|
repositories: '[{"id":"repoId","name":"repoName","url":"url","snapshots":{"enabled":true}}]'
|
||||||
```
|
```
|
||||||
@ -180,7 +180,7 @@ steps:
|
|||||||
## ```settings.xml``` with custom plugin repositories
|
## ```settings.xml``` with custom plugin repositories
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
pluginRepositories: '[{"id":"repoId","name":"repoName","url":"url","snapshots":{"enabled":true}}]'
|
pluginRepositories: '[{"id":"repoId","name":"repoName","url":"url","snapshots":{"enabled":true}}]'
|
||||||
```
|
```
|
||||||
@ -192,7 +192,7 @@ It is also possible pass in Github Secrets e.g.
|
|||||||
|
|
||||||
``` yml
|
``` yml
|
||||||
steps:
|
steps:
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
servers: |
|
servers: |
|
||||||
[{
|
[{
|
||||||
@ -222,7 +222,7 @@ steps:
|
|||||||
with:
|
with:
|
||||||
java-version: 8
|
java-version: 8
|
||||||
|
|
||||||
- uses: s4u/maven-settings-action@v3.1.0
|
- uses: s4u/maven-settings-action@v4.0.0
|
||||||
|
|
||||||
- run: mvn verify
|
- run: mvn verify
|
||||||
```
|
```
|
||||||
|
|||||||
@ -51,6 +51,6 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node20'
|
using: 'node24'
|
||||||
main: 'index.js'
|
main: 'index.js'
|
||||||
post: 'cleanup.js'
|
post: 'cleanup.js'
|
||||||
|
|||||||
@ -130,18 +130,8 @@ test('run with all feature', () => {
|
|||||||
</activation>
|
</activation>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>sonatype-snapshots</id>
|
<id>central-snapshots</id>
|
||||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
<url>https://central.sonatype.com/repository/maven-snapshots</url>
|
||||||
<releases>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</repository>
|
|
||||||
<repository>
|
|
||||||
<id>ossrh</id>
|
|
||||||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
|
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>false</enabled>
|
<enabled>false</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
@ -152,18 +142,8 @@ test('run with all feature', () => {
|
|||||||
</repositories>
|
</repositories>
|
||||||
<pluginRepositories>
|
<pluginRepositories>
|
||||||
<pluginRepository>
|
<pluginRepository>
|
||||||
<id>sonatype-snapshots</id>
|
<id>central-snapshots</id>
|
||||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
<url>https://central.sonatype.com/repository/maven-snapshots</url>
|
||||||
<releases>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</pluginRepository>
|
|
||||||
<pluginRepository>
|
|
||||||
<id>ossrh</id>
|
|
||||||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
|
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>false</enabled>
|
<enabled>false</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
|
|||||||
2866
package-lock.json
generated
2866
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "maven-settings-action",
|
"name": "maven-settings-action",
|
||||||
"version": "3.1.0",
|
"version": "4.0.0",
|
||||||
"description": "Prepare maven settings",
|
"description": "Prepare maven settings",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -26,11 +26,11 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/s4u/maven-settings-action#readme",
|
"homepage": "https://github.com/s4u/maven-settings-action#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^2.0.3",
|
||||||
"@xmldom/xmldom": "^0.8.10"
|
"@xmldom/xmldom": "^0.8.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^9.14.0",
|
"eslint": "^9.39.1",
|
||||||
"jest": "^29.7.0"
|
"jest": "^30.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -592,18 +592,8 @@ test('addSonatypeSnapshots', () => {
|
|||||||
</activation>
|
</activation>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>sonatype-snapshots</id>
|
<id>central-snapshots</id>
|
||||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
<url>https://central.sonatype.com/repository/maven-snapshots</url>
|
||||||
<releases>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</repository>
|
|
||||||
<repository>
|
|
||||||
<id>ossrh</id>
|
|
||||||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
|
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>false</enabled>
|
<enabled>false</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
@ -614,18 +604,8 @@ test('addSonatypeSnapshots', () => {
|
|||||||
</repositories>
|
</repositories>
|
||||||
<pluginRepositories>
|
<pluginRepositories>
|
||||||
<pluginRepository>
|
<pluginRepository>
|
||||||
<id>sonatype-snapshots</id>
|
<id>central-snapshots</id>
|
||||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
<url>https://central.sonatype.com/repository/maven-snapshots</url>
|
||||||
<releases>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</pluginRepository>
|
|
||||||
<pluginRepository>
|
|
||||||
<id>ossrh</id>
|
|
||||||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
|
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>false</enabled>
|
<enabled>false</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
|
|||||||
@ -6,18 +6,8 @@
|
|||||||
</activation>
|
</activation>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>sonatype-snapshots</id>
|
<id>central-snapshots</id>
|
||||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
<url>https://central.sonatype.com/repository/maven-snapshots</url>
|
||||||
<releases>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</repository>
|
|
||||||
<repository>
|
|
||||||
<id>ossrh</id>
|
|
||||||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
|
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>false</enabled>
|
<enabled>false</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
@ -28,18 +18,8 @@
|
|||||||
</repositories>
|
</repositories>
|
||||||
<pluginRepositories>
|
<pluginRepositories>
|
||||||
<pluginRepository>
|
<pluginRepository>
|
||||||
<id>sonatype-snapshots</id>
|
<id>central-snapshots</id>
|
||||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
<url>https://central.sonatype.com/repository/maven-snapshots</url>
|
||||||
<releases>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</pluginRepository>
|
|
||||||
<pluginRepository>
|
|
||||||
<id>ossrh</id>
|
|
||||||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
|
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>false</enabled>
|
<enabled>false</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
|
|||||||
Reference in New Issue
Block a user