Skip to content

Commit

Permalink
Add documentation for maven plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
antonsviridov-src committed Aug 8, 2024
1 parent 81ceda0 commit c931481
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/manual-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ index.scip: JSON data

## Step 5 (optional): Enable cross-repository navigation

Cross-repository navigation is a feature that allows "goto definition" and "find
references" to show results from multiple repositories.

By default, the `index.scip` file only enables navigation within the local
repository. You can optionally enable cross-repository navigation by creating
one of the following files in the SemanticDB _targetroot_ directory (the path in
Expand Down Expand Up @@ -193,5 +196,35 @@ one of the following files in the SemanticDB _targetroot_ directory (the path in
your Sourcegraph instance has another repository that defines that symbol, the
cross-repository navigation should succeed.

### Maven plugin

To simplify setting up cross-repo navigation for Maven projects, we provide a
plugin that can dump the project's dependencies in a format that scip-java understands.

You can either use it directly from commandline:

```
$ mvn com.sourcegraph:maven-plugin:@STABLE_VERSION@:sourcegraphDependencies
```

Or add it to your build like any other maven plugin:

```xml
<plugin>
<groupId>com.sourcegraph</groupId>
<artifactId>maven-plugin</artifactId>
<version>@STABLE_VERSION@</version>
<executions>
<execution>
<goals>
<goal>sourcegraphDependencies</goal>
</goals>
</execution>
</executions>
</plugin>
```

Which allows you to invoke it by simply running `mvn sourcegraph:sourcegraphDependencies`.

Cross-repository navigation is a feature that allows "goto definition" and "find
references" to show results from multiple repositories.

0 comments on commit c931481

Please sign in to comment.