Repository navigation
feat(maven): add Java packages from Maven Central as a registry - #15
Merged
Merged
Conversation
Versions come from maven-metadata.xml and are ordered by Maven's ComparableVersion rules; the repository is read from the POM and its parents, and release notes come from GitHub. OSV, deps.dev and Socket cover Maven, and the Maven registry row is enabled on start-up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Maven Central as a registry. You can compare versions of
groupId:artifactIdpackages (com.google.guava:guava,com.fasterxml.jackson.core:jackson-databind, ...) and see their advisories, health and behaviour data. Dependency-file audits (pom.xml, Gradle version catalogs and lockfiles) come in a follow-up PR.Why
Java is one of the largest ecosystems and was the only one shown as "coming soon": the
mavenregistry row has been seeded disabled since the start. Maven is also the best-covered ecosystem on the security side: OSV, deps.dev and Socket all support it.Changes
MavenServicereadsmaven-metadata.xmlfromrepo1.maven.org.VersionScheme.MavenandMavenVersionport Maven'sComparableVersion:alpha < beta < milestone < rc < snapshot < release (ga, final) < sp < other qualifiers.1.0.0equals1-ga, andm1means milestone 1.alpha,beta, milestones,rc, snapshots,preview,eaanddevcount as pre-releases.-jreand-androiddo not count as pre-releases.search.maven.org/solrsearch). It gets a 10 s client of its own, because a slow answer only costs the dates, not the page. A date that is still missing comes from theLast-Modifiedheader of the version's.pom.scmURL, connection, developer connection, project URL and issue tracker, in that order.${...}properties are filled in, with the child's values winning andproject.*naming the artifact itself.MavenRegistryClientusesGitHubFirstScrapingStrategy(PublishesReleaseNotes = false).GitHubScraperServicenow:jackson-databind-2.17.0);6.4.0.Final/5.3.0.RELEASE/x.GAto a6.4.0orv6.4.0tag.finalandreleaseare active by default, so every Hibernate and pre-5.3 Spring release would have been hidden.ListedVersionsRegistryClient.FilteredSpellinglets Maven drop those release-equivalent suffixes before the patterns are checked. The version itself keeps its registry spelling.RegistryNames.Maven = "maven"and agroupId:artifactIdgrammar. The group has no empty parts, because its dots become folders.Maven, deps.devMAVEN(group:artifact), Socketpkg:maven/group/artifact@version.mavenrow (seeded disabled while Maven had no client), or adds it when missing. Fresh databases seed it enabled. The Packagist start-up check moved into the sameEnsureRegistryAsynchelper.<dependency>and Gradleimplementation(...)snippets.group/artifact.mavenas the example of an unknown registry now usecargo. The test registry factory and the registry-name tests include Maven.Notes for reviewers
mavenrow on every start-up, as it already does forpypi. Disabling Maven later from the admin panel would not stick until that line is removed.rel/commons-lang-3.14.0and keep notes in JIRA, so their notes will mostly be empty.-jreand-androidvariants side by side in the version list.search.maven.orgis known to be slow at times; dates then come fromLast-Modifiedor stay empty in the version list.Checklist
developand is about one thingfeat(scope): ...,fix(scope): ...)src/frontend/src/app/core/models