summaryrefslogtreecommitdiff
path: root/doc/user/compliance/license_compliance/index.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-23 21:09:46 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-23 21:09:46 +0000
commit8a7aaf86831d2a556578ae558a4fcab8bb659b20 (patch)
tree61c2b55aa48ff8e853e546cd3009dfc5423279c8 /doc/user/compliance/license_compliance/index.md
parent967812838c7e7742729a4c7aeb9859f98a509622 (diff)
downloadgitlab-ce-8a7aaf86831d2a556578ae558a4fcab8bb659b20.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/user/compliance/license_compliance/index.md')
-rw-r--r--doc/user/compliance/license_compliance/index.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/user/compliance/license_compliance/index.md b/doc/user/compliance/license_compliance/index.md
index dd2bb75b1df..77314faea29 100644
--- a/doc/user/compliance/license_compliance/index.md
+++ b/doc/user/compliance/license_compliance/index.md
@@ -189,6 +189,38 @@ to explicitly add `-DskipTests` to your options.
If you still need to run tests during `mvn install`, add `-DskipTests=false` to
`MAVEN_CLI_OPTS`.
+#### Using private Maven repos
+
+If you have a private Maven repository that requires login credentials, you can use the
+`MAVEN_CLI_OPTS` variable to specify a custom [`settings.xml`](http://maven.apache.org/settings.html)
+file.
+
+For example, you may have a settings file like this in your project source:
+
+```xml
+<settings>
+ <servers>
+ <server>
+ <id>my-server</id>
+ <username>${private.username}</username>
+ <username>${private.password}</username>
+ </server>
+ </servers>
+</settings>
+```
+
+You can use this file through the following declaration in your `gitlab-ci.yml` file:
+
+```yaml
+license_scanning:
+ variables:
+ MAVEN_CLI_OPTS: --settings settings.xml -Dprivate.username=foo -Dprivate.password=bar
+```
+
+NOTE: **Note:**
+If you don't want to expose the credentials in your `.gitlab-ci.yml` file, then
+you can [set the variable in your project's settings](../../../ci/variables/README.md#via-the-ui).
+
### Selecting the version of Python
> - [Introduced](https://gitlab.com/gitlab-org/security-products/license-management/-/merge_requests/36) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.0.