mirror of
https://github.com/s4u/maven-settings-action.git
synced 2026-02-12 00:05:49 +08:00
Update Sonatype snapshot repository to new Central Portal (#389)
* sonatype-snapshots.xml: Add Sonatype Central snapshots repo - Sonatype OSSRH URLs are deprecated since 30-Jun-2025 and will be decommissioned in future * sonatype-snapshots.xml: Remove deprecated Sonatype OSSRH snapshot repos - update tests accordingly - align README.md * prepare release 4.0.0
This commit is contained in:
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
|
||||||
```
|
```
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "maven-settings-action",
|
"name": "maven-settings-action",
|
||||||
"version": "3.1.0",
|
"version": "4.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "maven-settings-action",
|
"name": "maven-settings-action",
|
||||||
"version": "3.1.0",
|
"version": "4.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^1.10.1",
|
||||||
|
|||||||
@ -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": {
|
||||||
|
|||||||
@ -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