This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(maven) add support for settings.xml only
- Loading branch information
Showing
6 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -335,6 +335,9 @@ build tool can authenticate with a `PAT`. Use the `with.github_token` field to a | |
|
||
`with.mvn_opts` - (optional) additional maven options in a comma-delimited string. | ||
|
||
**NB!** | ||
Currently only supports the maven command cli option `-s`, specifying a settings.xml file. | ||
|
||
Useful when your project depends on a custom maven settings file or use dependencies from a private repository. | ||
|
||
If project depends on dependencies from a private repository, actor need to set GitHub [private token](#access-private-repositories) with proper access right. | ||
|
@@ -343,7 +346,7 @@ If project depends on dependencies from a private repository, actor need to set | |
- name: Generate provenance, sign and upload image | ||
uses: nais/[email protected] | ||
with: | ||
mvn_opts: "-s ./.mvn/settings.xml, -Dmaven.repo.local=/path/to/local/repo" | ||
mvn_opts: "-s .mvn/settings.xml" | ||
github_token: ${{ secrets.PAT }} | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 | ||
http://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
|
||
<servers> | ||
<server> | ||
<id>github</id> | ||
<username>${GITHUB_USERNAME}</username> | ||
<password>${GITHUB_TOKEN}</password> | ||
</server> | ||
</servers> | ||
|
||
</settings> |
Binary file added
BIN
+235 KB
...d/jvm/testdata/jvm/maven/target/dependency/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
...m/testdata/jvm/maven/target/dependency/com/google/code/gson/gson/maven-metadata-local.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<metadata> | ||
<groupId>com.google.code.gson</groupId> | ||
<artifactId>gson</artifactId> | ||
<versioning> | ||
<release>2.8.6</release> | ||
<versions> | ||
<version>2.8.6</version> | ||
</versions> | ||
<lastUpdated>20221116003142</lastUpdated> | ||
</versioning> | ||
</metadata> |