Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions internal/maven/maven.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ type searchDoc struct {
GroupID string `json:"g"`
ArtifactID string `json:"a"`
// core=gav returns the version in "v"; "latestVersion" only exists on the non-gav aggregated core.
Version string `json:"v"`
Timestamp int64 `json:"timestamp"`
VersionCount int `json:"versionCount"`
Version string `json:"v"`
Timestamp int64 `json:"timestamp"`
}

// pomDevelopers is the minimal XML shape needed for FetchMaintainers; the
Expand Down Expand Up @@ -203,9 +202,8 @@ func (r *Registry) packageFromSearchAndPOM(doc searchDoc, ep *pom.EffectivePOM)
Name: fmt.Sprintf("%s:%s", doc.GroupID, doc.ArtifactID),
Namespace: doc.GroupID,
Metadata: map[string]any{
"group_id": doc.GroupID,
"artifact_id": doc.ArtifactID,
"version_count": doc.VersionCount,
"group_id": doc.GroupID,
"artifact_id": doc.ArtifactID,
},
}

Expand Down
9 changes: 4 additions & 5 deletions internal/maven/maven_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ func TestFetchPackage(t *testing.T) {
NumFound: 1,
Docs: []searchDoc{
{
ID: "com.google.guava:guava",
GroupID: "com.google.guava",
ArtifactID: "guava",
Version: "32.1.0-jre",
VersionCount: 150,
ID: "com.google.guava:guava",
GroupID: "com.google.guava",
ArtifactID: "guava",
Version: "32.1.0-jre",
},
},
},
Expand Down