Skip to content

Commit 7a1be04

Browse files
Credentials are moved to env variables in maven example
1 parent b0c202b commit 7a1be04

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

details/integration_guide.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,20 @@ If you are using Maven as your build automation tool, you will need to make chan
2525
<servers>
2626
<server>
2727
<id>repository-id</id>
28-
<username>your-username</username>
29-
<password>your-password</password>
28+
<username>${env.USERNAME}</username>
29+
<password>${env.PASSWORD}</password>
3030
</server>
3131
</servers>
3232
</settings>
3333
```
34+
Set your credentials via the following enviromnent variables:
35+
```bash
36+
export USERNAME=your-username
37+
export PASSWORD=your-password
38+
```
39+
Here ```your-username``` and ```your-password``` are your credentials mentioned in the Step 1.
3440

35-
In this configuration ```your-username``` and ```your-password``` are your credentials mentioed in the Step 1. You may choose an arbitrary allowed value instead of ```repository-id``` and use the same value in the following snippet from your `pom.xml` file:
41+
You may choose an arbitrary allowed value instead of ```repository-id``` and use the same value in the following snippet from your `pom.xml` file:
3642
```xml
3743
<repositories>
3844
<repository>
@@ -42,7 +48,7 @@ In this configuration ```your-username``` and ```your-password``` are your crede
4248
</repositories>
4349
```
4450
An example of maven project your can find
45-
[here](../examples/maven). Do not forget to replace credentials in ```.mvn/settings.xml``` file.
51+
[here](../examples/maven). Do not forget to set the enviromnet variables.
4652
#### Gradle
4753

4854
If you are using Gradle as your build automation tool, make sure to include the following configuration in your project setup:
@@ -52,16 +58,21 @@ repositories {
5258
maven {
5359
url = uri("https://nexus-repo.corp.cloudlinux.com/repository/els_spring")
5460
credentials {
55-
username = "your-username"
56-
password = "your-password"
61+
username = findProperty('USERNAME')
62+
password = findProperty('PASSWORD')
5763
}
5864
}
5965
}
6066
```
61-
In this configuration ```your-username``` and ```your-password``` are your credentials mentioed in the Step 1.
67+
Set your credentials via the following enviromnent variables:
68+
```bash
69+
export ORG_GRADLE_PROJECT_USERNAME=your-username
70+
export ORG_GRADLE_PROJECT_PASSWORD=your-password
71+
```
72+
Here ```your-username``` and ```your-password``` are your credentials mentioned in the Step 1.
6273

6374
An example of gradle project your can find
64-
[here](../examples/gradle). Do not forget to replace credentials in ```build.gradle``` file.
75+
[here](../examples/gradle). Do not forget to set the enviromnet variables.
6576

6677
## Verification
6778

examples/gradle/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ repositories {
1010
maven {
1111
url = uri("https://nexus-repo.corp.cloudlinux.com/repository/els_spring")
1212
credentials {
13-
username = findProperty('YOUR_USERNAME')
14-
password = findProperty('YOUR_PASSWORD')
13+
username = findProperty('USERNAME')
14+
password = findProperty('PASSWORD')
1515
}
1616
}
1717
}

examples/maven/.mvn/settings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ under the License.
133133
-->
134134
<server>
135135
<id>repository-id</id>
136-
<username>your_username</username>
137-
<password>your_password</password>
136+
<username>${env.USERNAME}</username>
137+
<password>${env.PASSWORD}</password>
138138
</server>
139139
</servers>
140140

0 commit comments

Comments
 (0)