Add new "JVM Packages" external services type.
Created by: olafurpg
This PR will be updated as we go.
The goal of this PR is to replace a prototype implementation of RFC 307
called "PackageHub". PackageHub is currently implemented as a src serve-git
service type, which has the following limitations:
- Complicated installation: PackageHub is deployed as a separate service. Ideally, the functionality of PackageHub should be included with Sourcegraph out of the box.
- Slow latency: it takes a long time between when a Java package is added to PackageHub and when it becomes available on Sourcegraph.
This PR adds a new external service type called "JVM Packages" that reimplements one part of PackageHub - the part that proxies source code that has been published to Maven Central (npm equivalent for JVM ecosystem). PackageHub additionally supports proxying the sources of npm package as well as the JDK (Java standard library). Those features will be added separately in a future PR.
Remaining TODOs:
-
One repo per package -
Use new repo naming convention: maven/GROUP_ID/ARTIFACT_ID
(no version) -
Manually test with multiple versions of the same dependency (for example, junit:junit:4.13.2
andjunit:junit:4.13.1
-
Push appropriate git tag for every version (currently it pushes only to main) -
Point the main
branch to the "latest" version (ideally, according to semantic versioning ordering) -
Rename "maven.artifacts" configuration setting to "maven.dependencies" -
Support group:artifact:version:config
syntax alongside normalgroup:artifact:version
syntax -
Consider renaming "JVM Packages" to "JVM Dependencies" for the UI only (while we keep "JVM Packages" as the codename internally, for consistency with other ecosystems). -
Add JVM logo for the JVM Packages external service type (currently, it's using the git logo) -
Add missing git tags during the fetch command -
Remove unused git tags during the fetch command -
Use static git author and git timestamp for commit/tag -
Tests