Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
Merge pull request #99 from whelk-io/feature/default-profile-repository
Browse files Browse the repository at this point in the history
feature/default profile repository
  • Loading branch information
zteater authored Jun 2, 2021
2 parents 32542cf + 97013f2 commit d1378cf
Show file tree
Hide file tree
Showing 31 changed files with 4,238 additions and 342 deletions.
52 changes: 24 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,26 @@ Reference: [Maven Settings > Mirrors](http://maven.apache.org/settings.html#mirr
* **releases.enabled** - Enable release policy.
* **snapshots.enabled** - Enable snapshot policy.

Reference: [Maven Settings > Plugin Repositories](http://maven.apache.org/settings.html#repositories)
When not `repostories` is empty or null, the Maven Central repository is applied by default:

```yaml
repositories: |
[
{
"id": "central",
"name": "Maven Central",
"url": "https://repo1.maven.org/maven2",
"releases": {
"enabled": "true"
},
"snapshots": {
"enabled": "false"
}
}
]
```
Reference: [Maven Settings > Repositories](http://maven.apache.org/settings.html#repositories)
### `plugin_repositories`
**Optional** json array of repositories to add to settings.xml
Expand All @@ -45,7 +64,8 @@ Reference: [Maven Settings > Plugin Repositories](http://maven.apache.org/settin
* **releases.enabled** - Enable release policy.
* **snapshots.enabled** - Enable snapshot policy.

Reference: [Maven Settings > Repositories](http://maven.apache.org/settings.html#Plugin_Repositories)
Reference: [Maven Settings > Plugin Repositories](http://maven.apache.org/settings.html#Plugin_Repositories)


### `plugin_groups`
**Optional** json array of plugin groups to add to settings.xml
Expand All @@ -59,14 +79,11 @@ The `profile` element in the `settings.xml` is a truncated version of the `pom.x

Reference: [Maven Settings > Profiles](http://maven.apache.org/settings.html#profiles)

### `include_central`
**Optional** boolean determining whether to include maven central repo (default is `true`)

## Simple Usage

````yaml
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v14
uses: whelk-io/maven-settings-xml-action@v17
with:
repositories: '[{ "id": "some-repository", "url": "http://some.repository.url" }]'
plugin_repositories: '[{ "id": "some-plugin-repository", "url": "http://some.plugin.repository.url" }]'
Expand All @@ -89,16 +106,6 @@ Reference: [Maven Settings > Profiles](http://maven.apache.org/settings.html#pro
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>some-repository</id>
<url>http://some.repository.url</url>
Expand Down Expand Up @@ -128,7 +135,7 @@ Reference: [Maven Settings > Profiles](http://maven.apache.org/settings.html#pro

````yaml
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v14
uses: whelk-io/maven-settings-xml-action@v17
with:
repositories: |
[
Expand Down Expand Up @@ -198,7 +205,6 @@ Reference: [Maven Settings > Profiles](http://maven.apache.org/settings.html#pro
"some.plugin.group.id",
"some.other.plugin.group.id"
]
include_central: true
````

Expand All @@ -218,16 +224,6 @@ Reference: [Maven Settings > Profiles](http://maven.apache.org/settings.html#pro
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>some-repository</id>
<name>some-repository-name</name>
Expand Down
Loading

0 comments on commit d1378cf

Please sign in to comment.