Skip to content

Commit

Permalink
Hardcode optaplanner version to work around maven metadata problem
Browse files Browse the repository at this point in the history
  • Loading branch information
holly-cummins committed Jan 14, 2025
1 parent 50f5611 commit 3f3666e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
})
}

const months = [...new Set(extensionNodes.map(extensionNode => extensionNode.metadata?.maven?.sinceMonth))]
const months = [...new Set(extensionNodes.map(extensionNode => extensionNode.metadata?.maven?.sinceMonth))].filter(month => !!month)
// Always include a page for the current month
const thisMonth = `${getCanonicalMonthTimestamp(new Date().valueOf())}`
if (!months.includes(thisMonth)) {
Expand Down
3 changes: 2 additions & 1 deletion src/maven/maven-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ const generateMavenInfo = async artifact => {

maven.timestamp = await timestamp

const earliestVersion = await earliestVersionCache.getOrSet(groupId + artifactId, async () => await tolerantlyGetEarliestVersionFromMavenMetadata(groupId, artifactId))
// Hackishly hardcode an earliest version for optaplanner, since https://repo1.maven.org/maven2/org/optaplanner/optaplanner-quarkus-jackson/maven-metadata.xml disagrees with the listing https://repo1.maven.org/maven2/org/optaplanner/optaplanner-quarkus/
const earliestVersion = groupId === "org.optaplanner" ? "7.39.0.CR1" : await earliestVersionCache.getOrSet(groupId + artifactId, async () => await tolerantlyGetEarliestVersionFromMavenMetadata(groupId, artifactId))
maven.earliestVersion = earliestVersion

const earliestCoordinates = { groupId, artifactId, version: earliestVersion }
Expand Down

0 comments on commit 3f3666e

Please sign in to comment.