You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Configuring Maven to Use a Private Repository for SCIP-JAVA
2
2
3
3
#### Overview
4
-
In Sourcegraph, configuring SCIP-JAVA to use a private Maven repository, such as Nexus or Artifactory, is essential when dependencies should not be retrieved from public repositories. This guide covers steps to set up Maven for SCIP-JAVA indexing with a private repository, ensuring secure and consistent dependency resolution.
4
+
In Sourcegraph, configuring SCIP-JAVA to use a private Maven repository, such as Nexus or Artifactory, is essential when dependencies are retrieved from private repositories that require authentication (as opposed to public repositories such as Maven Central). This guide covers steps to set up Maven for SCIP-JAVA indexing with a private repository, ensuring secure and consistent dependency resolution.
5
5
6
6
#### Step 1: Testing the Configuration on a Single Repository
7
7
8
-
To test and validate the Maven configuration, start by modifying a single repository’s auto-indexing settings to include a custom `settings.xml` file.
8
+
To test and validate the Maven configuration, start by modifying a single repository’s auto-indexing settings to include a custom settings.xml file. Refer to (Maven's official docs)[https://maven.apache.org/settings.html#quick-overview] for an overview of how this file is used to configure Maven repositories and other settings.
9
9
10
10
1.**Add Custom Index Job Configuration**:
11
11
- Access the repository’s index settings in Sourcegraph and open the “Raw” configuration panel.
@@ -19,7 +19,7 @@ To test and validate the Maven configuration, start by modifying a single reposi
@@ -33,53 +33,59 @@ To test and validate the Maven configuration, start by modifying a single reposi
33
33
}
34
34
```
35
35
36
-
2.**Trigger Indexing**:
37
-
- After configuring the repository, navigate to the "Precise Indexes" tab and click "Enqueue" to start the indexing process.
38
-
- Ensure that the environment variables `$ARTIFACTORY_USER` and `$ARTIFACTORY_PASSWORD` are created as Executor Secrets.
36
+
2.**Set Up Executor Secrets**:
37
+
- Before triggering the indexing process, make sure the environment variables `$ARTIFACTORY_USER` and `$ARTIFACTORY_PASSWORD` are created as [Executor Secrets](https://sourcegraph.com/docs/admin/executors/executor_secrets).
39
38
39
+
3.**Trigger Indexing**:
40
+
- After configuring the repository, navigate to the "Precise Indexes" tab and click "Enqueue" to start the indexing process.
40
41
41
42
#### Step 2: Automating the Configuration Across All Repositories
42
43
43
-
After verifying the configuration on a single repository, automate the setup across all repositories by modifying the inference configuration using a Lua script.
44
+
After verifying the configuration on a single repository, you can automate the setup across all repositories by modifying the inference configuration using a Lua script.
44
45
45
-
1.**Create or Update the Lua Script**:
46
-
- Go to `site-admin -> Code Graph -> Inference Configuration` on Sourcegraph.
47
-
- Replace or add the following Lua script for SCIP-JAVA indexing with Maven’s `settings.xml` setup:
46
+
**Create or Update the Lua Script**:
47
+
Navigate to `site-admin -> Code Graph -> Inference`, and replace or add the following Lua script for SCIP-JAVA indexing with Maven’s `settings.xml` setup:
Once the Lua script is applied, you can verify that the configuration is working by using the **"Preview results"** button in the Lua script editor under the "Inference Configuration" section. This will display the inferred index jobs for your repositories, showing details such as the root directory, indexer, indexer arguments, and environment variables used for each job.
90
+
91
+
If everything is configured correctly, the dependencies will be pulled from the specified private repository without any issues.
0 commit comments